Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/libvdpau-va-gl-0.4.2/3rdparty/vdpau/vdpau.h
Examining data/libvdpau-va-gl-0.4.2/3rdparty/vdpau/vdpau_x11.h
Examining data/libvdpau-va-gl-0.4.2/glsl/shader-bundle-tool.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-bitmap-surface.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-csc-matrix.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-decoder.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-device.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-output-surface.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-presentation-queue.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-video-mixer.cc
Examining data/libvdpau-va-gl-0.4.2/src/api-video-surface.cc
Examining data/libvdpau-va-gl-0.4.2/src/entry.cc
Examining data/libvdpau-va-gl-0.4.2/src/globals.cc
Examining data/libvdpau-va-gl-0.4.2/src/glx-context.cc
Examining data/libvdpau-va-gl-0.4.2/src/h264-parse.cc
Examining data/libvdpau-va-gl-0.4.2/src/handle-storage.cc
Examining data/libvdpau-va-gl-0.4.2/src/reverse-constant.cc
Examining data/libvdpau-va-gl-0.4.2/src/trace.cc
Examining data/libvdpau-va-gl-0.4.2/src/watermark.cc
Examining data/libvdpau-va-gl-0.4.2/src/x-display-ref.cc
Examining data/libvdpau-va-gl-0.4.2/tests/conv-speed.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-000.cc
Examining data/libvdpau-va-gl-0.4.2/tests/test-001.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-002.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-003.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-004.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-005.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-006.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-007.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-008.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-009.c
Examining data/libvdpau-va-gl-0.4.2/tests/test-010.c
Examining data/libvdpau-va-gl-0.4.2/tests/tests-common.c
Examining data/libvdpau-va-gl-0.4.2/tests/tests-common.h

FINAL RESULTS:

data/libvdpau-va-gl-0.4.2/src/trace.cc:39:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, args);
data/libvdpau-va-gl-0.4.2/src/entry.cc:47:25:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *value = getenv("VDPAU_QUIRKS");
data/libvdpau-va-gl-0.4.2/src/api-bitmap-surface.cc:214:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(dst_surf->bitmap_data.data() +
data/libvdpau-va-gl-0.4.2/src/api-bitmap-surface.cc:222:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(dst_surf->bitmap_data.data() +
data/libvdpau-va-gl-0.4.2/src/api-presentation-queue.cc:257:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[200] = { 0 };
data/libvdpau-va-gl-0.4.2/src/api-video-mixer.cc:393:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(min_value, &uint32_value, sizeof(uint32_value));
data/libvdpau-va-gl-0.4.2/src/api-video-mixer.cc:395:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(max_value, &uint32_value, sizeof(uint32_value));
data/libvdpau-va-gl-0.4.2/src/api-video-mixer.cc:400:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(min_value, &uint32_value, sizeof(uint32_value));
data/libvdpau-va-gl-0.4.2/src/api-video-mixer.cc:402:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(max_value, &uint32_value, sizeof(uint32_value));
data/libvdpau-va-gl-0.4.2/src/api-video-surface.cc:205:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(destination_data[0], img_data + q.offsets[0], sz);
data/libvdpau-va-gl-0.4.2/src/api-video-surface.cc:206:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(destination_data[1], img_data + q.offsets[1], sz / 2);
data/libvdpau-va-gl-0.4.2/src/api-video-surface.cc:211:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy (dst, src, q.width);
data/libvdpau-va-gl-0.4.2/src/api-video-surface.cc:218:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(dst, src, q.width);  // q.width/2 samples of U and V each, hence q.width
data/libvdpau-va-gl-0.4.2/src/api-video-surface.cc:233:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(destination_data[0], img_data + q.offsets[0], sz);
data/libvdpau-va-gl-0.4.2/src/api-video-surface.cc:238:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(dst, src, q.width);
data/libvdpau-va-gl-0.4.2/tests/conv-speed.c:51:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        rep_count = atoi(argv[1]);
data/libvdpau-va-gl-0.4.2/src/api-presentation-queue.cc:360:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1000);

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 12672 in approximately 0.34 seconds (37215 lines/second)
Physical Source Lines of Code (SLOC) = 6801
Hits@level = [0]  72 [1]   1 [2]  14 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+]  89 [1+]  17 [2+]  16 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 13.0863 [1+] 2.49963 [2+] 2.3526 [3+] 0.294074 [4+] 0.147037 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.