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/rnetclient-2017.1/rnet_encode.c Examining data/rnetclient-2017.1/pmhash.h Examining data/rnetclient-2017.1/rnetclient.c Examining data/rnetclient-2017.1/t-parse.c Examining data/rnetclient-2017.1/decfile.h Examining data/rnetclient-2017.1/rnet_message.c Examining data/rnetclient-2017.1/decfile.c Examining data/rnetclient-2017.1/pmhash.c Examining data/rnetclient-2017.1/rnet_encode.h Examining data/rnetclient-2017.1/rnet_message.h FINAL RESULTS: data/rnetclient-2017.1/decfile.c:85:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(val, p, sz); \ data/rnetclient-2017.1/decfile.c:131: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). exerc = atoi(pmhash_get(hash, "exerc")); data/rnetclient-2017.1/decfile.c:387: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). decfile->file = fopen(filename, "r"); data/rnetclient-2017.1/decfile.c:463:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&msg->buffer[msg->len], line, len - 12); data/rnetclient-2017.1/rnet_message.c:92:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, key, klen); data/rnetclient-2017.1/rnet_message.c:105:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, val, vlen); data/rnetclient-2017.1/rnetclient.c:89: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 output_file[PATH_MAX]; data/rnetclient-2017.1/rnetclient.c:151:35: [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 size_t chars2len (unsigned char buf[2]) { data/rnetclient-2017.1/rnetclient.c:274: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 buffer[16]; data/rnetclient-2017.1/rnetclient.c:359:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*message)->buffer, out, olen); data/rnetclient-2017.1/rnetclient.c:408:7: [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(args->output_file, O_CREAT | O_WRONLY | O_EXCL, S_IRUSR | S_IWUSR); data/rnetclient-2017.1/rnetclient.c:468: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 cwd[PATH_MAX]; data/rnetclient-2017.1/t-parse.c:29: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 *filename[4] = { data/rnetclient-2017.1/decfile.c:454: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). len = strlen(line); data/rnetclient-2017.1/rnet_encode.c:65:16: [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). header_size = strlen(header); data/rnetclient-2017.1/rnet_message.c:114:29: [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). return add_field(msg, key, strlen(key), (char *) &nval, sizeof(val)); data/rnetclient-2017.1/rnet_message.c:119:29: [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). return add_field(msg, key, strlen(key), val, strlen(val)); data/rnetclient-2017.1/rnet_message.c:119:47: [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). return add_field(msg, key, strlen(key), val, strlen(val)); data/rnetclient-2017.1/rnet_message.c:124:29: [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). return add_field(msg, key, strlen(key), (char *) &val, sizeof(val)); data/rnetclient-2017.1/rnet_message.c:130:29: [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). return add_field(msg, key, strlen(key), (char *) &nval, sizeof(val)); data/rnetclient-2017.1/rnet_message.c:136:29: [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). return add_field(msg, key, strlen(key), (char *) &nval, sizeof(val)); data/rnetclient-2017.1/rnet_message.c:142:29: [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). return add_field(msg, key, strlen(key), buffer, len); data/rnetclient-2017.1/rnet_message.c:172: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). if (strlen(skey) == klen && !strncasecmp(key, skey, klen)) data/rnetclient-2017.1/rnetclient.c:283:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(c, buffer, 1); data/rnetclient-2017.1/rnetclient.c:286:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(c, buffer, 14); ANALYSIS SUMMARY: Hits = 25 Lines analyzed = 1713 in approximately 0.06 seconds (28496 lines/second) Physical Source Lines of Code (SLOC) = 1268 Hits@level = [0] 31 [1] 12 [2] 13 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 56 [1+] 25 [2+] 13 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 44.164 [1+] 19.7161 [2+] 10.2524 [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.