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/yorick-gl-1.1+cvs20070922+dfsg/glcode.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/isotree.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glPolys.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/dlist3d.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glInfo.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glMouse.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glcubetex.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glx11setup.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glfunc.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glMouse.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glTarray.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glustub.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/slicetree.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/gltexture.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glWrappers.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/Gradient3D.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/oglx.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glcode.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glx11setup.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/TriUtil.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/oglw.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/slicetree.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/Contour3D.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glBasic.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/playgl.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glStrips.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/gltexsubs.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glviewpoint.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glGlyph.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/gl3dtex.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/ContourTets3D.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/glfunc.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/TriStruct.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glx11view.c Examining data/yorick-gl-1.1+cvs20070922+dfsg/isotree.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glPolys.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/dlist3d.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glInfo.h Examining data/yorick-gl-1.1+cvs20070922+dfsg/glStrips.h FINAL RESULTS: data/yorick-gl-1.1+cvs20070922+dfsg/glInfo.c:90:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(indentString); data/yorick-gl-1.1+cvs20070922+dfsg/glInfo.c:100:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(indentString); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:34:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "OpenGL error GL_INVALID_ENUM in %s\n", x); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:36:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "OpenGL error GL_INVALID_VALUE in %s\n", x); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:38:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "OpenGL error GL_INVALID_OPERATION in %s\n", x); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:40:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "OpenGL error GL_STACK_OVERFLOW in %s\n", x); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:42:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "OpenGL error GL_STACK_UNDERFLOW in %s\n", x); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:44:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "OpenGL error GL_OUT_OF_MEMORY in %s\n", x); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:46:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "GLU error in %s\n", x); data/yorick-gl-1.1+cvs20070922+dfsg/gltexsubs.c:147:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "OpenGL version number is %s\n", version); data/yorick-gl-1.1+cvs20070922+dfsg/glx11view.c:55:10: [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. tmp= getenv("DISPLAY"); data/yorick-gl-1.1+cvs20070922+dfsg/Contour3D.h:105:30: [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. double dz, yPoint3D *grd, char *done, long offsets[5], data/yorick-gl-1.1+cvs20070922+dfsg/Contour3D.h:109:30: [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. double dz, yPoint3D *grd, char *done, long offsets[5], data/yorick-gl-1.1+cvs20070922+dfsg/ContourTets3D.c:199:8: [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. static char face_code[16]= {0x03, 0x05, 0x09, 0x11, 0x22, 0x24, 0x28, data/yorick-gl-1.1+cvs20070922+dfsg/ContourTets3D.c:249:1: [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 vertflag[8]; data/yorick-gl-1.1+cvs20070922+dfsg/dlist3d.c:415:3: [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(data->len, len, sizeof(long)*npolys); data/yorick-gl-1.1+cvs20070922+dfsg/glMouse.c:35:8: [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. static char msg_buf[120]; data/yorick-gl-1.1+cvs20070922+dfsg/glMouse.c:102:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg_buf, "distance moved squared is %e\n", distsq); data/yorick-gl-1.1+cvs20070922+dfsg/glMouse.c:104:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg_buf, "x=%d, y=%d, ms_last.x=%d, ms_last.y=%d\n", data/yorick-gl-1.1+cvs20070922+dfsg/glTarray.c:161: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 msg[120]; data/yorick-gl-1.1+cvs20070922+dfsg/glTarray.c:162:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "in yglTarrayAlpha, alpha_pass is %d\n", alpha_pass); data/yorick-gl-1.1+cvs20070922+dfsg/glcode.c:27: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 msg[120]; data/yorick-gl-1.1+cvs20070922+dfsg/gltexsubs.c:124: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 *version, msg[100]; data/yorick-gl-1.1+cvs20070922+dfsg/gltexture.c:56:17: [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. static unsigned char cubeMaps[6][ygl_cubemap_size][ygl_cubemap_size][4]; data/yorick-gl-1.1+cvs20070922+dfsg/gltexture.c:695: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 msg[100]; data/yorick-gl-1.1+cvs20070922+dfsg/gltexture.c:696:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg,"direction is %d\n",dir); data/yorick-gl-1.1+cvs20070922+dfsg/gltexture.c:1289:12: [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. unsigned char flagtmp[64]; data/yorick-gl-1.1+cvs20070922+dfsg/glx11setup.c:50:8: [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. static char my_msg[96]; data/yorick-gl-1.1+cvs20070922+dfsg/glx11setup.c:65: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 titlstr[80]; data/yorick-gl-1.1+cvs20070922+dfsg/glx11setup.c:77:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(titlstr, "3D window %d", num); data/yorick-gl-1.1+cvs20070922+dfsg/glx11setup.c:454:8: [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. static char msg_buf[120]; data/yorick-gl-1.1+cvs20070922+dfsg/glx11setup.c:472:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg_buf, "Mouse released. %d motion events while down\n", data/yorick-gl-1.1+cvs20070922+dfsg/oglw.c:30:17: [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. static unsigned char bits3[8] = { data/yorick-gl-1.1+cvs20070922+dfsg/oglw.c:32:17: [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. static unsigned char bits2[4] = { 0, 0x55, 0xaa, 0xff }; data/yorick-gl-1.1+cvs20070922+dfsg/oglw.c:33:17: [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. static unsigned char bits1[2] = { 0, 0xff }; data/yorick-gl-1.1+cvs20070922+dfsg/oglw.c:34:17: [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. static unsigned char *bits[3] = { bits1, bits2, bits3 }; data/yorick-gl-1.1+cvs20070922+dfsg/gltexture.c:146: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). terminator= where+strlen(extension); ANALYSIS SUMMARY: Hits = 37 Lines analyzed = 18917 in approximately 0.56 seconds (33926 lines/second) Physical Source Lines of Code (SLOC) = 14727 Hits@level = [0] 97 [1] 1 [2] 25 [3] 1 [4] 10 [5] 0 Hits@level+ = [0+] 134 [1+] 37 [2+] 36 [3+] 11 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 9.09893 [1+] 2.51239 [2+] 2.44449 [3+] 0.746927 [4+] 0.679025 [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.