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/gtkgl2-2.1.0/gtkgl/gdkgl.h Examining data/gtkgl2-2.1.0/gtkgl/gtkglarea.h Examining data/gtkgl2-2.1.0/gtkgl/gdkgl.c Examining data/gtkgl2-2.1.0/gtkgl/gtkglarea.c Examining data/gtkgl2-2.1.0/examples/gdkfont.c Examining data/gtkgl2-2.1.0/examples/glpixmap.c Examining data/gtkgl2-2.1.0/examples/gtkglarea_demo.c Examining data/gtkgl2-2.1.0/examples/viewlw.c Examining data/gtkgl2-2.1.0/examples/lw.h Examining data/gtkgl2-2.1.0/examples/lw.c Examining data/gtkgl2-2.1.0/examples/trackball.h Examining data/gtkgl2-2.1.0/examples/trackball.c Examining data/gtkgl2-2.1.0/examples/zktor.c Examining data/gtkgl2-2.1.0/examples/shaders.c Examining data/gtkgl2-2.1.0/examples/simple.c FINAL RESULTS: data/gtkgl2-2.1.0/examples/lw.c:111: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 name[LW_MAX_NAME_LEN]; data/gtkgl2-2.1.0/examples/lw.c:217:13: [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 *f = fopen(lw_file, "rb"); data/gtkgl2-2.1.0/examples/lw.c:239: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(lw_file, "rb"); data/gtkgl2-2.1.0/examples/lw.h:31: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 name[LW_MAX_NAME_LEN]; data/gtkgl2-2.1.0/examples/zktor.c:670: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 s[200]; data/gtkgl2-2.1.0/examples/gdkfont.c:91:17: [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). glCallLists(strlen(fontname), GL_UNSIGNED_BYTE, fontname); data/gtkgl2-2.1.0/examples/lw.c:40:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(f); data/gtkgl2-2.1.0/examples/zktor.c:676:17: [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). glCallLists(strlen(s), GL_UNSIGNED_BYTE, s); ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 4934 in approximately 0.16 seconds (30959 lines/second) Physical Source Lines of Code (SLOC) = 3004 Hits@level = [0] 2 [1] 3 [2] 5 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 10 [1+] 8 [2+] 5 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 3.32889 [1+] 2.66312 [2+] 1.66445 [3+] 0 [4+] 0 [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.