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/glewmx-1.13.0/build/cmake/testbuild/main.c
Examining data/glewmx-1.13.0/include/GL/glew.h
Examining data/glewmx-1.13.0/include/GL/wglew.h
Examining data/glewmx-1.13.0/include/GL/glxew.h
Examining data/glewmx-1.13.0/src/glewinfo.c
Examining data/glewmx-1.13.0/src/glew.c
Examining data/glewmx-1.13.0/src/visualinfo.c
Examining data/glewmx-1.13.0/auto/src/wglew_mid.h
Examining data/glewmx-1.13.0/auto/src/glew_init_glx.c
Examining data/glewmx-1.13.0/auto/src/glewinfo_glx.c
Examining data/glewmx-1.13.0/auto/src/glew_init_gl.c
Examining data/glewmx-1.13.0/auto/src/glew_tail.h
Examining data/glewmx-1.13.0/auto/src/glewinfo_wgl.c
Examining data/glewmx-1.13.0/auto/src/glxew_tail.h
Examining data/glewmx-1.13.0/auto/src/glew_init_wgl.c
Examining data/glewmx-1.13.0/auto/src/glew_str_head.c
Examining data/glewmx-1.13.0/auto/src/khronos_license.h
Examining data/glewmx-1.13.0/auto/src/glewinfo_tail.c
Examining data/glewmx-1.13.0/auto/src/glew_license.h
Examining data/glewmx-1.13.0/auto/src/glxew_mid.h
Examining data/glewmx-1.13.0/auto/src/glew_head.h
Examining data/glewmx-1.13.0/auto/src/wglew_head.h
Examining data/glewmx-1.13.0/auto/src/mesa_license.h
Examining data/glewmx-1.13.0/auto/src/glewinfo_gl.c
Examining data/glewmx-1.13.0/auto/src/wglew_tail.h
Examining data/glewmx-1.13.0/auto/src/glew_str_glx.c
Examining data/glewmx-1.13.0/auto/src/glew_head.c
Examining data/glewmx-1.13.0/auto/src/glewinfo_head.c
Examining data/glewmx-1.13.0/auto/src/glew_init_tail.c
Examining data/glewmx-1.13.0/auto/src/glew_str_wgl.c
Examining data/glewmx-1.13.0/auto/src/glxew_head.h
Examining data/glewmx-1.13.0/auto/src/glew_str_tail.c

FINAL RESULTS:

data/glewmx-1.13.0/auto/src/glew_head.c:120:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(symbolName+1, (const char*)name);
data/glewmx-1.13.0/include/GL/glew.h:1696:72:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void* (GLAPIENTRY * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:3608:90:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void (GLAPIENTRY * PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:4077:78:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:4078:123:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
data/glewmx-1.13.0/include/GL/glew.h:5221:118:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void * (GLAPIENTRY * PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
data/glewmx-1.13.0/include/GL/glew.h:6174:137:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void (GLAPIENTRY * PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
data/glewmx-1.13.0/include/GL/glew.h:7624:76:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void * (GLAPIENTRY * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:9120:81:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:9121:126:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
data/glewmx-1.13.0/include/GL/glew.h:10539:141:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void (GLAPIENTRY * PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
data/glewmx-1.13.0/include/GL/glew.h:11852:99:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void * (GLAPIENTRY * PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint* stride, GLenum *layout);
data/glewmx-1.13.0/include/GL/glew.h:12414:89:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void (GLAPIENTRY * PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:14012:82:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void (GLAPIENTRY * PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:14014:87:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void (GLAPIENTRY * PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
data/glewmx-1.13.0/include/GL/glew.h:14466:93:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef void (GLAPIENTRY * PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
data/glewmx-1.13.0/include/GL/wglew.h:903:76:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
data/glewmx-1.13.0/include/GL/wglew.h:905:122:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
data/glewmx-1.13.0/src/glew.c:152:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(symbolName+1, (const char*)name);
data/glewmx-1.13.0/src/visualinfo.c:250:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(t, p);
data/glewmx-1.13.0/src/visualinfo.c:705:11:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
          fprintf(file, value ? " y " : " n ");
data/glewmx-1.13.0/auto/src/glewinfo_tail.c:83:30:  [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.
    params.display == NULL ? getenv("DISPLAY") : params.display, params.visual);
data/glewmx-1.13.0/src/glewinfo.c:11671:30:  [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.
    params.display == NULL ? getenv("DISPLAY") : params.display, params.visual);
data/glewmx-1.13.0/auto/src/glewinfo_tail.c:69:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f = fopen("glewinfo.txt", "w");
data/glewmx-1.13.0/include/GL/glxew.h:1251:3:  [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 pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
data/glewmx-1.13.0/include/GL/glxew.h:1255:3:  [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 pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
data/glewmx-1.13.0/include/GL/glxew.h:1262:3:  [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 pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
data/glewmx-1.13.0/include/GL/glxew.h:1268:3:  [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 pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
data/glewmx-1.13.0/src/glewinfo.c:11657:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f = fopen("glewinfo.txt", "w");
data/glewmx-1.13.0/src/visualinfo.c:156:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen("visualinfo.txt", "w");
data/glewmx-1.13.0/src/visualinfo.c:221:3:  [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 t[80];
data/glewmx-1.13.0/auto/src/glew_head.c:119:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  symbolName = malloc(strlen((const char*)name) + 2);
data/glewmx-1.13.0/auto/src/glewinfo_head.c:62:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i=0; i<62-strlen(name); i++) fprintf(f, " ");
data/glewmx-1.13.0/auto/src/glewinfo_head.c:70:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i=0; i<strlen(name)+1; i++) fprintf(f, "-");
data/glewmx-1.13.0/auto/src/glewinfo_head.c:79:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
data/glewmx-1.13.0/include/GL/glxew.h:297:97:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
data/glewmx-1.13.0/include/GL/glxew.h:1433:93:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
data/glewmx-1.13.0/src/glew.c:151:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  symbolName = malloc(strlen((const char*)name) + 2);
data/glewmx-1.13.0/src/glewinfo.c:94:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i=0; i<62-strlen(name); i++) fprintf(f, " ");
data/glewmx-1.13.0/src/glewinfo.c:102:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i=0; i<strlen(name)+1; i++) fprintf(f, "-");
data/glewmx-1.13.0/src/glewinfo.c:111:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
data/glewmx-1.13.0/src/visualinfo.c:246:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      i = (int)strlen(p);

ANALYSIS SUMMARY:

Hits = 42
Lines analyzed = 57474 in approximately 1.69 seconds (34046 lines/second)
Physical Source Lines of Code (SLOC) = 46475
Hits@level = [0] 287 [1]  11 [2]   8 [3]   2 [4]  21 [5]   0
Hits@level+ = [0+] 329 [1+]  42 [2+]  31 [3+]  23 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 7.07907 [1+] 0.903712 [2+] 0.667025 [3+] 0.49489 [4+] 0.451856 [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.