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/suck-4.3.4/active.c Examining data/suck-4.3.4/active.h Examining data/suck-4.3.4/batch.c Examining data/suck-4.3.4/batch.h Examining data/suck-4.3.4/both.c Examining data/suck-4.3.4/both.h Examining data/suck-4.3.4/both_phrases.c Examining data/suck-4.3.4/chkhistory.c Examining data/suck-4.3.4/chkhistory.h Examining data/suck-4.3.4/chkhistory_db.c Examining data/suck-4.3.4/db.c Examining data/suck-4.3.4/db.h Examining data/suck-4.3.4/dedupe.c Examining data/suck-4.3.4/dedupe.h Examining data/suck-4.3.4/killfile.c Examining data/suck-4.3.4/killfile.h Examining data/suck-4.3.4/killprg.c Examining data/suck-4.3.4/lmove.c Examining data/suck-4.3.4/lmove_phrases.c Examining data/suck-4.3.4/lpost.c Examining data/suck-4.3.4/makephrases.c Examining data/suck-4.3.4/read_db.c Examining data/suck-4.3.4/rpost.c Examining data/suck-4.3.4/rpost_phrases.c Examining data/suck-4.3.4/sample/killprg_child.c Examining data/suck-4.3.4/sample/killxover_child.c Examining data/suck-4.3.4/ssort.c Examining data/suck-4.3.4/ssort.h Examining data/suck-4.3.4/suck.c Examining data/suck-4.3.4/suck.h Examining data/suck-4.3.4/suck_phrases.c Examining data/suck-4.3.4/suckutils.c Examining data/suck-4.3.4/suckutils.h Examining data/suck-4.3.4/test_phrases.c Examining data/suck-4.3.4/testhost.c Examining data/suck-4.3.4/timer.c Examining data/suck-4.3.4/timer.h Examining data/suck-4.3.4/xover.c Examining data/suck-4.3.4/xover.h Examining data/suck-4.3.4/suck_config.h Examining data/suck-4.3.4/include/dbz.h Examining data/suck-4.3.4/libdbz/dbz.h Examining data/suck-4.3.4/libdbz/random.c Examining data/suck-4.3.4/libdbz/byteflip.c Examining data/suck-4.3.4/libdbz/dbzdbm.c Examining data/suck-4.3.4/libdbz/dbzmain.c Examining data/suck-4.3.4/libdbz/fake.c Examining data/suck-4.3.4/libdbz/dbz.c Examining data/suck-4.3.4/chkhistory_multi.c Examining data/suck-4.3.4/cndbz.h FINAL RESULTS: data/suck-4.3.4/libdbz/dbzmain.c:316:10: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (void) chmod(base_name, 0); data/suck-4.3.4/libdbz/dbzmain.c:330:10: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (void) chmod(base_name, 0600); /* hard to restore original */ data/suck-4.3.4/lmove.c:198:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if(chmod(master->active_file, LMOVE_ACTIVE_MODE) != 0) { data/suck-4.3.4/active.c:362:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. nrread = sscanf(ptr, "%s %ld %d\n", group, &lastread, &maxread); data/suck-4.3.4/active.c:423:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s %ld\n", plist->group, lastread); data/suck-4.3.4/active.c:492: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(temp->group, buf); data/suck-4.3.4/active.c:506:6: [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[1], temp->group); data/suck-4.3.4/active.c:509:6: [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,temp->group); data/suck-4.3.4/batch.c:132:8: [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, master->batchfile); data/suck-4.3.4/batch.c:135:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%d", master->batchfile, batchnr); data/suck-4.3.4/batch.c:228:3: [4] (shell) execvp: 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. execvp(args[0], (char *const *) args); data/suck-4.3.4/batch.c:322:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(linein, "IHAVE %s\r\n", msgid); data/suck-4.3.4/batch.c:427:7: [4] (shell) execlp: 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(execlp(master->post_filter, master->post_filter, msgdir, NULL) == -1) { data/suck-4.3.4/both.c:312: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(fptr, fmt, args); data/suck-4.3.4/both.c:623: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(errfile,fmt); data/suck-4.3.4/killfile.c:326: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(killp->grps[grpon].group, grpname); data/suck-4.3.4/killfile.c:443: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(fname, full_path(FP_GET, FP_MSGDIR, buf)); data/suck-4.3.4/killfile.c:444:4: [4] (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). strcat(buf, N_TMP_EXTENSION); /* add temp file extension */ data/suck-4.3.4/killfile.c:806:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reason, "%s %s %s ", killf_reasons[REASON_HEADER], curr->header, curr->string); data/suck-4.3.4/killfile.c:816:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reason,"%s %s", killf_reasons[REASON_HEADER], curr->string); data/suck-4.3.4/killfile.c:831:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reason, "%s %lu", killf_reasons[REASON_BODYBIG], temp->bodylen); data/suck-4.3.4/killfile.c:836:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reason, "%s %lu", killf_reasons[REASON_BODYSMALL], temp->bodylen); data/suck-4.3.4/killfile.c:844:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reason, "%s %s", killf_reasons[REASON_BODY], curr->string); data/suck-4.3.4/killfile.c:1123:6: [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(which->string,startline); data/suck-4.3.4/killprg.c:100: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(myargs, args); data/suck-4.3.4/killprg.c:155:5: [4] (shell) execvp: 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. execvp(prg[0], prg); data/suck-4.3.4/killprg.c:207: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(mypath, ptr); data/suck-4.3.4/killprg.c:216:6: [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(fullpath, ptr); data/suck-4.3.4/killprg.c:220:6: [4] (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). strcat(fullpath, prg); data/suck-4.3.4/killprg.c:496:4: [4] (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). strcat(buf, overp->header); data/suck-4.3.4/libdbz/dbz.c:329:41: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DEBUG(args) if (debug) { (void) printf args ; } else data/suck-4.3.4/libdbz/dbz.c:828:10: [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). (void) strcpy(p, s1); data/suck-4.3.4/libdbz/dbz.c:829:10: [4] (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). (void) strcat(p, s2); data/suck-4.3.4/libdbz/dbzmain.c:403:9: [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). (void) strcpy(keytext, lp); data/suck-4.3.4/libdbz/dbzmain.c:546:3: [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, s1, s2); data/suck-4.3.4/libdbz/dbzmain.c:549:3: [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, s1, s2buf); data/suck-4.3.4/libdbz/dbzmain.c:568:9: [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). (void) strcpy(p, s1); data/suck-4.3.4/libdbz/dbzmain.c:569:9: [4] (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). (void) strcat(p, s2); data/suck-4.3.4/libdbz/fake.c:108:11: [4] (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). (void) strcat(buf, tagch); data/suck-4.3.4/lmove.c:104: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(master.active_file,N_LMOVE_ACTIVE); data/suck-4.3.4/lmove.c:181:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s.old", master->active_file); data/suck-4.3.4/lmove.c:233:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(o_fname, "%s/%s", master->msgdir, entry->d_name); /* build full path */ data/suck-4.3.4/lmove.c:245:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(n_fname, "%s/%d", make_dirname(master->basedir, group->group), group->highnr); data/suck-4.3.4/lmove.c:256:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(n_fname, "%s/%d", make_dirname(master->basedir, group->group), group->highnr); data/suck-4.3.4/lmove.c:273:10: [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(o_fname, n_fname); /* so we can link to this file */ data/suck-4.3.4/lmove.c:401: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(master->basedir, &linein[CONFIG_BASE_LEN]); data/suck-4.3.4/lmove.c:404: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(master->active_file, &linein[CONFIG_ACTIVE_LEN]); data/suck-4.3.4/lmove.c:431:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while((i = fscanf(fpi, "%s %u %u %c", linein,&highnr,&lownr,&active_char)) != EOF) { data/suck-4.3.4/lmove.c:451:8: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if(sscanf(linein, "%s %u %u %c", group, &highnr, &lownr, &active_char) == 4) { data/suck-4.3.4/lmove.c:474: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(master->groups[i].group, group); data/suck-4.3.4/lmove.c:520:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/", master->basedir); data/suck-4.3.4/lmove.c:576:6: [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(master->active_file,argv[++loop]); data/suck-4.3.4/lmove.c:643: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(path, base); data/suck-4.3.4/lmove.c:646:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", base, group); data/suck-4.3.4/lmove.c:669:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(lockfile, "%s/%s", master->basedir, N_LMOVE_LOCKFILE); data/suck-4.3.4/lpost.c:28:10: [4] (shell) popen: 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. pfp = popen(RNEWS, "w"); data/suck-4.3.4/rpost.c:483:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "AUTHINFO USER %s\r\n", (myargs->auth).userid); data/suck-4.3.4/rpost.c:516:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "AUTHINFO PASS %s\r\n", (myargs->auth).passwd); data/suck-4.3.4/rpost.c:832: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(infilen, infile); data/suck-4.3.4/rpost.c:910:6: [4] (shell) execvp: 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(execvp(myargs->filter_args[0], myargs->filter_args) == -1) { data/suck-4.3.4/rpost.c:991: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(file, buf); data/suck-4.3.4/rpost.c:994: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(file, myargs->prefix); data/suck-4.3.4/rpost.c:998:5: [4] (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). strcat(file, buf); data/suck-4.3.4/rpost.c:1056:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file, "%s%s", batch_file, RPOST_FAIL_EXT); data/suck-4.3.4/rpost.c:1075:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(temp_path, "%s/%s", myargs->rnews_path, TEMP_ARTICLE); /* only need to do this once */ data/suck-4.3.4/rpost.c:1099:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rnews_path, "%s/%s", myargs->rnews_path, dentry->d_name); data/suck-4.3.4/sample/killprg_child.c:61: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(fptr, fmt, args); data/suck-4.3.4/sample/killxover_child.c:76: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(fptr, fmt, args); data/suck-4.3.4/suck.c:773:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. nrread = sscanf(buf, "%s %ld %d\n", group, &lastread, &maxread); data/suck-4.3.4/suck.c:819:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd,"group %s\r\n",group); data/suck-4.3.4/suck.c:1156:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. i = sscanf(linein, "!%s %ld-%ld", grpname, &nrlow, &nrhigh); data/suck-4.3.4/suck.c:1161:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd,"group %s\r\n",grpname); data/suck-4.3.4/suck.c:1284: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(grps->group, grpname); data/suck-4.3.4/suck.c:1370: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->msgnr, st_ptr); data/suck-4.3.4/suck.c:1519: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(fname, full_path(FP_GET, FP_MSGDIR, buf)); data/suck-4.3.4/suck.c:1520:3: [4] (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). strcat(buf, N_TMP_EXTENSION); /* add tmp extension */ data/suck-4.3.4/suck.c:1817: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(ptr,full_path(FP_GET, FP_DATADIR, N_OLDRC)); data/suck-4.3.4/suck.c:2154:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "AUTHINFO USER %s\r\n", master->userid); data/suck-4.3.4/suck.c:2187:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "AUTHINFO PASS %s\r\n", master->passwd); data/suck-4.3.4/suckutils.c:54:11: [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. else if(access(dirname, W_OK) != 0) { data/suck-4.3.4/suckutils.c:97: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(path, dirs[dir]); data/suck-4.3.4/suckutils.c:105:6: [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, dirs[dir]); data/suck-4.3.4/suckutils.c:110:5: [4] (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). strcat(path, &dirs[dir][1]); data/suck-4.3.4/suckutils.c:122: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(&path[i], fname); data/suck-4.3.4/suckutils.c:125:5: [4] (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). strcat(path, postfix); data/suck-4.3.4/suckutils.c:141:7: [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(fname, W_OK) == -1) { data/suck-4.3.4/suckutils.c:147:7: [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(fname, R_OK) == -1) { data/suck-4.3.4/testhost.c:278: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(cmdstr, cmds[cmd].command); data/suck-4.3.4/testhost.c:281:3: [4] (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). strcat(cmdstr, cmdargs); data/suck-4.3.4/testhost.c:290:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf2, "AUTHINFO USER %s\r\n", userid); data/suck-4.3.4/testhost.c:303:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf2, "AUTHINFO PASS %s\r\n", passwd); data/suck-4.3.4/testhost.c:386:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dates, "%s %s", indate, intime); data/suck-4.3.4/xover.c:452:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reasonstr, "%s-%s%s", xover_reasons[REASON_HEADER], tmp->header, tmp->field); data/suck-4.3.4/killprg.c:199:9: [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. ptr = getenv("PATH"); data/suck-4.3.4/libdbz/dbzmain.c:103:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "axcmvt:l:R0E:SqOiX:Yuf:p:eMUC:T:wd")) != EOF) data/suck-4.3.4/libdbz/fake.c:53:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "ms:te:d")) != EOF) data/suck-4.3.4/rpost.c:136:16: [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. myargs.host = getenv("NNTPSERVER"); /* the default */ data/suck-4.3.4/rpost.c:678:27: [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. myargs->auth.passwd = getenv("NNTP_PASS"); data/suck-4.3.4/rpost.c:679:27: [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. myargs->auth.userid = getenv("NNTP_USER"); data/suck-4.3.4/rpost.c:885:29: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). myargs->filter_outfile = tmpnam(NULL); data/suck-4.3.4/suck.c:244:16: [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. master.host = getenv("NNTPSERVER"); /* the default */ data/suck-4.3.4/suck.c:2042: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. master->userid = getenv("NNTP_USER"); data/suck-4.3.4/suck.c:2043: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. master->passwd = getenv("NNTP_PASS"); data/suck-4.3.4/testhost.c:73:9: [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. host = getenv("NNTPSERVER"); data/suck-4.3.4/testhost.c:188:14: [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. userid = getenv("NNTP_USER"); data/suck-4.3.4/testhost.c:189:14: [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. passwd = getenv("NNTP_PASS"); data/suck-4.3.4/active.c:153: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 linein[MAXLINLEN]; data/suck-4.3.4/active.c:159:12: [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((fpi = fopen(master->activefile, "r")) == NULL) { data/suck-4.3.4/active.c:334: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[MAXLINLEN+1], group[512], *ptr; data/suck-4.3.4/active.c:340:14: [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((newrc = fopen(full_path(FP_GET, FP_TMPDIR, N_NEWRC), "w" )) == NULL) { data/suck-4.3.4/active.c:345:14: [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((oldrc = fopen(full_path(FP_GET, FP_DATADIR, N_OLDRC), "r" )) == NULL) { data/suck-4.3.4/active.c:452: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[MAXLINLEN+1], *ptr; data/suck-4.3.4/active.c:457: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 errmsg[256]; data/suck-4.3.4/active.c:464:8: [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). fpi = fopen(full_path(FP_GET, FP_DATADIR, N_ACTIVE_IGNORE), "r"); data/suck-4.3.4/active.c:466: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). fpi = fopen(full_path(FP_GET_NOPOSTFIX, FP_DATADIR, N_ACTIVE_IGNORE), "r"); data/suck-4.3.4/batch.c:61:13: [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((fptr = fopen(master->batchfile, "w")) == NULL) { data/suck-4.3.4/batch.c:100: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[MAXLINLEN]; data/suck-4.3.4/batch.c:119:42: [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(stat(tptr, &sbuf) != 0 || (fpin = fopen(tptr, "r")) == NULL) { data/suck-4.3.4/batch.c:145:23: [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). else if((fptr = fopen(buf, "w")) == NULL) { data/suck-4.3.4/batch.c:189: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. const char *args[LMOVE_MAX_ARGS]; data/suck-4.3.4/batch.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 msg[MAXLINLEN+1]; data/suck-4.3.4/batch.c:260:17: [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((fp_list = fopen(fname, "r")) == NULL ) { data/suck-4.3.4/batch.c:297: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 *msgid, *resp, linein[MAXLINLEN+4]; /* the extra in case of . in first pos */ data/suck-4.3.4/batch.c:318:13: [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((fpi = fopen(msg, "r")) == NULL) { data/suck-4.3.4/batch.c:365:8: [2] (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). Risk is low because the source is a constant string. strcpy(&linein[len-1], "\r\n"); data/suck-4.3.4/both.c:160: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 sport[10]; data/suck-4.3.4/both.c:163: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[60]; // if not given by caller. NI_MAXHOST would be better, but that's ok as well. data/suck-4.3.4/both.c:197:12: [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). portnr = atoi(++ptr); /* get port number */ data/suck-4.3.4/both.c:202:2: [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(sport, "%hu", portnr); /* cause print_phrases wants all strings */ data/suck-4.3.4/both.c:307:13: [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((fptr = fopen(N_DEBUG, "a")) == NULL) { data/suck-4.3.4/both.c:324:13: [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((fptr = fopen(N_DEBUG, "a")) == NULL) { data/suck-4.3.4/both.c:336:13: [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((fptr = fopen(N_DEBUG, "a")) == NULL) { data/suck-4.3.4/both.c:380: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 buf[MAXLINLEN+MAXLINLEN+6]; data/suck-4.3.4/both.c:613: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 errfile[PATH_MAX] = { '\0' }; data/suck-4.3.4/both.c:629:36: [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(errfile[0] == '\0' || (fptr = fopen(errfile, "a")) == NULL) { data/suck-4.3.4/both.c:654: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 linein[MAXLINLEN+1]; data/suck-4.3.4/both.c:658:12: [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((fpi = fopen(fname, "r")) == NULL) { data/suck-4.3.4/both.c:750: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 linein[MAXLINLEN+1]; data/suck-4.3.4/both.c:876: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 *tptr, block[PHRASES_BLOCK_SIZE+1], *in[PHRASES_MAX_NR_VARS]; data/suck-4.3.4/both.c:932: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 strings[PHRASES_MAX_NR_VARS][12]; /* lets pray ints don't get bigger than this */ data/suck-4.3.4/both.c:940:2: [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(strings[which], "%d", nrin); data/suck-4.3.4/both.c:947: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 strings[PHRASES_MAX_NR_VARS][20]; /* lets pray longs don't get bigger than this */ data/suck-4.3.4/both.c:955:2: [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(strings[which], "%ld", nrin); data/suck-4.3.4/chkhistory.c:31: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 *cptr, linein[MAXLINLEN+1]; data/suck-4.3.4/chkhistory.c:33:14: [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((fhist = fopen(master->history_file, "r")) == NULL) { data/suck-4.3.4/db.c:70:11: [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((fd = open(fname, O_WRONLY | O_CREAT | O_TRUNC data/suck-4.3.4/db.c:139:11: [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((fd = open(fname, O_RDONLY data/suck-4.3.4/db.c:242:19: [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((master->db = open (fname, O_WRONLY | O_SYNC data/suck-4.3.4/killfile.c:112: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[MAXLINLEN+1]; data/suck-4.3.4/killfile.c:164:14: [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((fptr = fopen(full_path(Masterkill->ignore_postfix, FP_DATADIR, filename), "r")) == NULL) { data/suck-4.3.4/killfile.c:260: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[MAXLINLEN]; data/suck-4.3.4/killfile.c:273: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). else if((fptr = fopen(full_path(killp->ignore_postfix, FP_DATADIR, filename), "r")) == NULL) { data/suck-4.3.4/killfile.c:417: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[MAXLINLEN+1], *inbuf; data/suck-4.3.4/killfile.c:419: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 fname[PATH_MAX+1]; data/suck-4.3.4/killfile.c:440:4: [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(buf,"%0*ld-%d", logcount, itemon, master->nritems); data/suck-4.3.4/killfile.c:449: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((fptr = fopen(tname, "w")) == NULL) { data/suck-4.3.4/killfile.c:711:23: [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((killp->logfp = fopen(full_path(FP_GET, FP_TMPDIR, master->kill_log_name), "a")) == NULL) { data/suck-4.3.4/killfile.c:735: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 reason[MAXLINLEN]; data/suck-4.3.4/killfile.c:913: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[MAXLINLEN+1]; data/suck-4.3.4/killfile.c:924:13: [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((fptr = fopen(full_path(ignore_prefix, FP_DATADIR, fname), "r")) == NULL) { data/suck-4.3.4/killfile.c:1060: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 errmsg[256]; data/suck-4.3.4/killfile.h:26: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. unsigned char skiparray[SIZEOF_SKIPARRAY]; data/suck-4.3.4/killprg.c:91: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 *prg[KILLPRG_MAXARGS+1], *myargs = NULL, *ptr, *nptr; data/suck-4.3.4/killprg.c:194: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 fullpath[PATH_MAX+1], *ptr, *mypath, *nptr; data/suck-4.3.4/killprg.c:255: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 keepyn, keep[4], len[KILLPRG_LENGTHLEN+1]; data/suck-4.3.4/killprg.c:266:3: [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(len, "%-*d\n", KILLPRG_LENGTHLEN-1, headerlen); data/suck-4.3.4/killprg.c:307:24: [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((pkill->logfp = fopen(full_path(FP_GET, FP_TMPDIR, master->kill_log_name), "a")) == NULL) { data/suck-4.3.4/killprg.c:335: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 len[KILLPRG_LENGTHLEN+1]; data/suck-4.3.4/killprg.c:337:2: [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(len, "%-*d\n", KILLPRG_LENGTHLEN-1, 0); data/suck-4.3.4/killprg.c:414: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 *args[2] = { NULL, NULL}; data/suck-4.3.4/killprg.c:455:23: [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((killp->logfp = fopen(full_path(FP_GET, FP_TMPDIR, master->kill_log_name), "a")) == NULL) { data/suck-4.3.4/killprg.c:477: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[MAXLINLEN], len[KILLPRG_LENGTHLEN+1]; data/suck-4.3.4/killprg.c:481: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 *args[2] = { NULL, NULL}; data/suck-4.3.4/killprg.c:498:5: [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(buf, "full"); data/suck-4.3.4/killprg.c:512:5: [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(len, "%-*d\n", KILLPRG_LENGTHLEN-1, count); data/suck-4.3.4/killprg.c:566: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 keepyn, keep[4], len[KILLPRG_LENGTHLEN+1]; data/suck-4.3.4/killprg.c:581:3: [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(len, "%-*d\n", KILLPRG_LENGTHLEN-1, headerlen); data/suck-4.3.4/killprg.c:624: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 *args[2] = { NULL, NULL}; data/suck-4.3.4/libdbz/byteflip.c:12: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 in[MAXWORD]; data/suck-4.3.4/libdbz/byteflip.c:13: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 out[MAXWORD]; data/suck-4.3.4/libdbz/byteflip.c:18:8: [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). len = atoi(argv[a++]); data/suck-4.3.4/libdbz/byteflip.c:22: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). inmap[i] = atoi(argv[a++]); data/suck-4.3.4/libdbz/byteflip.c:23: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(argv[a++]) != len) data/suck-4.3.4/libdbz/byteflip.c:26:15: [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). outmap[i] = atoi(argv[a++]); data/suck-4.3.4/libdbz/dbz.c:271: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 basebuf[SHISTBUF]; /* only needed if _IOFBF exists */ data/suck-4.3.4/libdbz/dbz.c:440:6: [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). f = fopen(fn, "w"); data/suck-4.3.4/libdbz/dbz.c:459:6: [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). f = fopen(fn, "w"); data/suck-4.3.4/libdbz/dbz.c:591:6: [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). f = fopen(fn, "r"); data/suck-4.3.4/libdbz/dbz.c:646:6: [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). f = fopen(fn, "w"); data/suck-4.3.4/libdbz/dbz.c:663:6: [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). f = fopen(fn, "w"); data/suck-4.3.4/libdbz/dbz.c:700: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). dirf = fopen(dirfname, "r+"); data/suck-4.3.4/libdbz/dbz.c:702: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). dirf = fopen(dirfname, "r"); data/suck-4.3.4/libdbz/dbz.c:720: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). pagf = fopen(pagfname, "r+b"); data/suck-4.3.4/libdbz/dbz.c:722: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). pagf = fopen(pagfname, "rb"); data/suck-4.3.4/libdbz/dbz.c:753: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). basef = fopen(name, "r"); data/suck-4.3.4/libdbz/dbz.c:796:13: [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). bufpagf = fopen(pagfname, (pagronly) ? "rb" : "r+b"); data/suck-4.3.4/libdbz/dbz.c:934: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[DBZMAXKEY + 1]; data/suck-4.3.4/libdbz/dbz.c:965: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[DBZMAXKEY + 1]; data/suck-4.3.4/libdbz/dbz.c:1046:7: [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). it = fopen(basefname, "r"); data/suck-4.3.4/libdbz/dbz.c:1070: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[DBZMAXKEY + 1]; data/suck-4.3.4/libdbz/dbz.c:1122:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&value, data.dptr, SOF); data/suck-4.3.4/libdbz/dbz.c:1287: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 getbuf[MAXN]; data/suck-4.3.4/libdbz/dbz.c:1313:9: [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). return(atol(getbuf)); data/suck-4.3.4/libdbz/dbz.c:1600:3: [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 c[SOF]; data/suck-4.3.4/libdbz/dbz.c:1636:3: [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 c[SOF]; data/suck-4.3.4/libdbz/dbz.c:1738: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 cmap[MAPSIZE]; /* relies on init to '\0' */ data/suck-4.3.4/libdbz/dbzmain.c:65: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 lbuf[DEFBUF]; data/suck-4.3.4/libdbz/dbzmain.c:67: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 cbuf[DEFBUF]; data/suck-4.3.4/libdbz/dbzmain.c:139:13: [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). buflen = atoi(optarg) + 1; data/suck-4.3.4/libdbz/dbzmain.c:154:12: [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). every = atol(optarg); data/suck-4.3.4/libdbz/dbzmain.c:169: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). xxx = atoi(optarg); data/suck-4.3.4/libdbz/dbzmain.c:206:14: [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). tagsize = atol(optarg); data/suck-4.3.4/libdbz/dbzmain.c:265: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[4]; data/suck-4.3.4/libdbz/dbzmain.c:268:6: [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). f = fopen(dir, "r"); data/suck-4.3.4/libdbz/dbzmain.c:293:8: [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). in = fopen(name, "r"); data/suck-4.3.4/libdbz/dbzmain.c:312: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). base = fopen(base_name, (op == 'a') ? "a" : "r"); data/suck-4.3.4/libdbz/dbzmain.c:390: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 keytext[DBZMAXKEY+1]; data/suck-4.3.4/libdbz/dbzmain.c:437:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&place, value.dptr, sizeof(place)); data/suck-4.3.4/libdbz/dbzmain.c:451:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&place, value.dptr, sizeof(place)); data/suck-4.3.4/libdbz/dbzmain.c:484:7: [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). fd = fopen(file, "r"); data/suck-4.3.4/libdbz/dbzmain.c:512:7: [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). hf = fopen(fn, "r"); data/suck-4.3.4/libdbz/dbzmain.c:515:7: [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). pf = fopen(pn, "r"); data/suck-4.3.4/libdbz/dbzmain.c:542: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 s2buf[MAXS2+10]; data/suck-4.3.4/libdbz/dbzmain.c:548:3: [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(s2buf, "%.*s...", MAXS2, s2); data/suck-4.3.4/libdbz/fake.c:49: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[MAXSTR]; data/suck-4.3.4/libdbz/fake.c:59:9: [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). seed(atol(optarg)); data/suck-4.3.4/libdbz/fake.c:65: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). expired = atoi(optarg); data/suck-4.3.4/libdbz/fake.c:81:12: [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). for (no = atol(argv[optind]); no > 0; no--) { data/suck-4.3.4/libdbz/fake.c:95: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 tagch[2]; data/suck-4.3.4/libdbz/fake.c:102:10: [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. (void) strcat(buf, ">\tx"); data/suck-4.3.4/libdbz/fake.c:107:11: [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. (void) strcat(buf, ">\t"); data/suck-4.3.4/libdbz/fake.c:109:11: [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. (void) strcat(buf, "00000000~-"); data/suck-4.3.4/libdbz/fake.c:111:11: [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. (void) strcat(buf, ">\t1234567890~-"); data/suck-4.3.4/libdbz/fake.c:115:11: [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. (void) strcat(buf, "\tx"); data/suck-4.3.4/lmove.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 active_file[PATH_MAX+1]; data/suck-4.3.4/lmove.c:57: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 basedir[PATH_MAX+1]; data/suck-4.3.4/lmove.c:178: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 fname[PATH_MAX+1]; data/suck-4.3.4/lmove.c:186:17: [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). else if((fpo = fopen(master->active_file, "w")) == NULL) { data/suck-4.3.4/lmove.c:213: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 o_fname[PATH_MAX+1], n_fname[PATH_MAX+1]; data/suck-4.3.4/lmove.c:357: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 linein[LMOVE_MAXLINLEN+1]; data/suck-4.3.4/lmove.c:361:12: [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((fpi = fopen(fname, "r")) == NULL) { data/suck-4.3.4/lmove.c:386: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 linein[MAXLINLEN+1]; data/suck-4.3.4/lmove.c:388:12: [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((fpi = fopen(master->config_file, "r")) == NULL) { data/suck-4.3.4/lmove.c:420: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 linein[MAXLINLEN+1], group[MAXLINLEN+1], active_char; data/suck-4.3.4/lmove.c:424:12: [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((fpi = fopen(master->active_file, "r")) == NULL) { data/suck-4.3.4/lmove.c:501: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 *ptr, path[PATH_MAX+1]; data/suck-4.3.4/lmove.c:636: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 path[PATH_MAX+1]; data/suck-4.3.4/lmove.c:659: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 lockfile[PATH_MAX+1]; data/suck-4.3.4/lmove.c:670:16: [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((f_lock = fopen(lockfile, "r")) != NULL) { data/suck-4.3.4/lmove.c:700:17: [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((f_lock = fopen(lockfile, "w")) != NULL) { data/suck-4.3.4/lmove.c:722: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[MAXLINLEN]; data/suck-4.3.4/lmove.c:727:13: [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((fpi = fopen(master->phrases, "r")) == NULL) { data/suck-4.3.4/lpost.c:14: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_len]; data/suck-4.3.4/makephrases.c:62:17: [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). else if((fpo = fopen(argv[1], "w")) == NULL) { data/suck-4.3.4/makephrases.c:162:12: [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((fpo = fopen(PHRASES_H, "w")) == NULL) { data/suck-4.3.4/read_db.c:37: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). if((fdin = open(fin, O_RDONLY)) == -1) { data/suck-4.3.4/read_db.c:41:20: [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). else if((fpout = fopen(fout, "w")) == NULL) { data/suck-4.3.4/rpost.c:60: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 *filter_args[RPOST_MAXARGS]; data/suck-4.3.4/rpost.c:235:3: [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 hostname[NI_MAXHOST]; data/suck-4.3.4/rpost.c:321: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[MAXLINLEN+4], *inbuf, *ptr = NULL; data/suck-4.3.4/rpost.c:472:3: [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 *resp, buf[MAXLINLEN]; data/suck-4.3.4/rpost.c:637:31: [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((myargs->status_fptr = fopen(STATUS_LOG, "a")) == NULL) { data/suck-4.3.4/rpost.c:647:36: [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). else if((myargs->status_fptr = fopen(argv[++loop], "a")) == NULL) { data/suck-4.3.4/rpost.c:690: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). myargs->portnr = atoi(argv[++loop]); data/suck-4.3.4/rpost.c:730:16: [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). TimeOut = atoi(argv[++loop]); data/suck-4.3.4/rpost.c:790:3: [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 *args[2] ={ NULL, NULL}; data/suck-4.3.4/rpost.c:791:3: [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 infilen[MAXLINLEN+1]; data/suck-4.3.4/rpost.c:956: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). if((fpi_msg = fopen(infile, "r")) == NULL) { data/suck-4.3.4/rpost.c:975: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[MAXLINLEN+1], file[MAXLINLEN+1]; data/suck-4.3.4/rpost.c:982: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). if((fpi_batch = fopen(myargs->batch, "r")) == NULL) { data/suck-4.3.4/rpost.c:1052: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 file[MAXLINLEN+1]; data/suck-4.3.4/rpost.c:1058:13: [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((fptr = fopen(file, "a")) == NULL) { data/suck-4.3.4/rpost.c:1072:3: [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 rnews_path[PATH_MAX+1], temp_path[PATH_MAX+1], linein[MAXLINLEN]; data/suck-4.3.4/rpost.c:1104:20: [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((f_rnews = fopen(rnews_path, "r")) == NULL) { data/suck-4.3.4/rpost.c:1125:22: [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((f_temp = fopen(temp_path, "w")) == NULL) { data/suck-4.3.4/rpost.c:1169: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[MAXLINLEN]; data/suck-4.3.4/rpost.c:1173:13: [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((fpi = fopen(myargs->phrases, "r")) == NULL) { data/suck-4.3.4/sample/killprg_child.c:16: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[4096]; data/suck-4.3.4/sample/killprg_child.c:26:9: [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). len = atoi(buf); data/suck-4.3.4/sample/killprg_child.c:56:13: [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((fptr = fopen(N_DEBUG, "a")) == NULL) { data/suck-4.3.4/sample/killxover_child.c:16: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[4096]; data/suck-4.3.4/sample/killxover_child.c:25:8: [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). len = atoi(buf); data/suck-4.3.4/sample/killxover_child.c:40:9: [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). len = atoi(buf); data/suck-4.3.4/sample/killxover_child.c:71:13: [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((fptr = fopen(N_DEBUG, "a")) == NULL) { data/suck-4.3.4/suck.c:457:22: [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((master.msgs = fopen(master.status_file_name, "a")) == NULL) { data/suck-4.3.4/suck.c:749: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[MAXLINLEN], group[512]; data/suck-4.3.4/suck.c:757:12: [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((ifp = fopen(full_path(FP_GET, FP_DATADIR, N_OLDRC), "r" )) == NULL) { data/suck-4.3.4/suck.c:761:19: [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). else if((tmpfp = fopen(full_path(FP_GET, FP_TMPDIR, N_NEWRC), "w" )) == NULL) { data/suck-4.3.4/suck.c:812: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 *sp, *inbuf, cmd[MAXLINLEN]; data/suck-4.3.4/suck.c:908:6: [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(cmd, "xhdr Message-ID %ld-%ld\r\n", lastread+1,high); data/suck-4.3.4/suck.c:975:27: [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((master->innfeed = fopen(master->batchfile, "a")) == NULL) { data/suck-4.3.4/suck.c:980:27: [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((master->innfeed = fopen(full_path(FP_GET, FP_TMPDIR, master->batchfile), "a")) == NULL) { data/suck-4.3.4/suck.c:1087:29: [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((master->innfeed = fopen(full_path(FP_GET, FP_TMPDIR, master->batchfile), "a")) == NULL) { data/suck-4.3.4/suck.c:1117: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 linein[MAXLINLEN+1]; data/suck-4.3.4/suck.c:1122: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). if((fp = fopen(full_path(FP_GET, FP_DATADIR, N_SUPPLEMENTAL), "r")) != NULL) { data/suck-4.3.4/suck.c:1149:3: [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 grpname[MAX_GRP_LEN], cmd[MAXLINLEN], *resp; data/suck-4.3.4/suck.c:1164:6: [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(cmd,"xhdr Message-ID %ld\r\n",nrlow); data/suck-4.3.4/suck.c:1167:6: [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(cmd,"xhdr Message-ID %ld-%ld\r\n",nrlow,nrhigh); data/suck-4.3.4/suck.c:1201:3: [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 linein[MAXLINLEN+1]; data/suck-4.3.4/suck.c:1204:12: [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((fp = fopen(full_path(FP_GET, FP_DATADIR, N_NODOWNLOAD), "r")) != NULL) { data/suck-4.3.4/suck.c:1420:10: [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 cmd[MAXLINLEN+1]; data/suck-4.3.4/suck.c:1423:3: [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 grpcmd[MAXLINLEN+1]; data/suck-4.3.4/suck.c:1470: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[MAXLINLEN+1]; data/suck-4.3.4/suck.c:1472: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 fname[PATH_MAX+1]; data/suck-4.3.4/suck.c:1517:3: [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(buf,"%0*ld-%d", logcount, itemon ,master->nritems); data/suck-4.3.4/suck.c:1526:14: [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((fptr = fopen(tname, "w")) == NULL) { data/suck-4.3.4/suck.c:1799: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 ptr[PATH_MAX+1]; data/suck-4.3.4/suck.c:1942:27: [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). master->batch_post_nr = atoi(argv[0]); data/suck-4.3.4/suck.c:1984: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). master->rnews_size = atol(argv[0]); data/suck-4.3.4/suck.c:1990: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). master->sig_pause_time = atoi(argv[0]); data/suck-4.3.4/suck.c:1991:30: [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). master->sig_pause_nrmsgs = atoi(argv[1]); data/suck-4.3.4/suck.c:1997:26: [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). master->reconnect_nr = atoi(argv[0]); data/suck-4.3.4/suck.c:2027:20: [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). master->portnr = atoi(argv[0]); data/suck-4.3.4/suck.c:2051:24: [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). master->pause_time = atoi(argv[0]); data/suck-4.3.4/suck.c:2052:26: [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). master->pause_nrmsgs = atoi(argv[1]); data/suck-4.3.4/suck.c:2100:7: [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). x = atoi(argv[0]); data/suck-4.3.4/suck.c:2105:30: [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). master->active_lastread = atoi(argv[0]); data/suck-4.3.4/suck.c:2122:13: [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). TimeOut = atoi(argv[0]); data/suck-4.3.4/suck.c:2145:3: [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 *resp, buf[MAXLINLEN]; data/suck-4.3.4/suck.c:2231: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[MAXLINLEN]; data/suck-4.3.4/suck.c:2235:13: [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((fpi = fopen(master->phrases, "r")) == NULL) { data/suck-4.3.4/suck.h:10: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 msgnr[MAX_MSGID_LEN]; data/suck-4.3.4/suck.h:22: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 group[MAX_GRP_LEN]; data/suck-4.3.4/suck_config.h:185:24: [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 memmove(a,b,c) bcopy(b,a,c) data/suck-4.3.4/suckutils.c:84: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 dirs[FP_NR_DIRS][PATH_MAX+1] = { N_TMPDIR, N_DATADIR, N_MSGDIR }; data/suck-4.3.4/suckutils.c:85: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 path[PATH_MAX+1]; /* static so area valid after return */ data/suck-4.3.4/suckutils.c:86: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 postfix[PATH_MAX+1] = { "\0" }; data/suck-4.3.4/suckutils.c:178: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((f_lock = fopen(lockfile, "r")) != NULL) { data/suck-4.3.4/suckutils.c:208:16: [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((f_lock = fopen(lockfile, "w")) != NULL) { data/suck-4.3.4/suckutils.c:289: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 block[MAXLINLEN]; data/suck-4.3.4/suckutils.c:315:14: [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((fpi = fopen(src, "r")) == NULL) { data/suck-4.3.4/suckutils.c:319:20: [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). else if(( fpo = fopen(dest, "w")) == NULL) { data/suck-4.3.4/testhost.c:68: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 ndate[14]; /* 6 for yymmdd 6 for hhmmss and 1 for space and 1 for null */ data/suck-4.3.4/testhost.c:145:16: [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((fptr = fopen(STATUS_LOG, "a")) == NULL) { data/suck-4.3.4/testhost.c:155:21: [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). else if((fptr = fopen(argv[++loop], "a")) == NULL) { data/suck-4.3.4/testhost.c:166:15: [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). portnr = atoi(argv[++loop]); data/suck-4.3.4/testhost.c:207:16: [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). TimeOut = atoi(argv[++loop]); data/suck-4.3.4/testhost.c:273: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 *ptr, *buf, cmdstr[MAXCMDLEN], buf2[MAXCMDLEN]; data/suck-4.3.4/testhost.c:283:2: [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(cmdstr, "\r\n"); data/suck-4.3.4/testhost.c:398: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[MAXLINLEN]; data/suck-4.3.4/testhost.c:402:13: [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((fpi = fopen(phrases, "r")) == NULL) { data/suck-4.3.4/timer.c:44: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 strmins[32], strsecs[32], strbps[32]; data/suck-4.3.4/timer.c:47: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 strbytes[32]; data/suck-4.3.4/timer.c:73:4: [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(strbps,"%.1f", bps); data/suck-4.3.4/timer.c:83:3: [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(strmins, "%ld", mins); data/suck-4.3.4/timer.c:84:3: [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(strsecs, "%.2f", elapsed); data/suck-4.3.4/timer.c:89:3: [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(strbytes, "%ld", nrbytes); data/suck-4.3.4/timer.c:95:3: [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(strmins, "%ld", mins); data/suck-4.3.4/timer.c:96:3: [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(strsecs, "%.2f", elapsed); data/suck-4.3.4/timer.c:97:3: [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(strbps, "%.1f", bps); data/suck-4.3.4/xover.c:44: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 *resp, cmd[MAXLINLEN]; data/suck-4.3.4/xover.c:49:2: [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(cmd, "xover %ld-%ld\r\n", startnr,endnr); data/suck-4.3.4/xover.c:251:26: [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((masterk->logfp = fopen(full_path(FP_GET, FP_TMPDIR, master->kill_log_name), "a")) == NULL) { data/suck-4.3.4/xover.c:391: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 reasonstr[MAXLINLEN]; data/suck-4.3.4/xover.c:492: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 cmd[MAXLINLEN], *resp, *ptr, *msgid; data/suck-4.3.4/xover.c:495:2: [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(cmd, "xover %ld-%ld\r\n", startnr,endnr); data/suck-4.3.4/active.c:235:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(temp->group, groupline, len); data/suck-4.3.4/active.c:482:34: [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). else if((temp->group = malloc(strlen(buf)+1)) == NULL) { data/suck-4.3.4/active.c:511: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). i = strlen(buf); data/suck-4.3.4/batch.c:309: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). len = strlen(msgid); data/suck-4.3.4/batch.c:355: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). len = strlen(linein); data/suck-4.3.4/both.c:291:45: [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 SSL_write((SSL *)ssl_buf, outbuf, strlen(outbuf)); data/suck-4.3.4/both.c:298:26: [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 send(fd, outbuf, strlen(outbuf), 0); data/suck-4.3.4/both.c:712:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(args[counter], &linein[x], len); data/suck-4.3.4/both.c:793:6: [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). i = strlen(linein); data/suck-4.3.4/both.c:811:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lineout, &linein[stt+1], i-1); /* put the string into place */ data/suck-4.3.4/both.c:828: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). len = strlen(linein); data/suck-4.3.4/chkhistory_db.c:205: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). input.dsize = strlen(msgid) +1; data/suck-4.3.4/chkhistory_db.c:235: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). input.dsize = strlen(msgid)+1; data/suck-4.3.4/db.c:145:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, &itemnr, sizeof(itemon)); /* get the number of items */ data/suck-4.3.4/db.c:156:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(fd, ptr, sizeof(List)) == sizeof(List)) { data/suck-4.3.4/db.c:182:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, &itemnr, sizeof(itemnr)); data/suck-4.3.4/db.c:191:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(fd, gptr, sizeof(Groups)) == sizeof(Groups)) { data/suck-4.3.4/killfile.c:175: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). i = strlen(buf); data/suck-4.3.4/killfile.c:284:46: [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(strncmp(delkeep, GROUP_KEEP, (size_t) strlen(GROUP_KEEP)) == 0) { data/suck-4.3.4/killfile.c:287:53: [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). else if(strncmp(delkeep, GROUP_DELETE, (size_t) strlen(GROUP_DELETE)) == 0) { data/suck-4.3.4/killfile.c:309:12: [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). i = strlen(grpfile) - 1; data/suck-4.3.4/killfile.c:321:44: [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((killp->grps[grpon].group = malloc(strlen(grpname)+1)) == NULL) { data/suck-4.3.4/killfile.c:864:21: [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). ptr = startline + strlen(NEWSGROUP_HEADER); data/suck-4.3.4/killfile.c:937: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). i = strlen(buf); data/suck-4.3.4/killfile.c:1099:19: [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). for(i = 0; i < strlen(regex_chars) && useregex != TRUE; i++) { data/suck-4.3.4/killfile.c:1100:21: [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). for(j = 0 ; j < strlen(startline)&& useregex != TRUE; j++) { data/suck-4.3.4/killfile.c:1118:32: [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((which->string = malloc(strlen(startline)+1)) == NULL) { data/suck-4.3.4/killfile.c:1134:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(which->header, linein, len); data/suck-4.3.4/killfile.c:1158:10: [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). y=strlen(which->string); data/suck-4.3.4/killfile.c:1226: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). do_debug("checking -%s- for -%s-\n", startline+strlen(expr->header)+1, data/suck-4.3.4/killfile.c:1233: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(regexec(expr->ptrs, startline+strlen(expr->header)+1, 0, NULL, 0) == 0) { data/suck-4.3.4/killfile.c:1239:48: [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). match = find_string(debug, expr, startline+strlen(expr->header)+1); data/suck-4.3.4/killfile.c:1291: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). lenp = strlen(ptr); data/suck-4.3.4/killfile.c:1292: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). lens = strlen(str); data/suck-4.3.4/killprg.c:94:6: [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). i = strlen(args); data/suck-4.3.4/killprg.c:201:10: [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(ptr)+1; data/suck-4.3.4/killprg.c:217: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). if(ptr[strlen(ptr)-1] != '/') { data/suck-4.3.4/killprg.c:218:7: [1] (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 character. strcat(fullpath, "/"); data/suck-4.3.4/killprg.c:279:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(pkill->child.Stdout, &keep, 2) <= 0) { data/suck-4.3.4/killprg.c:494:5: [1] (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 character. strcat(buf, "\t"); /* add the separator */ data/suck-4.3.4/killprg.c:503:3: [1] (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 character. strcat(buf, "\n"); data/suck-4.3.4/killprg.c:504: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). count = strlen(buf); data/suck-4.3.4/killprg.c:570:14: [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). headerlen = strlen(linein); data/suck-4.3.4/killprg.c:594:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(pkill->child.Stdout, &keep, 2) <= 0) { data/suck-4.3.4/libdbz/dbz.c:826:21: [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). p = malloc((size_t)strlen(s1) + (size_t)strlen(s2) + 1); data/suck-4.3.4/libdbz/dbz.c:826:42: [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). p = malloc((size_t)strlen(s1) + (size_t)strlen(s2) + 1); data/suck-4.3.4/libdbz/dbz.c:1194:21: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = (df != NULL) ? getc(df) : EOF; data/suck-4.3.4/libdbz/dbz.c:1197:35: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (df != NULL && pf != NULL && getc(pf) != EOF) data/suck-4.3.4/libdbz/dbz.c:1219:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(df) != 'd' || getc(df) != 'b' || getc(df) != 'z') data/suck-4.3.4/libdbz/dbz.c:1219:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(df) != 'd' || getc(df) != 'b' || getc(df) != 'z') data/suck-4.3.4/libdbz/dbz.c:1219:44: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(df) != 'd' || getc(df) != 'b' || getc(df) != 'z') data/suck-4.3.4/libdbz/dbz.c:1225:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(df)) == ' ') data/suck-4.3.4/libdbz/dbz.c:1239:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(df) != '\n') data/suck-4.3.4/libdbz/dbz.c:1255:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(df) != '\n') data/suck-4.3.4/libdbz/dbz.c:1260:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(df)) != EOF) { data/suck-4.3.4/libdbz/dbz.c:1264:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(df) != '\n') data/suck-4.3.4/libdbz/dbz.c:1290:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(f)) == ' ') data/suck-4.3.4/libdbz/dbz.c:1299:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(f)) != EOF && c != '\n' && c != ' ') data/suck-4.3.4/libdbz/dbz.c:1309: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). if (strspn(getbuf, "-1234567890") != strlen(getbuf)) { data/suck-4.3.4/libdbz/dbzmain.c:134: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). if (strlen(optarg) > (size_t)1) data/suck-4.3.4/libdbz/dbzmain.c:181:8: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(optarg, "%ld %1s %lx", &siz, &map, &tag) != 3) { data/suck-4.3.4/libdbz/dbzmain.c:396:12: [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). p = lp + strlen(lp); data/suck-4.3.4/libdbz/dbzmain.c:406:14: [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). key.dsize = strlen(keytext)+1; data/suck-4.3.4/libdbz/dbzmain.c:411:10: [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). llen = strlen(lp); data/suck-4.3.4/libdbz/dbzmain.c:523:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nl = getc(hf); data/suck-4.3.4/libdbz/dbzmain.c:545:6: [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(s2) <= (size_t)MAXS2) data/suck-4.3.4/libdbz/dbzmain.c:565:21: [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). p = malloc((size_t)strlen(s1) + strlen(s2) + 1); data/suck-4.3.4/libdbz/dbzmain.c:565:34: [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). p = malloc((size_t)strlen(s1) + strlen(s2) + 1); data/suck-4.3.4/libdbz/fake.c:97:9: [1] (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). Risk is low because the source is a constant character. (void) strcpy(buf, "<"); data/suck-4.3.4/libdbz/fake.c:99:9: [1] (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 character. (void) strcat(buf, "@"); data/suck-4.3.4/libdbz/fake.c:117:11: [1] (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 character. (void) strcat(buf, "\t"); data/suck-4.3.4/libdbz/fake.c:132:27: [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). register char *p = buf + strlen(buf); data/suck-4.3.4/lmove.c:369: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). i = strlen(linein) - 1; data/suck-4.3.4/lmove.c:395: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). i = strlen(linein); data/suck-4.3.4/lmove.c:466:69: [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((retval == RETVAL_OK) && ((master->groups[i].group = malloc(strlen(group)+1)) == NULL)) { data/suck-4.3.4/lmove.c:521: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). y = strlen(path); /* start at end of string */ data/suck-4.3.4/lmove.c:534:6: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); /* so mode defined is mode we actually get */ data/suck-4.3.4/lmove.c:642:6: [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). i = strlen(base); data/suck-4.3.4/lmove.c:732:35: [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(strncmp( buf, SUCK_VERSION, strlen(SUCK_VERSION)) != 0) { data/suck-4.3.4/lpost.c:23: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). len=strlen(line); data/suck-4.3.4/makephrases.c:133:18: [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). for(x = 0; x < strlen(phrases[i]); x++) { data/suck-4.3.4/makephrases.c:298: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). len = strlen(phrases[i]); data/suck-4.3.4/read_db.c:47:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fdin, &count, sizeof(long)); /* get item count */ data/suck-4.3.4/read_db.c:50:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(count > 0 && read(fdin, &item, sizeof(item)) == sizeof(item)) { data/suck-4.3.4/read_db.c:61:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fdin, &count, sizeof(long)); /* get group count */ data/suck-4.3.4/read_db.c:64:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(count >= 0 && read(fdin, &grp, sizeof(grp)) == sizeof(grp)) { data/suck-4.3.4/rpost.c:337: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(buf); data/suck-4.3.4/rpost.c:350:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(&buf[len-1],"\r\n",3); data/suck-4.3.4/rpost.c:849: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). i = strlen(RPOST_FILTER_OUT); data/suck-4.3.4/rpost.c:990:57: [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(myargs->prefix == NULL || (file[0] == '@' && file[strlen(file)-1] == '@')) { data/suck-4.3.4/rpost.c:995: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). if(file[strlen(file)-1] != '/') { data/suck-4.3.4/rpost.c:996:6: [1] (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 character. strcat(file, "/"); data/suck-4.3.4/rpost.c:1001: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). i = strlen(file); data/suck-4.3.4/rpost.c:1090:10: [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(myargs->rnews_file); data/suck-4.3.4/rpost.c:1178:35: [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(strncmp( buf, SUCK_VERSION, strlen(SUCK_VERSION)) != 0) { data/suck-4.3.4/sample/killprg_child.c:21:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(0, buf, LENGTHLEN); data/suck-4.3.4/sample/killprg_child.c:29:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(0, buf, len); data/suck-4.3.4/sample/killxover_child.c:20:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(0, buf, LENGTHLEN); data/suck-4.3.4/sample/killxover_child.c:27:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(0, buf, len); data/suck-4.3.4/sample/killxover_child.c:35:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(0, buf, LENGTHLEN); data/suck-4.3.4/sample/killxover_child.c:43:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(0, buf, len); data/suck-4.3.4/suck.c:1039: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). if(strlen(grpname) > grplen) { data/suck-4.3.4/suck.c:1040: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). grplen = strlen(grpname); data/suck-4.3.4/suck.c:1208: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). i = strlen(linein) - 1; /* so it points at last char */ data/suck-4.3.4/suck.c:1365:12: [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). else if(strlen(st_ptr) >= MAX_MSGID_LEN) { data/suck-4.3.4/suck.c:2240:35: [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(strncmp( buf, SUCK_VERSION, strlen(SUCK_VERSION)) != 0) { data/suck-4.3.4/suckutils.c:114: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). i = strlen(path); data/suck-4.3.4/suckutils.c:132:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(postfix, fname, sizeof(postfix)); data/suck-4.3.4/suckutils.c:159:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dirs[dir], fname, sizeof(dirs[0])); data/suck-4.3.4/testhost.c:280:3: [1] (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 character. strcat(cmdstr, " "); data/suck-4.3.4/testhost.c:374:10: [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). else if(strlen(indate) != 6 || strlen(intime) != 6) { data/suck-4.3.4/testhost.c:374:33: [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). else if(strlen(indate) != 6 || strlen(intime) != 6) { data/suck-4.3.4/testhost.c:407:35: [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(strncmp( buf, SUCK_VERSION, strlen(SUCK_VERSION)) != 0) { data/suck-4.3.4/xover.c:314: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). len = strlen(resp); data/suck-4.3.4/xover.c:336:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp->header, resp, len); /* so we get the colon */ ANALYSIS SUMMARY: Hits = 471 Lines analyzed = 15158 in approximately 0.46 seconds (32817 lines/second) Physical Source Lines of Code (SLOC) = 12112 Hits@level = [0] 129 [1] 115 [2] 250 [3] 13 [4] 90 [5] 3 Hits@level+ = [0+] 600 [1+] 471 [2+] 356 [3+] 106 [4+] 93 [5+] 3 Hits/KSLOC@level+ = [0+] 49.5376 [1+] 38.8871 [2+] 29.3923 [3+] 8.75165 [4+] 7.67834 [5+] 0.247688 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.