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/hyantesite-1.3.0/test/list_function.c Examining data/hyantesite-1.3.0/test/hyantesite_status.c Examining data/hyantesite-1.3.0/src/options.c Examining data/hyantesite-1.3.0/src/hyantes.c Examining data/hyantesite-1.3.0/src/options.h Examining data/hyantesite-1.3.0/src/hyantes.h Examining data/hyantesite-1.3.0/src/hyantes_run.c Examining data/hyantesite-1.3.0/bin/hyantesite.c FINAL RESULTS: data/hyantesite-1.3.0/src/hyantes.c:142:12: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if(fscanf(fd,INPUT_FORMAT,&the_towns[curr].lat,&the_towns[curr].lon,&the_towns[curr].pot) !=3 ) data/hyantesite-1.3.0/src/hyantes.c:185: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(OUTPUT_FORMAT,pt[i][j].lon,pt[i][j].lat,pt[i][j].pot); data/hyantesite-1.3.0/bin/hyantesite.c:157:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long(argc, argv, short_options, long_options, data/hyantesite-1.3.0/bin/hyantesite.c:131: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 short_options[1 + data/hyantesite-1.3.0/bin/hyantesite.c:197:18: [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). fi = fopen(optarg, "r"); data/hyantesite-1.3.0/bin/hyantesite.c:214:18: [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). fo = fopen(optarg, "w"); data/hyantesite-1.3.0/bin/hyantesite.c:230:30: [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). resLat = atoi(res); data/hyantesite-1.3.0/bin/hyantesite.c:238:30: [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). resLon = atoi(res); data/hyantesite-1.3.0/test/hyantesite_status.c:38:10: [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). fi = fopen(argv[9], "r"); data/hyantesite-1.3.0/test/hyantesite_status.c:48:34: [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). pOut = hs_smoothing(resLat = atoi(argv[7]), /* resLat */ data/hyantesite-1.3.0/test/hyantesite_status.c:49:17: [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). resLon = atoi(argv[8]), /* resLon */ data/hyantesite-1.3.0/src/hyantes.c:146:30: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char c=(char)fgetc(fd); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 1234 in approximately 0.10 seconds (11938 lines/second) Physical Source Lines of Code (SLOC) = 755 Hits@level = [0] 28 [1] 1 [2] 8 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 40 [1+] 12 [2+] 11 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 52.9801 [1+] 15.894 [2+] 14.5695 [3+] 3.97351 [4+] 2.64901 [5+] 0 Dot directories skipped = 3 (--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.