Code Monkey home page Code Monkey logo

bonzomatic's People

Contributors

22459 avatar alkama avatar chepachilo avatar crobisaur avatar cupe avatar cxw42 avatar gargaj avatar gitter-badger avatar gregersn avatar hamidnazari avatar jasmin68k avatar kebby avatar klemensn avatar ladynoname avatar linkmauve avatar pansk avatar perweij avatar plabatut avatar porocyon avatar rgiot avatar sacredbanana avatar skomp avatar tehe avatar tplk avatar twinshadow avatar ursg avatar w23 avatar w84death avatar wilhelmy avatar

Watchers

 avatar  avatar

Forkers

monocle-ai

bonzomatic's Issues

Potential security issue in src/platform_w32_common/Timer.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

1 instance of this defect were found in the following locations:

Instance 1
File : src/platform_w32_common/Timer.cpp
Function: QueryPerformanceFrequency@4

QueryPerformanceFrequency(&freq);

Code extract:

      QueryPerformanceCounter(&LastPCV);
    }
    QueryPerformanceCounter(&count);
    QueryPerformanceFrequency(&freq); <------ HERE

    currentTime += (double)(count.QuadPart - LastPCV.QuadPart) / (double)(freq.QuadPart);

How can I fix it?
Correct reference usage found in external/glfw/src/win32_time.c at line 41.

if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency))

Code extract:

{
    uint64_t frequency;

    if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency)) <------ HERE
    {
        _glfw.timer.win32.hasPC = GLFW_TRUE;

Potential issue in src/platform_w32_common/Timer.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

1 instance of this defect were found in the following locations:


Instance 1
File : src/platform_w32_common/Timer.cpp
Enclosing Function : _Time@Timer
Function : QueryPerformanceFrequency@4

QueryPerformanceFrequency(&freq);

Issue in: freq

Code extract:

      QueryPerformanceCounter(&LastPCV);
    }
    QueryPerformanceCounter(&count);
    QueryPerformanceFrequency(&freq); <------ HERE

    currentTime += (double)(count.QuadPart - LastPCV.QuadPart) / (double)(freq.QuadPart);

How can I fix it?
Correct reference usage found in external/glfw/src/win32_time.c at line 41.

if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency))

Code extract:

{
    uint64_t frequency;

    if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency)) <------ HERE
    {
        _glfw.timer.win32.hasPC = GLFW_TRUE;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.