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/libnzb-0.0.20050629/src/crc32.c Examining data/libnzb-0.0.20050629/src/crc32.h Examining data/libnzb-0.0.20050629/src/nzb.h Examining data/libnzb-0.0.20050629/src/nntp.h Examining data/libnzb-0.0.20050629/src/uenc.h Examining data/libnzb-0.0.20050629/src/yenc.h Examining data/libnzb-0.0.20050629/src/nzb.cpp Examining data/libnzb-0.0.20050629/src/nntp.cpp Examining data/libnzb-0.0.20050629/src/uenc.cpp Examining data/libnzb-0.0.20050629/src/yenc.cpp Examining data/libnzb-0.0.20050629/includes/nzb.h FINAL RESULTS: data/libnzb-0.0.20050629/src/uenc.cpp:101:3: [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). strcpy(buf, (data.substr(pos2, pos + 1 - pos2)).c_str()); data/libnzb-0.0.20050629/src/nntp.cpp:123:2: [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 buf[MAXDATASIZE]; data/libnzb-0.0.20050629/src/nzb.cpp:123: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). file.date = atoi((char *)attr); data/libnzb-0.0.20050629/src/nzb.cpp:185:20: [2] (integer) atol: 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). segment.bytes = atol((char *)attr); data/libnzb-0.0.20050629/src/nzb.cpp:189:21: [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). segment.number = atoi((char *)attr); data/libnzb-0.0.20050629/src/uenc.cpp:94:2: [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 buf[64]; data/libnzb-0.0.20050629/src/yenc.cpp:82:18: [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). retdata.part = atoi((data.substr(ybegin + pos + 6, pos2 - (ybegin + pos + 6))).c_str()); data/libnzb-0.0.20050629/src/yenc.cpp:88:19: [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). retdata.total = atoi((header.substr(pos + 7, pos2 - (pos + 7))).c_str()); data/libnzb-0.0.20050629/src/yenc.cpp:94:24: [2] (integer) atol: 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). retdata.total_size = atol((data.substr(pos + 6, pos2 - (pos + 6))).c_str()); data/libnzb-0.0.20050629/src/yenc.cpp:115:27: [2] (integer) atol: 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). retdata.block_begin = atol((data.substr(pos + 7, pos2 - (pos + 7))).c_str()); data/libnzb-0.0.20050629/src/yenc.cpp:121:25: [2] (integer) atol: 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). retdata.block_end = atol((data.substr(pos + 5, pos2 - (pos + 5))).c_str()); data/libnzb-0.0.20050629/src/yenc.cpp:138:18: [2] (integer) atol: 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). retdata.size = atol((data.substr(pos + 6, pos2 - (pos + 6))).c_str()); data/libnzb-0.0.20050629/src/yenc.cpp:144:37: [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 (retdata.part != (unsigned int)atoi((data.substr(pos + 6, pos2 - (pos + 6))).c_str())) { ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 1254 in approximately 0.11 seconds (11769 lines/second) Physical Source Lines of Code (SLOC) = 682 Hits@level = [0] 4 [1] 0 [2] 12 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 17 [1+] 13 [2+] 13 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 24.9267 [1+] 19.0616 [2+] 19.0616 [3+] 1.46628 [4+] 1.46628 [5+] 0 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.