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/cube2font-1.5.1/src/shared/cube2font.c FINAL RESULTS: data/cube2font-1.5.1/src/shared/cube2font.c:23: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, v); data/cube2font-1.5.1/src/shared/cube2font.c:84:9: [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(filename, "wb"); data/cube2font-1.5.1/src/shared/cube2font.c:228: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. static char buf[7]; data/cube2font-1.5.1/src/shared/cube2font.c:252: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. static char file[256]; data/cube2font-1.5.1/src/shared/cube2font.c:259: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. static char file[512]; data/cube2font-1.5.1/src/shared/cube2font.c:309: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 file[256]; data/cube2font-1.5.1/src/shared/cube2font.c:312:9: [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(file, "w"); data/cube2font-1.5.1/src/shared/cube2font.c:394:11: [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). pad = atoi(argv[4]); data/cube2font-1.5.1/src/shared/cube2font.c:395:14: [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). offset = atoi(argv[5]); data/cube2font-1.5.1/src/shared/cube2font.c:396:15: [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). advance = atoi(argv[6]); data/cube2font-1.5.1/src/shared/cube2font.c:397:9: [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). w = atoi(argv[7]); data/cube2font-1.5.1/src/shared/cube2font.c:398:9: [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). h = atoi(argv[8]); data/cube2font-1.5.1/src/shared/cube2font.c:399:10: [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). tw = atoi(argv[9]); data/cube2font-1.5.1/src/shared/cube2font.c:400:10: [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). th = atoi(argv[10]); data/cube2font-1.5.1/src/shared/cube2font.c:401:24: [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). if(argc > 11) sw = atoi(argv[11]); data/cube2font-1.5.1/src/shared/cube2font.c:402:24: [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). if(argc > 12) sh = atoi(argv[12]); ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 556 in approximately 0.06 seconds (8841 lines/second) Physical Source Lines of Code (SLOC) = 517 Hits@level = [0] 17 [1] 0 [2] 15 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 33 [1+] 16 [2+] 16 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 63.8298 [1+] 30.9478 [2+] 30.9478 [3+] 1.93424 [4+] 1.93424 [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.