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/cups-pk-helper-0.2.6/src/cups.h Examining data/cups-pk-helper-0.2.6/src/cph-iface-mechanism.h Examining data/cups-pk-helper-0.2.6/src/cph-iface-mechanism.c Examining data/cups-pk-helper-0.2.6/src/cups-pk-helper-mechanism.h Examining data/cups-pk-helper-0.2.6/src/cups.c Examining data/cups-pk-helper-0.2.6/src/cups-pk-helper-mechanism.c Examining data/cups-pk-helper-0.2.6/src/main.c Examining data/cups-pk-helper-0.2.6/src/test-cups-pk.c Examining data/cups-pk-helper-0.2.6/src/test-cups.c FINAL RESULTS: data/cups-pk-helper-0.2.6/src/cups.c:625:9: [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 uri[HTTP_MAX_URI + 1]; data/cups-pk-helper-0.2.6/src/cups.c:641:9: [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 uri[HTTP_MAX_URI + 1]; data/cups-pk-helper-0.2.6/src/cups.c:657:9: [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 uri[HTTP_MAX_URI + 1]; data/cups-pk-helper-0.2.6/src/cups.c:672:9: [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 uri[HTTP_MAX_URI + 1]; data/cups-pk-helper-0.2.6/src/cups.c:1102:15: [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. const char * const attrs[1] = { "member-names" }; data/cups-pk-helper-0.2.6/src/cups.c:1141:15: [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. const char * const attrs[1] = { "device-uri" }; data/cups-pk-helper-0.2.6/src/cups.c:1237:14: [2] (misc) open: 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). fd = open (filename, O_WRONLY | O_NOFOLLOW | O_TRUNC); data/cups-pk-helper-0.2.6/src/cups.c:1326:14: [2] (misc) open: 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). fd = open (filename, O_RDONLY); data/cups-pk-helper-0.2.6/src/cups.c:1973:9: [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 printer_uri[HTTP_MAX_URI + 1]; data/cups-pk-helper-0.2.6/src/cups.c:2441:15: [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. const char * const values[2] = { start, end }; data/cups-pk-helper-0.2.6/src/cups.c:2663:9: [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 newppdfile[CPH_PATH_MAX]; data/cups-pk-helper-0.2.6/src/cups.c:2666:9: [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 line[CPH_STR_MAXLEN]; data/cups-pk-helper-0.2.6/src/cups.c:2667:9: [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 keyword[CPH_STR_MAXLEN]; data/cups-pk-helper-0.2.6/src/cups.c:2955:15: [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. const char * const attrs[1] = { "job-originating-user-name" }; data/cups-pk-helper-0.2.6/src/cups.c:301: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). len = strlen (str); data/cups-pk-helper-0.2.6/src/cups.c:371: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). len = strlen (name); data/cups-pk-helper-0.2.6/src/cups.c:392: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). len = strlen (scheme); data/cups-pk-helper-0.2.6/src/cups.c:2715:43: [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). line + strlen ("*Default"), ANALYSIS SUMMARY: Hits = 18 Lines analyzed = 15309 in approximately 0.39 seconds (38769 lines/second) Physical Source Lines of Code (SLOC) = 10704 Hits@level = [0] 0 [1] 4 [2] 14 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 18 [1+] 18 [2+] 14 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.68161 [1+] 1.68161 [2+] 1.30792 [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.