Flawfinder Results
Here are the security scan results from
Flawfinder version 2.0.19,
(C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 222
Examining project1_SSA24.c
Final Results
- project1_SSA24.c:41: [4] (buffer) strcpy:
Does not check for buffer overflows when copying to destination [MS-banned]
(CWE-120).
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily
misused).
- project1_SSA24.c:55: [4] (format) fprintf:
If format strings can be influenced by an attacker, they can be exploited
(CWE-134).
Use a constant for the format specification.
- project1_SSA24.c:7: [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.
- project1_SSA24.c:27: [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.
- project1_SSA24.c:32: [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.
- project1_SSA24.c:34: [2] (buffer) strcat:
Does not check for buffer overflows when concatenating to destination
[MS-banned] (CWE-120).
Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is
easily misused). Risk is low because the source is a constant string.
- project1_SSA24.c:7: [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).
- project1_SSA24.c:8: [1] (buffer) strncpy:
Easily used incorrectly; doesn't always \0-terminate or check for invalid
pointers [MS-banned] (CWE-120).
- project1_SSA24.c:8: [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).
- project1_SSA24.c:9: [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).
- project1_SSA24.c:16: [1] (buffer) read:
Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20).
- project1_SSA24.c:21: [1] (buffer) read:
Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20).
- project1_SSA24.c:33: [1] (buffer) strncpy:
Easily used incorrectly; doesn't always \0-terminate or check for invalid
pointers [MS-banned] (CWE-120).
Analysis Summary
Hits = 13
Lines analyzed = 65 in approximately 0.01 seconds (6755 lines/second)
Physical Source Lines of Code (SLOC) = 53
Hits@level = [0] 2 [1] 7 [2] 4 [3] 0 [4] 2 [5] 0
Hits@level+ = [0+] 15 [1+] 13 [2+] 6 [3+] 2 [4+] 2 [5+] 0
Hits/KSLOC@level+ = [0+] 283.019 [1+] 245.283 [2+] 113.208 [3+] 37.7358 [4+] 37.7358 [5+] 0
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
You can inhibit a report by adding a comment in this form:
// flawfinder: ignore
Make *sure* it's a false positive!
You can use the option --neverignore to show these.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.