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

FINAL RESULTS:

data/glew-2.1.0/auto/src/glew_head.c:109: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/glew-2.1.0/include/GL/glew.h:1700: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/glew-2.1.0/include/GL/glew.h:3932: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/glew-2.1.0/include/GL/glew.h:4399: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/glew-2.1.0/include/GL/glew.h:4400: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/glew-2.1.0/include/GL/glew.h:5559: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/glew-2.1.0/include/GL/glew.h:6527: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/glew-2.1.0/include/GL/glew.h:7993: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/glew-2.1.0/include/GL/glew.h:9743: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/glew-2.1.0/include/GL/glew.h:9744: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/glew-2.1.0/include/GL/glew.h:10941:121:  [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 * PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
data/glew-2.1.0/include/GL/glew.h:11779: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/glew-2.1.0/include/GL/glew.h:13482: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/glew-2.1.0/include/GL/glew.h:14166: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/glew-2.1.0/include/GL/glew.h:16301: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/glew-2.1.0/include/GL/glew.h:16303: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/glew-2.1.0/include/GL/glew.h:16893: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/glew-2.1.0/include/GL/wglew.h:921: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/glew-2.1.0/include/GL/wglew.h:923: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/glew-2.1.0/src/glew.c:141: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/glew-2.1.0/src/visualinfo.c:261: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/glew-2.1.0/src/visualinfo.c:723: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/glew-2.1.0/auto/src/glewinfo_tail.c:95: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/glew-2.1.0/src/glewinfo.c:16378: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/glew-2.1.0/auto/src/glew_init_gl.c:178:5:  [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 ext[128];
data/glew-2.1.0/auto/src/glewinfo_tail.c:79: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/glew-2.1.0/include/GL/glxew.h:1278: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/glew-2.1.0/include/GL/glxew.h:1282: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/glew-2.1.0/include/GL/glxew.h:1289: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/glew-2.1.0/include/GL/glxew.h:1295: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/glew-2.1.0/src/glew.c:16261:5:  [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 ext[128];
data/glew-2.1.0/src/glewinfo.c:16362: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/glew-2.1.0/src/visualinfo.c:165: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/glew-2.1.0/src/visualinfo.c:232: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/glew-2.1.0/auto/src/glew_head.c:108: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/glew-2.1.0/auto/src/glewinfo_head.c:57: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/glew-2.1.0/auto/src/glewinfo_head.c:65: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/glew-2.1.0/auto/src/glewinfo_head.c:74: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/glew-2.1.0/include/GL/eglew.h:244:96:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
typedef EGLBoolean  ( * PFNEGLMAKECURRENTPROC) (EGLDisplay  dpy, EGLSurface  draw, EGLSurface  read, EGLContext  ctx);
data/glew-2.1.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/glew-2.1.0/include/GL/glxew.h:1460: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/glew-2.1.0/src/glew.c:140: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/glew-2.1.0/src/glewinfo.c:89: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/glew-2.1.0/src/glewinfo.c:97: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/glew-2.1.0/src/glewinfo.c:106: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/glew-2.1.0/src/visualinfo.c:257: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 = 46
Lines analyzed = 79378 in approximately 2.25 seconds (35311 lines/second)
Physical Source Lines of Code (SLOC) = 63893
Hits@level = [0] 293 [1]  12 [2]  10 [3]   2 [4]  22 [5]   0
Hits@level+ = [0+] 339 [1+]  46 [2+]  34 [3+]  24 [4+]  22 [5+]   0
Hits/KSLOC@level+ = [0+] 5.30575 [1+] 0.719954 [2+] 0.53214 [3+] 0.375628 [4+] 0.344326 [5+]   0
Dot directories skipped = 2 (--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.