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/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_debug.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_header.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_paranoid.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/test.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn.h Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dynP.h Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_append.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_create.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_delete.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_insert.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_put.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_realloc.c Examining data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_size.c Examining data/xbuffy-3.3.bl.3.dfsg/headers.c Examining data/xbuffy-3.3.bl.3.dfsg/nntp.c Examining data/xbuffy-3.3.bl.3.dfsg/led.c Examining data/xbuffy-3.3.bl.3.dfsg/boxfile.c Examining data/xbuffy-3.3.bl.3.dfsg/xbuffy.c Examining data/xbuffy-3.3.bl.3.dfsg/xbuffy.h FINAL RESULTS: data/xbuffy-3.3.bl.3.dfsg/boxfile.c:75:2: [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(next, p1); data/xbuffy-3.3.bl.3.dfsg/boxfile.c:157:4: [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(res, home); data/xbuffy-3.3.bl.3.dfsg/boxfile.c:198: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(res,envValue); data/xbuffy-3.3.bl.3.dfsg/led.c:71:7: [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. fprintf(stderr, TERMINATESTR); data/xbuffy-3.3.bl.3.dfsg/nntp.c:59:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, p); data/xbuffy-3.3.bl.3.dfsg/nntp.c:186:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s/.newsrc", getenv("HOME")); data/xbuffy-3.3.bl.3.dfsg/nntp.c:328:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "group %s", newsBox->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:239:17: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(currentBox->audioCmd); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:322:12: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (execl("/usr/lib/xbuffy/led", "led", l, amt, (char*)NULL) == -1) { data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:342:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(amt, "%s: %d", box->boxTitle, box->n); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:357:5: [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(ptr,amt); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:368:4: [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(fmtString,amt); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:377:7: [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(fmtString, amt); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:710:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s/cur", b->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:715:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s/.mh_sequences", b->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:716:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (tmp, F_OK) == 0) { data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:719:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s/.xmhcache", b->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:720:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (tmp, F_OK) == 0) { data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:753:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(currentBox->command); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:770:4: [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(lockfile, mbox); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:820:17: [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(From, buffer); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:832:17: [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(Subject, buffer); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:891:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/new", mailBox->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:893:7: [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(path,mailBox->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:922:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/new/%s",mailBox->box,de->d_name); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:924:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s",mailBox->box,de->d_name); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:939: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(From, buffer); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:944: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(Subject, buffer); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1021:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path,"%s/new",mailBox->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1023:7: [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(path,mailBox->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1355:13: [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(line, EliminatePath(currentBox->box)); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1358:13: [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(line, currentBox->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1375:13: [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(line, currentBox->box); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1458:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(versionString, "%s v%s", programName, VERSION); data/xbuffy-3.3.bl.3.dfsg/xbuffy.h:125:24: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. #define exists(fname) (access(fname, E_ACC) == 0) data/xbuffy-3.3.bl.3.dfsg/xbuffy.h:128:24: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. #define exists(fname) (access(fname, F_OK) == 0) data/xbuffy-3.3.bl.3.dfsg/xbuffy.h:129:27: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. #define canChange(fname) (access(fname, (R_OK | W_OK)) == 0) data/xbuffy-3.3.bl.3.dfsg/boxfile.c:156:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. home = (char *) getenv("HOME"); data/xbuffy-3.3.bl.3.dfsg/boxfile.c:197:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. envValue = (char *)getenv(envStr); data/xbuffy-3.3.bl.3.dfsg/nntp.c:91:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. serverName = getenv("NNTPSERVER"); data/xbuffy-3.3.bl.3.dfsg/nntp.c:186:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(fname, "%s/.newsrc", getenv("HOME")); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1229:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((mailPath = getenv("MAILPATH")) != 0) data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1233:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if ((mailPath = getenv("MAIL")) != 0) data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1283:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((newsPath = getenv("NEWSPATH")) != 0) data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1491:46: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((data.pollTime == NULL) && ((check = getenv("MAILCHECK")) != 0)) data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1589:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *homedir = getenv("HOME"); data/xbuffy-3.3.bl.3.dfsg/boxfile.c:29:8: [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 char *tokens[22] = { data/xbuffy-3.3.bl.3.dfsg/boxfile.c:55: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 tok[30]; data/xbuffy-3.3.bl.3.dfsg/boxfile.c:145: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. static char retVal[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/boxfile.c:173:11: [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 char retVal[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/boxfile.c:174:4: [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 envStr[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/boxfile.c:247: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 line[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/boxfile.c:249: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 next[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/boxfile.c:258:15: [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). if ((boxes = fopen(boxFile, "r")) == 0) data/xbuffy-3.3.bl.3.dfsg/boxfile.c:359: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). tempBox.last = atoi(next); data/xbuffy-3.3.bl.3.dfsg/boxfile.c:363:25: [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). tempBox.headerTime = atoi(next); data/xbuffy-3.3.bl.3.dfsg/boxfile.c:367:23: [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). tempBox.pollTime = atoi(next); data/xbuffy-3.3.bl.3.dfsg/boxfile.c:388: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). tempBox.led = atoi(next); data/xbuffy-3.3.bl.3.dfsg/headers.c:55: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 word[4]; int wordlen; data/xbuffy-3.3.bl.3.dfsg/led.c:69:33: [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). if (-1 == (keyboardDevice = open(KEYBOARDDEVICE, O_RDONLY))) { data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn.h:26:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(x,y,z) memcpy(y,x,z) data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn.h:26:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(x,y,z) memcpy(y,x,z) data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_append.c:38:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(els, obj->array + obj->num_el*obj->el_size, obj->el_size*num); data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_delete.c:56:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(obj->array + (index+1)*obj->el_size, data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_insert.c:49:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(obj->array + index, obj->array + (index + num), data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_insert.c:56:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(els, obj->array + obj->el_size*index, obj->el_size*num); data/xbuffy-3.3.bl.3.dfsg/libdyn/dyn_put.c:77:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(el, obj->array + index*obj->el_size, obj->el_size); data/xbuffy-3.3.bl.3.dfsg/nntp.c:77: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 line[1024]; data/xbuffy-3.3.bl.3.dfsg/nntp.c:104:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(*hp->h_addr_list, (char *) &server.sin_addr, hp->h_length); data/xbuffy-3.3.bl.3.dfsg/nntp.c:119:6: [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 (atoi(line) != 200) data/xbuffy-3.3.bl.3.dfsg/nntp.c:130: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 line[CHUNK_SIZE]; data/xbuffy-3.3.bl.3.dfsg/nntp.c:140:11: [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 ((x = atoi(line)) != 221) data/xbuffy-3.3.bl.3.dfsg/nntp.c:184: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. static char fname[512]; data/xbuffy-3.3.bl.3.dfsg/nntp.c:198: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 line[MAX_LINE]; data/xbuffy-3.3.bl.3.dfsg/nntp.c:202:11: [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). newsrc = fopen(getNewsrc(), "r"); data/xbuffy-3.3.bl.3.dfsg/nntp.c:230:23: [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). tempArt.firstNum = atol(backp); data/xbuffy-3.3.bl.3.dfsg/nntp.c:256:23: [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). tempArt.lastNum = atol(backp); data/xbuffy-3.3.bl.3.dfsg/nntp.c:296: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 line[1024]; data/xbuffy-3.3.bl.3.dfsg/nntp.c:338:6: [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 (atoi(line) != 211) data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:106:1: [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 versionString[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:293: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 amt[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:294: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 fmtString[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:307: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 l[17]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:320:8: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(amt, "%d", box->n); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:321:8: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(l, "%d", box->led); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:346:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(amt, "%d", box->n); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:705: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. char tmp[_POSIX_PATH_MAX]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:771:4: [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. strcat(lockfile, ".lock"); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:783: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 buffer[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:785: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 From[MAX_STRING], Subject[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:790: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). fp = fopen(mailBox->box, "r"); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:827:13: [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). CL = atol(p); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:880: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 buffer[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:882: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 From[MAX_STRING], Subject[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:883: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 path[_POSIX_PATH_MAX]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:926:9: [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). fp = fopen(path, "r"); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1005: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 path[_POSIX_PATH_MAX]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1344: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 line[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1447: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 name[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1452:4: [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 pause_string[10]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1489:23: [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). envPolltime = atoi(data.pollTime); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1493:28: [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 ((envPolltime = atoi(check)) < 0) data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1503:23: [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). envPriority = atoi(data.priority); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1509:25: [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). envHeadertime = atoi(data.headerTime); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1590: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 buffer[MAX_STRING]; data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:1684:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "box%d", i); data/xbuffy-3.3.bl.3.dfsg/xbuffy.h:28:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(x,y,z) memcpy(y,x,z) data/xbuffy-3.3.bl.3.dfsg/xbuffy.h:28:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(x,y,z) memcpy(y,x,z) data/xbuffy-3.3.bl.3.dfsg/headers.c:28: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). size_t len = strlen(header); data/xbuffy-3.3.bl.3.dfsg/headers.c:35: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). size_t len = strlen(header); data/xbuffy-3.3.bl.3.dfsg/led.c:84:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/xbuffy-3.3.bl.3.dfsg/led.c:86:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(150000); data/xbuffy-3.3.bl.3.dfsg/led.c:88:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/xbuffy-3.3.bl.3.dfsg/libdyn/test.c:62:40: [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 (DynAppend(obj, random_string, strlen(random_string)+1) != DYN_OK) { data/xbuffy-3.3.bl.3.dfsg/libdyn/test.c:106:52: [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 (DynInsert(obj, DynSize(obj) - 2, insert3, strlen(insert3) + data/xbuffy-3.3.bl.3.dfsg/libdyn/test.c:112:38: [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 (DynInsert(obj, 19, insert2, strlen(insert2)) != DYN_OK) { data/xbuffy-3.3.bl.3.dfsg/libdyn/test.c:117:37: [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 (DynInsert(obj, 0, insert1, strlen(insert1)+1) != DYN_OK) { data/xbuffy-3.3.bl.3.dfsg/libdyn/test.c:123:11: [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). strlen(insert1) + 1)); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:807:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fp)) != EOF && c != '\n'); /* keep reading */ data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:934:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fp)) != EOF && c != '\n'); /* keep reading */ data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:958: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(From) != 0) data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:961:13: [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). From, strlen(From)); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:963: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(Subject) != 0) { data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:966:22: [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). subjectPrefix, strlen(subjectPrefix)); data/xbuffy-3.3.bl.3.dfsg/xbuffy.c:969: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). Subject, strlen(Subject)); data/xbuffy-3.3.bl.3.dfsg/xbuffy.h:132:39: [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). #define NEWstrlen(s) (s == NULL ? 0 : strlen(s)) ANALYSIS SUMMARY: Hits = 126 Lines analyzed = 3895 in approximately 0.11 seconds (35429 lines/second) Physical Source Lines of Code (SLOC) = 2904 Hits@level = [0] 118 [1] 18 [2] 62 [3] 9 [4] 37 [5] 0 Hits@level+ = [0+] 244 [1+] 126 [2+] 108 [3+] 46 [4+] 37 [5+] 0 Hits/KSLOC@level+ = [0+] 84.022 [1+] 43.3884 [2+] 37.1901 [3+] 15.8402 [4+] 12.741 [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.