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/nfdump-1.6.20/bin/applybits_inline.c Examining data/nfdump-1.6.20/bin/bookkeeper.c Examining data/nfdump-1.6.20/bin/bookkeeper.h Examining data/nfdump-1.6.20/bin/collector.c Examining data/nfdump-1.6.20/bin/collector.h Examining data/nfdump-1.6.20/bin/collector_inline.c Examining data/nfdump-1.6.20/bin/content_dns.c Examining data/nfdump-1.6.20/bin/content_dns.h Examining data/nfdump-1.6.20/bin/expire.c Examining data/nfdump-1.6.20/bin/expire.h Examining data/nfdump-1.6.20/bin/exporter.c Examining data/nfdump-1.6.20/bin/exporter.h Examining data/nfdump-1.6.20/bin/filter.h Examining data/nfdump-1.6.20/bin/flist.c Examining data/nfdump-1.6.20/bin/flist.h Examining data/nfdump-1.6.20/bin/flowtree.c Examining data/nfdump-1.6.20/bin/flowtree.h Examining data/nfdump-1.6.20/bin/ft2nfdump.c Examining data/nfdump-1.6.20/bin/fts_compat.c Examining data/nfdump-1.6.20/bin/fts_compat.h Examining data/nfdump-1.6.20/bin/heapsort_inline.c Examining data/nfdump-1.6.20/bin/inline.c Examining data/nfdump-1.6.20/bin/ipconv.c Examining data/nfdump-1.6.20/bin/ipconv.h Examining data/nfdump-1.6.20/bin/ipfix.c Examining data/nfdump-1.6.20/bin/ipfix.h Examining data/nfdump-1.6.20/bin/ipfrag.c Examining data/nfdump-1.6.20/bin/ipfrag.h Examining data/nfdump-1.6.20/bin/launch.c Examining data/nfdump-1.6.20/bin/launch.h Examining data/nfdump-1.6.20/bin/lz4.c Examining data/nfdump-1.6.20/bin/lz4.h Examining data/nfdump-1.6.20/bin/lzoconf.h Examining data/nfdump-1.6.20/bin/lzodefs.h Examining data/nfdump-1.6.20/bin/minilzo.c Examining data/nfdump-1.6.20/bin/minilzo.h Examining data/nfdump-1.6.20/bin/netflow_pcap.c Examining data/nfdump-1.6.20/bin/netflow_pcap.h Examining data/nfdump-1.6.20/bin/netflow_v1.c Examining data/nfdump-1.6.20/bin/netflow_v1.h Examining data/nfdump-1.6.20/bin/netflow_v5_v7.c Examining data/nfdump-1.6.20/bin/netflow_v5_v7.h Examining data/nfdump-1.6.20/bin/netflow_v9.c Examining data/nfdump-1.6.20/bin/netflow_v9.h Examining data/nfdump-1.6.20/bin/nfanon.c Examining data/nfdump-1.6.20/bin/nfcapd.c Examining data/nfdump-1.6.20/bin/nfdump.c Examining data/nfdump-1.6.20/bin/nfdump.h Examining data/nfdump-1.6.20/bin/nfdump_inline.c Examining data/nfdump-1.6.20/bin/nfexpire.c Examining data/nfdump-1.6.20/bin/nfexport.c Examining data/nfdump-1.6.20/bin/nfexport.h Examining data/nfdump-1.6.20/bin/nffile.c Examining data/nfdump-1.6.20/bin/nffile.h Examining data/nfdump-1.6.20/bin/nffileV2.h Examining data/nfdump-1.6.20/bin/nffile_inline.c Examining data/nfdump-1.6.20/bin/nfgen.c Examining data/nfdump-1.6.20/bin/nflowcache.c Examining data/nfdump-1.6.20/bin/nflowcache.h Examining data/nfdump-1.6.20/bin/nfnet.c Examining data/nfdump-1.6.20/bin/nfnet.h Examining data/nfdump-1.6.20/bin/nfpcapd.c Examining data/nfdump-1.6.20/bin/nfprof.c Examining data/nfdump-1.6.20/bin/nfprof.h Examining data/nfdump-1.6.20/bin/nfprofile.c Examining data/nfdump-1.6.20/bin/nfreader.c Examining data/nfdump-1.6.20/bin/nfreplay.c Examining data/nfdump-1.6.20/bin/nfstat.c Examining data/nfdump-1.6.20/bin/nfstat.h Examining data/nfdump-1.6.20/bin/nfstatfile.c Examining data/nfdump-1.6.20/bin/nfstatfile.h Examining data/nfdump-1.6.20/bin/nftest.c Examining data/nfdump-1.6.20/bin/nftree.c Examining data/nfdump-1.6.20/bin/nftree.h Examining data/nfdump-1.6.20/bin/nfx.c Examining data/nfdump-1.6.20/bin/nfx.h Examining data/nfdump-1.6.20/bin/output_csv.c Examining data/nfdump-1.6.20/bin/output_csv.h Examining data/nfdump-1.6.20/bin/output_fmt.c Examining data/nfdump-1.6.20/bin/output_fmt.h Examining data/nfdump-1.6.20/bin/output_json.c Examining data/nfdump-1.6.20/bin/output_json.h Examining data/nfdump-1.6.20/bin/output_pipe.c Examining data/nfdump-1.6.20/bin/output_pipe.h Examining data/nfdump-1.6.20/bin/output_raw.c Examining data/nfdump-1.6.20/bin/output_raw.h Examining data/nfdump-1.6.20/bin/output_util.c Examining data/nfdump-1.6.20/bin/output_util.h Examining data/nfdump-1.6.20/bin/panonymizer.c Examining data/nfdump-1.6.20/bin/panonymizer.h Examining data/nfdump-1.6.20/bin/pcap_reader.c Examining data/nfdump-1.6.20/bin/pcap_reader.h Examining data/nfdump-1.6.20/bin/pcaproc.c Examining data/nfdump-1.6.20/bin/pcaproc.h Examining data/nfdump-1.6.20/bin/profile.c Examining data/nfdump-1.6.20/bin/profile.h Examining data/nfdump-1.6.20/bin/rbtree.h Examining data/nfdump-1.6.20/bin/rijndael.c Examining data/nfdump-1.6.20/bin/rijndael.h Examining data/nfdump-1.6.20/bin/sfcapd.c Examining data/nfdump-1.6.20/bin/sflow.h Examining data/nfdump-1.6.20/bin/sflow_nfdump.c Examining data/nfdump-1.6.20/bin/sflow_nfdump.h Examining data/nfdump-1.6.20/bin/sflow_process.c Examining data/nfdump-1.6.20/bin/sflow_process.h Examining data/nfdump-1.6.20/bin/sflow_v2v4.h Examining data/nfdump-1.6.20/bin/util.c Examining data/nfdump-1.6.20/bin/util.h Examining data/nfdump-1.6.20/extra/nftrack/nftrack.c Examining data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c Examining data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.h Examining data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c Examining data/nfdump-1.6.20/extra/nftrack/nftrack_stat.h FINAL RESULTS: data/nfdump-1.6.20/bin/flist.c:1158:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(path, dir, MAXPATHLEN-1); data/nfdump-1.6.20/bin/launch.c:230:9: [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, args); data/nfdump-1.6.20/bin/lz4.c:341:21: [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, __FILE__ ": "); \ data/nfdump-1.6.20/bin/lz4.c:342:21: [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, __VA_ARGS__); \ data/nfdump-1.6.20/bin/output_fmt.c:598:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(h, STRINGSIZE-1-strlen(h), format, ""); data/nfdump-1.6.20/bin/output_fmt.c:607:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(h, STRINGSIZE-1-strlen(h), format, ""); data/nfdump-1.6.20/bin/util.c:168:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(string, 511, format, var_args); data/nfdump-1.6.20/bin/util.c:174:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(string, 511, format, var_args); data/nfdump-1.6.20/bin/util.c:187:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(string, 511, format, var_args); data/nfdump-1.6.20/bin/util.c:193:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(string, 511, format, var_args); data/nfdump-1.6.20/bin/util.h:48:26: [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 dbg_printf(...) printf(__VA_ARGS__) data/nfdump-1.6.20/bin/bookkeeper.c:89:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if ( realpath(str, cleanPath) == NULL ) { data/nfdump-1.6.20/bin/collector.c:185:15: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *path = realpath(q, NULL); data/nfdump-1.6.20/bin/ft2nfdump.c:331: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 ((i = getopt(argc, argv, "jzEVc:hmr:w:?")) != -1) data/nfdump-1.6.20/bin/nfanon.c:384: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, "K:L:r:M:R:w:")) != EOF) { data/nfdump-1.6.20/bin/nfcapd.c:790: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, "46ef:whEVI:DB:b:jl:J:M:n:p:P:R:S:s:T:t:x:Xru:g:yzZ")) != EOF) { data/nfdump-1.6.20/bin/nfcapd.c:940:15: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. datadir = realpath(datadir, NULL); data/nfdump-1.6.20/bin/nfdump.c:707: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, "6aA:Bbc:D:E:s:hn:i:jf:qyzr:v:w:J:K:M:NImO:R:XZt:TVv:x:l:L:o:")) != EOF) { data/nfdump-1.6.20/bin/nfexpire.c:204: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, "e:hl:L:T:Ypr:s:t:u:w:")) != EOF) { data/nfdump-1.6.20/bin/nfexpire.c:278:12: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. datadir = realpath(datadir, NULL); data/nfdump-1.6.20/bin/nfgen.c:173: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, "h")) != EOF) { data/nfdump-1.6.20/bin/nfpcapd.c:1228: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, "B:DEI:e:g:hi:j:r:s:l:p:P:t:u:S:T:Vyz")) != EOF) { data/nfdump-1.6.20/bin/nfprofile.c:501: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, "D:HIL:p:P:hi:f:J;r:n:M:S:t:VzZ")) != EOF) { data/nfdump-1.6.20/bin/nfreader.c:290: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, "L:r:M:R:")) != EOF) { data/nfdump-1.6.20/bin/nfreplay.c:452: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, "46BhH:i:K:L:p:d:c:b:j:r:f:t:v:z:VY")) != EOF) { data/nfdump-1.6.20/bin/sfcapd.c:719: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, "46ewhEVI:DB:b:f:jl:n:p:J:P:R:S:T:t:x:ru:g:zZ")) != EOF) { data/nfdump-1.6.20/extra/nftrack/nftrack.c:307: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, "d:hln:pr:st:w:AIM:L:R:SV")) != EOF) { data/nfdump-1.6.20/bin/bookkeeper.c:87: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 cleanPath[MAXPATHLEN]; data/nfdump-1.6.20/bin/bookkeeper.c:497:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)tmp_books, (void *)bookkeeper, sizeof(bookkeeper_t)); data/nfdump-1.6.20/bin/bookkeeper.c:580: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 string[32]; data/nfdump-1.6.20/bin/collector.c:99: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 *p, *q, s[MAXPATHLEN]; data/nfdump-1.6.20/bin/collector.c:221: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 s[MAXPATHLEN]; data/nfdump-1.6.20/bin/collector.c:289: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 *s, ident[100], path[MAXPATHLEN]; data/nfdump-1.6.20/bin/collector.c:515: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/collector.h: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 Ident[IDENTLEN]; data/nfdump-1.6.20/bin/collector_inline.c:38: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 as[100]; data/nfdump-1.6.20/bin/content_dns.c:143:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/nfdump-1.6.20/bin/content_dns.c:154: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 addr[INET6_ADDRSTRLEN]; data/nfdump-1.6.20/bin/content_dns.c:157:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)sa6, *p, 16); data/nfdump-1.6.20/bin/content_dns.c:168: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 dn[DN_LENGTH]; data/nfdump-1.6.20/bin/expire.c:266: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 first_timestring[16], last_timestring[16]; data/nfdump-1.6.20/bin/expire.c:372:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, s1[32], s2[32]; data/nfdump-1.6.20/bin/exporter.c:149: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/exporter.c:215:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)&(*sampler)->info, (void *)sampler_record, sizeof(sampler_info_record_t)); data/nfdump-1.6.20/bin/exporter.c:256:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(rec, stat_record, stat_record->header.size); data/nfdump-1.6.20/bin/exporter.c:399: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/flist.c:456:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAXPATHLEN]; data/nfdump-1.6.20/bin/flist.c:620: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 pathbuff[MAXPATHLEN]; data/nfdump-1.6.20/bin/flist.c:835: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 path[MAXPATHLEN]; data/nfdump-1.6.20/bin/flist.c:945:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAXPATHLEN]; data/nfdump-1.6.20/bin/flist.c:1105: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 s[MAXPATHLEN]; data/nfdump-1.6.20/bin/flist.c:1122: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 subpath[255]; data/nfdump-1.6.20/bin/flist.c:1140: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 subpath[255]; data/nfdump-1.6.20/bin/flist.c:1150: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 *p, path[MAXPATHLEN]; data/nfdump-1.6.20/bin/ft2nfdump.c:349:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limitflows = atoi(optarg); data/nfdump-1.6.20/bin/ft2nfdump.c:392:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(ftfile, O_RDONLY, 0); data/nfdump-1.6.20/bin/fts_compat.c:205:44: [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 (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0) data/nfdump-1.6.20/bin/fts_compat.c:330:24: [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 ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) { data/nfdump-1.6.20/bin/fts_compat.c:421:9: [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). open(".", O_RDONLY, 0)) < 0) { data/nfdump-1.6.20/bin/fts_compat.c:558:12: [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(".", O_RDONLY, 0)) < 0) data/nfdump-1.6.20/bin/fts_compat.c:1109:22: [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 < 0 && (fd = open(path, O_RDONLY)) == -1) data/nfdump-1.6.20/bin/fts_compat.h:116: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 fts_name[1]; /* file name */ data/nfdump-1.6.20/bin/ipconv.c:151:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, tmp, sizeof(tmp)); data/nfdump-1.6.20/bin/ipconv.c:234:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, tmp, sizeof(tmp)); data/nfdump-1.6.20/bin/ipconv.c:241: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 addrstr[128]; data/nfdump-1.6.20/bin/ipconv.c:242: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 reverse[256]; data/nfdump-1.6.20/bin/ipconv.c:315: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((void *)&_res.nsaddr_list[0].sin_addr, (void *)host->h_addr_list[0], (size_t)host->h_length); data/nfdump-1.6.20/bin/ipfix.c:379: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/ipfrag.c:199: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 src_s[16], dst_s[16]; data/nfdump-1.6.20/bin/ipfrag.c:336:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(n->data + first, data, *length); data/nfdump-1.6.20/bin/launch.c:117: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 *q, *s, tmp[16]; data/nfdump-1.6.20/bin/launch.c:164:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&q[i], s, strlen(s)); data/nfdump-1.6.20/bin/launch.c:322: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 *args[MAXARGS]; data/nfdump-1.6.20/bin/launch.h:45: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[MAXPATHLEN]; // %f file name data/nfdump-1.6.20/bin/launch.h:46: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 tstring[MAXTIMESTRING]; // %t 14 needed for YYYYmmddHHMMSS + opt. timezone data/nfdump-1.6.20/bin/lz4.c:251:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(memPtr, &value, sizeof(value)); data/nfdump-1.6.20/bin/lz4.c:256:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(memPtr, &value, sizeof(value)); data/nfdump-1.6.20/bin/lz4.c:285:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst,src,8); data/nfdump-1.6.20/bin/lz4.c:727: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. memcpy(op, anchor, lastRun); data/nfdump-1.6.20/bin/lz4.c:944: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. memcpy(op, anchor, lastRunSize); data/nfdump-1.6.20/bin/lz4.c:1225:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op, ip, 16); op += ll; ip += ll + 2 /*offset*/; data/nfdump-1.6.20/bin/lz4.c:1226:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op, matchPtr, 18); op += ml; data/nfdump-1.6.20/bin/lz4.c:1254:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op, ip, length); data/nfdump-1.6.20/bin/lz4.c:1293:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op, dictEnd - copySize, copySize); data/nfdump-1.6.20/bin/lz4.c:1300:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op, lowPrefix, restSize); data/nfdump-1.6.20/bin/lz4.c:1314:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op+4, match, 4); data/nfdump-1.6.20/bin/lzodefs.h:1789:73: [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. # define __lzo_byte_struct(s,n) __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end() data/nfdump-1.6.20/bin/lzodefs.h:1790:76: [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. # define __lzo_byte_struct_ma(s,n) __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end() data/nfdump-1.6.20/bin/lzodefs.h:1792:61: [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. # define __lzo_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__)); data/nfdump-1.6.20/bin/lzodefs.h:1793:61: [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. # define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); data/nfdump-1.6.20/bin/minilzo.c:1809:73: [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. # define __lzo_byte_struct(s,n) __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end() data/nfdump-1.6.20/bin/minilzo.c:1810:76: [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. # define __lzo_byte_struct_ma(s,n) __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end() data/nfdump-1.6.20/bin/minilzo.c:1812:61: [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. # define __lzo_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__)); data/nfdump-1.6.20/bin/minilzo.c:1813:61: [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. # define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); data/nfdump-1.6.20/bin/minilzo.c:3450:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # undef memcpy data/nfdump-1.6.20/bin/minilzo.c:3451: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. # define memcpy(a,b,c) lzo_memcpy(a,b,c) data/nfdump-1.6.20/bin/minilzo.c:3454:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define lzo_memcpy(a,b,c) memcpy(a,b,c) data/nfdump-1.6.20/bin/minilzo.c:3683:41: [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. struct lzo_memops_TU2_struct { unsigned char a[2]; } __lzo_may_alias; data/nfdump-1.6.20/bin/minilzo.c:3698:41: [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. struct lzo_memops_TU4_struct { unsigned char a[4]; } __lzo_may_alias; data/nfdump-1.6.20/bin/minilzo.c:3713:41: [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. struct lzo_memops_TU8_struct { unsigned char a[8]; } __lzo_may_alias; data/nfdump-1.6.20/bin/minilzo.c:4366:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy(dest, src, len); data/nfdump-1.6.20/bin/minilzo.c:4431:14: [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 b[2*LZO_MAX(8,sizeof(lzo_uint))]; data/nfdump-1.6.20/bin/netflow_pcap.c:165:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)pcap_extension_map, (void *)pcap_extension_info.map, pcap_extension_info.map->size); data/nfdump-1.6.20/bin/netflow_v1.c:175: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/netflow_v1.c:213:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)(*e)->extension_map, (void *)v1_extension_info.map, v1_extension_info.map->size); data/nfdump-1.6.20/bin/netflow_v5_v7.c:188: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/netflow_v5_v7.c:244:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)(*e)->extension_map, (void *)v5_extension_info.map, v5_extension_info.map->size); data/nfdump-1.6.20/bin/netflow_v9.c:488: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/netflow_v9.c:1721:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)&out[output_offset],(void *)&in[input_offset],20); data/nfdump-1.6.20/bin/netflow_v9.c:1725:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)&out[output_offset],(void *)&in[input_offset],65); data/nfdump-1.6.20/bin/netflow_v9.c:2631:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer->buff_ptr, (void *)&master_record->first, 16); data/nfdump-1.6.20/bin/netflow_v9.c:2635:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer->buff_ptr, (void *)&icmp,2); data/nfdump-1.6.20/bin/netflow_v9.c:2646:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer->buff_ptr, master_record->ip_union._ip_64.addr, 4 * sizeof(uint64_t)); data/nfdump-1.6.20/bin/netflow_v9.c:2884:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer->buff_ptr, (void *)template->template_flowset, template->flowset_length); data/nfdump-1.6.20/bin/netflow_v9.c:2923:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer->buff_ptr, (void *)template->template_flowset, template->flowset_length); data/nfdump-1.6.20/bin/netflow_v9.c:2951:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer->buff_ptr, (void *)template->template_flowset, template->flowset_length); data/nfdump-1.6.20/bin/nfanon.c:177: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 outfile[MAXPATHLEN], *cfile; data/nfdump-1.6.20/bin/nfanon.c:225:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)nffile_w->stat_record, (void *)nffile_r->stat_record, sizeof(stat_record_t)); data/nfdump-1.6.20/bin/nfanon.c:286:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)nffile_w->stat_record, (void *)nffile_r->stat_record, sizeof(stat_record_t)); data/nfdump-1.6.20/bin/nfanon.c:381: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 CryptoPAnKey[32]; data/nfdump-1.6.20/bin/nfcapd.c:268:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_RDONLY); data/nfdump-1.6.20/bin/nfcapd.c:273:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_WRONLY); data/nfdump-1.6.20/bin/nfcapd.c:278:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_WRONLY); data/nfdump-1.6.20/bin/nfcapd.c:305:42: [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). newuid = pw_entry ? pw_entry->pw_uid : atol(userid); data/nfdump-1.6.20/bin/nfcapd.c:315:42: [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). newgid = gr_entry ? gr_entry->gr_gid : atol(groupid); data/nfdump-1.6.20/bin/nfcapd.c:463:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *subdir, fmt[MAXTIMESTRING]; data/nfdump-1.6.20/bin/nfcapd.c:486:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nfcapd_filename[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfcapd.c:487:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error[255]; data/nfdump-1.6.20/bin/nfcapd.c:743: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 *bindhost, *datadir, pidstr[32], *launch_process; data/nfdump-1.6.20/bin/nfcapd.c:745: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 *Ident, *dynsrcdir, *time_extension, pidfile[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfcapd.c:877:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfcapd.c:951: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). subdir_index = atoi(optarg); data/nfdump-1.6.20/bin/nfcapd.c:954: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). twin = atoi(optarg); data/nfdump-1.6.20/bin/nfcapd.c:1085:10: [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). pidf = open(pidfile, O_RDONLY, 0); data/nfdump-1.6.20/bin/nfcapd.c:1088:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/nfdump-1.6.20/bin/nfcapd.c:1097:25: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). unsigned long pid = atol(s); data/nfdump-1.6.20/bin/nfcapd.c:1136:15: [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). int pidf = open(pidfile, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/nfdump-1.6.20/bin/nfdump.c:96: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 Ident[IDENTLEN]; data/nfdump-1.6.20/bin/nfdump.c:319: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 byte_str[NUMBER_STRING_SIZE], packet_str[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/nfdump.c:320: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 bps_str[NUMBER_STRING_SIZE], pps_str[NUMBER_STRING_SIZE], bpp_str[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/nfdump.c:637:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)nffile_w->stat_record, (void *)&stat_record, sizeof(stat_record_t)); data/nfdump-1.6.20/bin/nfdump.c:667: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 Ident[IDENTLEN]; data/nfdump-1.6.20/bin/nfdump.c:777: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). limitRecords = atoi(optarg); data/nfdump-1.6.20/bin/nfdump.c:860: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). topN = atoi(optarg); data/nfdump-1.6.20/bin/nfdump.c:878:22: [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). ModifyCompress = atoi(optarg); data/nfdump-1.6.20/bin/nfdump.c:1078:9: [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). ffd = open(ffile, O_RDONLY); data/nfdump-1.6.20/bin/nfdump.h:659: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 username[72]; data/nfdump-1.6.20/bin/nfexpire.c:112:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char stringbuf[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfexport.c:205:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)new_map, (void *)SourceMap, SourceMap->size); data/nfdump-1.6.20/bin/nffile.c:193:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:231:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:263:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:294:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:331:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:371:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:425:16: [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). nffile->fd = open(filename, O_RDONLY); data/nfdump-1.6.20/bin/nffile.c:524:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDWR); data/nfdump-1.6.20/bin/nffile.c:703:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); data/nfdump-1.6.20/bin/nffile.c:768:15: [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). nffile->fd = open(filename, O_RDWR | O_APPEND, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); data/nfdump-1.6.20/bin/nffile.c:931:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); data/nfdump-1.6.20/bin/nffile.c:1182: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 *filename, outfile[MAXPATHLEN]; data/nfdump-1.6.20/bin/nffile.c:1371:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDONLY); data/nfdump-1.6.20/bin/nffile.h:121: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 ident[IDENTLEN]; // string identifier for this file data/nfdump-1.6.20/bin/nffile_inline.c:101:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)output_record, (void *)input_record, COMMON_RECORD_DATA_SIZE); data/nfdump-1.6.20/bin/nffile_inline.c:122:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)output_record->ip_union._ip_64.addr, p, 4 * sizeof(uint64_t)); data/nfdump-1.6.20/bin/nffile_inline.c:502:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)common_record, (void *)master_record, size); data/nfdump-1.6.20/bin/nffile_inline.c:511:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, (void *)master_record->ip_union._ip_64.addr, 4 * sizeof(uint64_t)); data/nfdump-1.6.20/bin/nffile_inline.c:813:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_ptr, record, required); data/nfdump-1.6.20/bin/nfgen.c:486:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_ptr, (void *)extension_info.map, extension_info.map->size); data/nfdump-1.6.20/bin/nfgen.c:506:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_ptr, (void *)extension_info.map, extension_info.map->size); data/nfdump-1.6.20/bin/nfgen.c:525:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile->buff_ptr, (void *)extension_info.map, extension_info.map->size); data/nfdump-1.6.20/bin/nflowcache.c:394:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)&record->flowrecord, (void *)raw_record, raw_record->size); data/nfdump-1.6.20/bin/nflowcache.c:418:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)&record->flowrecord, (void *)raw_record, raw_record->size); data/nfdump-1.6.20/bin/nflowcache.c:683: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). subnet = atoi(q+1); data/nfdump-1.6.20/bin/nfnet.c:224:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(addr, res->ai_addr, res->ai_addrlen); data/nfdump-1.6.20/bin/nfnet.c:417:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(addr, res->ai_addr, res->ai_addrlen); data/nfdump-1.6.20/bin/nfnet.c:455:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&mreq6.ipv6mr_multiaddr, &(((struct sockaddr_in6 *)addr)->sin6_addr), sizeof(struct in6_addr)); data/nfdump-1.6.20/bin/nfpcapd.c:300:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_RDONLY); data/nfdump-1.6.20/bin/nfpcapd.c:305:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_WRONLY); data/nfdump-1.6.20/bin/nfpcapd.c:310:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_WRONLY); data/nfdump-1.6.20/bin/nfpcapd.c:337:42: [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). newuid = pw_entry ? pw_entry->pw_uid : atol(userid); data/nfdump-1.6.20/bin/nfpcapd.c:347:42: [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). newgid = gr_entry ? gr_entry->gr_gid : atol(groupid); data/nfdump-1.6.20/bin/nfpcapd.c:378: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 errbuf[PCAP_ERRBUF_SIZE]; data/nfdump-1.6.20/bin/nfpcapd.c:486: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). fp = fopen(pcap_file, "rb"); data/nfdump-1.6.20/bin/nfpcapd.c:498: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 errbuf[PCAP_ERRBUF_SIZE]; data/nfdump-1.6.20/bin/nfpcapd.c:665:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char FullName[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfpcapd.c:666:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char netflowFname[128]; data/nfdump-1.6.20/bin/nfpcapd.c:667:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error[256]; data/nfdump-1.6.20/bin/nfpcapd.c:668:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *subdir, fmt[24]; data/nfdump-1.6.20/bin/nfpcapd.c:822: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 pcap_dumpfile[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfpcapd.c:883:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char FullName[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfpcapd.c:884:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pcapFname[128]; data/nfdump-1.6.20/bin/nfpcapd.c:885:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error[256]; data/nfdump-1.6.20/bin/nfpcapd.c:886:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *subdir, fmt[24]; data/nfdump-1.6.20/bin/nfpcapd.c:1199: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 *device, *pcapfile, *filter, *datadir, *pcap_datadir, *extension_tags, pidfile[MAXPATHLEN], pidstr[32]; data/nfdump-1.6.20/bin/nfpcapd.c:1245:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cache_size = atoi(optarg); data/nfdump-1.6.20/bin/nfpcapd.c:1286: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). snaplen = atoi(optarg); data/nfdump-1.6.20/bin/nfpcapd.c:1305: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). active = atoi(s); data/nfdump-1.6.20/bin/nfpcapd.c:1306: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). inactive = atoi(sep); data/nfdump-1.6.20/bin/nfpcapd.c:1313: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). t_win = atoi(optarg); data/nfdump-1.6.20/bin/nfpcapd.c:1347:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfpcapd.c:1364: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). subdir_index = atoi(optarg); data/nfdump-1.6.20/bin/nfpcapd.c:1443:10: [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). pidf = open(pidfile, O_RDONLY, 0); data/nfdump-1.6.20/bin/nfpcapd.c:1446:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/nfdump-1.6.20/bin/nfpcapd.c:1456:25: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). unsigned long pid = atol(s); data/nfdump-1.6.20/bin/nfpcapd.c:1489:15: [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). int pidf = open(pidfile, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/nfdump-1.6.20/bin/nfprofile.c:74: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 Ident[IDENTLEN]; data/nfdump-1.6.20/bin/nfprofile.c:77:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char influxdb_url[1024]=""; data/nfdump-1.6.20/bin/nfprofile.c:308: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 line[512], path[MAXPATHLEN], *p, *q, *s; data/nfdump-1.6.20/bin/nfprofile.c:530: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). subdir_index = atoi(optarg); data/nfdump-1.6.20/bin/nfprofile.c:540: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). tslot = atoi(optarg); data/nfdump-1.6.20/bin/nfreader.c:106:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char as[40], ds[40], datestr1[64], datestr2[64]; data/nfdump-1.6.20/bin/nfreader.c:211:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[1024]; data/nfdump-1.6.20/bin/nfreplay.c:497: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). delay = atoi(optarg); data/nfdump-1.6.20/bin/nfreplay.c:500: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). netflow_version = atoi(optarg); data/nfdump-1.6.20/bin/nfreplay.c:507: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). count = atoi(optarg); data/nfdump-1.6.20/bin/nfreplay.c:510:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sockbuff_size = atoi(optarg); data/nfdump-1.6.20/bin/nfreplay.c:522: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). distribution = atoi(optarg); data/nfdump-1.6.20/bin/nfreplay.c:566:9: [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). ffd = open(ffile, O_RDONLY); data/nfdump-1.6.20/bin/nfstat.c:710:28: [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). packet_limit = (uint64_t)atol(s) * (uint64_t)scale; data/nfdump-1.6.20/bin/nfstat.c:757:26: [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). byte_limit = (uint64_t)atol(s) * (uint64_t)scale; data/nfdump-1.6.20/bin/nfstat.c:1125: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 valstr[40], datestr[64]; data/nfdump-1.6.20/bin/nfstat.c:1126: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 flows_str[NUMBER_STRING_SIZE], byte_str[NUMBER_STRING_SIZE], packets_str[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/nfstat.c:1127: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 pps_str[NUMBER_STRING_SIZE], bps_str[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/nfstat.c:1128: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 tag_string[2]; data/nfdump-1.6.20/bin/nfstat.c:1334: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 valstr[40], datestr1[64], datestr2[64]; data/nfdump-1.6.20/bin/nfstatfile.c:102: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 s[64]; data/nfdump-1.6.20/bin/nfstatfile.c:123: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 s[64]; data/nfdump-1.6.20/bin/nfstatfile.c:233: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 filename[MAXPATHLEN]; data/nfdump-1.6.20/bin/nfstatfile.c:293:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDWR, 0); data/nfdump-1.6.20/bin/nfstatfile.c:299: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). fd = open(filename, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/nfdump-1.6.20/bin/nfstatfile.c:430: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 *filename, line[256]; data/nfdump-1.6.20/bin/nfstatfile.c:446:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/nfdump-1.6.20/bin/nfstatfile.c:524: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 string[32]; data/nfdump-1.6.20/bin/nftest.c:131: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 outfile[MAXPATHLEN]; data/nfdump-1.6.20/bin/nftest.c:165:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nffile_w->buff_pool[0], nffile_r->buff_pool[0], nffile_r->buff_size); data/nfdump-1.6.20/bin/nftest.c:923: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 s[64]; data/nfdump-1.6.20/bin/nftest.c:961: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 s[64]; data/nfdump-1.6.20/bin/nfx.c:266:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)l->map, (void *)map, map->size); data/nfdump-1.6.20/bin/nfx.h:821: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 username[24]; data/nfdump-1.6.20/bin/nfx.h:837: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 username[72]; data/nfdump-1.6.20/bin/output_csv.c:56: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 data_string[STRINGSIZE]; data/nfdump-1.6.20/bin/output_csv.c:74: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 *_s, as[IP_STRING_LEN], ds[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_csv.c:75: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 datestr1[64], datestr2[64], datestr3[64]; data/nfdump-1.6.20/bin/output_csv.c:76: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 s_snet[IP_STRING_LEN], s_dnet[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:81: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 header_string[STRINGSIZE]; data/nfdump-1.6.20/bin/output_fmt.c:82: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 data_string[STRINGSIZE]; data/nfdump-1.6.20/bin/output_fmt.c:85: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 tag_string[2]; data/nfdump-1.6.20/bin/output_fmt.c:591:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char format[32]; data/nfdump-1.6.20/bin/output_fmt.c:621: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 icmp_string[ICMPSTRLEN]; data/nfdump-1.6.20/bin/output_fmt.c:737: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:766: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 tmp_str[IP_STRING_LEN], portchar; data/nfdump-1.6.20/bin/output_fmt.c:797: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:827: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:856: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:885: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:915: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 tmp_str[IP_STRING_LEN], portchar; data/nfdump-1.6.20/bin/output_fmt.c:946: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:977: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:1082: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 s[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/output_fmt.c:1091: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 s[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/output_fmt.c:1100: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 s[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/output_fmt.c:1109: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 s[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/output_fmt.c:1388: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 s[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/output_fmt.c:1403: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 s[NUMBER_STRING_SIZE]; data/nfdump-1.6.20/bin/output_fmt.c:1496: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:1524: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 tmp_str[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_fmt.c:1566: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 tmp_str[IP_STRING_LEN], portchar; data/nfdump-1.6.20/bin/output_fmt.c:1599: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 tmp_str[IP_STRING_LEN], portchar; data/nfdump-1.6.20/bin/output_json.c:60: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 data_string[STRINGSIZE]; data/nfdump-1.6.20/bin/output_json.c:91: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 *_s, as[IP_STRING_LEN], ds[IP_STRING_LEN], *datestr1, *datestr2, datebuff[64], flags_str[16]; data/nfdump-1.6.20/bin/output_json.c:392:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *datestr, datebuff[64]; data/nfdump-1.6.20/bin/output_json.c:405:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *datestr, datebuff[64]; data/nfdump-1.6.20/bin/output_pipe.c:54: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 data_string[STRINGSIZE]; data/nfdump-1.6.20/bin/output_raw.c:56: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 data_string[STRINGSIZE]; data/nfdump-1.6.20/bin/output_raw.c:71: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 *_s, as[IP_STRING_LEN], ds[IP_STRING_LEN], datestr1[64], datestr2[64], datestr3[64]; data/nfdump-1.6.20/bin/output_raw.c:72: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 s_snet[IP_STRING_LEN], s_dnet[IP_STRING_LEN]; data/nfdump-1.6.20/bin/output_util.c:47: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 *protoList[NumProtos] = { data/nfdump-1.6.20/bin/output_util.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. static char s[16]; data/nfdump-1.6.20/bin/output_util.c:218: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 string[16]; data/nfdump-1.6.20/bin/output_util.c:336: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 s[16]; data/nfdump-1.6.20/bin/panonymizer.c:100:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(m_key, key, 16); data/nfdump-1.6.20/bin/panonymizer.c:109: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 numstr[3]; data/nfdump-1.6.20/bin/panonymizer.c:154:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(rin_input, m_pad, 16); data/nfdump-1.6.20/bin/pcap_reader.c:204:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, payload, packet_len); data/nfdump-1.6.20/bin/pcap_reader.c:258: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 errbuf[PCAP_ERRBUF_SIZE]; data/nfdump-1.6.20/bin/pcaproc.c:138: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). FILE* pFile = fopen(filename, "wb"); data/nfdump-1.6.20/bin/pcaproc.c:245:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pcapfile->data_ptr, (void *)&sf_hdr, sizeof(sf_hdr)); data/nfdump-1.6.20/bin/pcaproc.c:247:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pcapfile->data_ptr, (void *)sp, h->caplen); data/nfdump-1.6.20/bin/pcaproc.c:383: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 s1[64]; data/nfdump-1.6.20/bin/pcaproc.c:384: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 s2[64]; data/nfdump-1.6.20/bin/profile.c:64: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. extern char influxdb_url[1024]; data/nfdump-1.6.20/bin/profile.c:69: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. extern char yyerror_buff[256]; data/nfdump-1.6.20/bin/profile.c:71: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. extern char Ident[IDENTLEN]; data/nfdump-1.6.20/bin/profile.c:124: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 path[MAXPATHLEN]; data/nfdump-1.6.20/bin/profile.c:207:8: [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). ffd = open(path, O_RDONLY); data/nfdump-1.6.20/bin/profile.c:270:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error[255]; data/nfdump-1.6.20/bin/profile.c:394: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 *rrd_arg[10], buff[1024]; data/nfdump-1.6.20/bin/profile.c:488: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 buff[2048], *s; data/nfdump-1.6.20/bin/rijndael.c:1169:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv,m_initVector,16); data/nfdump-1.6.20/bin/rijndael.c:1236:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(block, input, 16 - padLen); data/nfdump-1.6.20/bin/rijndael.c:1295:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv,m_initVector,16); data/nfdump-1.6.20/bin/rijndael.c:1310:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv, input, 16); data/nfdump-1.6.20/bin/rijndael.c:1311:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outBuf, block, 16); data/nfdump-1.6.20/bin/rijndael.c:1324:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv, m_initVector, 16); data/nfdump-1.6.20/bin/rijndael.c:1399:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outBuffer, block, 16 - padLen); data/nfdump-1.6.20/bin/rijndael.c:1402:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv, m_initVector, 16); data/nfdump-1.6.20/bin/rijndael.c:1411:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv, input, 16); data/nfdump-1.6.20/bin/rijndael.c:1412:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outBuffer, block, 16); data/nfdump-1.6.20/bin/rijndael.c:1428:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outBuffer, block, 16 - padLen); data/nfdump-1.6.20/bin/sfcapd.c:256:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_RDONLY); data/nfdump-1.6.20/bin/sfcapd.c:261:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_WRONLY); data/nfdump-1.6.20/bin/sfcapd.c:266:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_WRONLY); data/nfdump-1.6.20/bin/sfcapd.c:293:42: [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). newuid = pw_entry ? pw_entry->pw_uid : atol(userid); data/nfdump-1.6.20/bin/sfcapd.c:303:42: [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). newgid = gr_entry ? gr_entry->gr_gid : atol(groupid); data/nfdump-1.6.20/bin/sfcapd.c:446:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *subdir, fmt[MAXTIMESTRING]; data/nfdump-1.6.20/bin/sfcapd.c:469:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nfcapd_filename[MAXPATHLEN]; data/nfdump-1.6.20/bin/sfcapd.c:470:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error[255]; data/nfdump-1.6.20/bin/sfcapd.c:674: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 *bindhost, *datadir, pidstr[32], *launch_process; data/nfdump-1.6.20/bin/sfcapd.c:676: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 *Ident, *time_extension, pidfile[MAXPATHLEN]; data/nfdump-1.6.20/bin/sfcapd.c:807:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[MAXPATHLEN]; data/nfdump-1.6.20/bin/sfcapd.c:867: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). subdir_index = atoi(optarg); data/nfdump-1.6.20/bin/sfcapd.c:870: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). twin = atoi(optarg); data/nfdump-1.6.20/bin/sfcapd.c:972:10: [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). pidf = open(pidfile, O_RDONLY, 0); data/nfdump-1.6.20/bin/sfcapd.c:975:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/nfdump-1.6.20/bin/sfcapd.c:984:25: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). unsigned long pid = atol(s); data/nfdump-1.6.20/bin/sfcapd.c:1027:15: [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). int pidf = open(pidfile, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/nfdump-1.6.20/bin/sflow.h:343: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 bssid[6]; /* BSSID */ data/nfdump-1.6.20/bin/sflow.h:357: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 bssid[6]; /* BSSID */ data/nfdump-1.6.20/bin/sflow_nfdump.c:318: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 ipstr[IP_STRING_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:322: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 agentIP[51], srcIP[51], dstIP[51]; data/nfdump-1.6.20/bin/sflow_process.c:354: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 agentIP[51]; data/nfdump-1.6.20/bin/sflow_process.c:379: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 ipbuf[51]; data/nfdump-1.6.20/bin/sflow_process.c:380: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 scratch[6000]; data/nfdump-1.6.20/bin/sflow_process.c:442:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sample->eth_dst, ptr, 6); data/nfdump-1.6.20/bin/sflow_process.c:445:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sample->eth_src, ptr, 6); data/nfdump-1.6.20/bin/sflow_process.c:627:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sample->eth_src, srcMAC, 6); data/nfdump-1.6.20/bin/sflow_process.c:631:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sample->eth_dst, dstMAC, 6); data/nfdump-1.6.20/bin/sflow_process.c:706: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:806:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[101]; data/nfdump-1.6.20/bin/sflow_process.c:809:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sample->ipsrc.address, ptr, 16); data/nfdump-1.6.20/bin/sflow_process.c:813:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sample->ipdst.address, ptr, 16); data/nfdump-1.6.20/bin/sflow_process.c:877:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fl, ®, 4); data/nfdump-1.6.20/bin/sflow_process.c:886:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dbl, ®, 8); data/nfdump-1.6.20/bin/sflow_process.c:954:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, dp, read_len); data/nfdump-1.6.20/bin/sflow_process.c:970:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&address->address.ip_v6.addr, dp, 16); data/nfdump-1.6.20/bin/sflow_process.c:982: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1017: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1091: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1254: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1274: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1306: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 tunnel_name[SA_MAX_TUNNELNAME_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:1330: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 vc_name[SA_MAX_VCNAME_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:1351: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 ftn_descr[SA_MAX_FTN_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:1433: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 ssid[SFL_MAX_SSID_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:1464: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 ssid[SFL_MAX_SSID_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:1508:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char scratch[2000]; data/nfdump-1.6.20/bin/sflow_process.c:1575:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sample->eth_src, sample->datap, 6); data/nfdump-1.6.20/bin/sflow_process.c:1577:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sample->eth_dst, sample->datap, 6); data/nfdump-1.6.20/bin/sflow_process.c:1605:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1663:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1671:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sample->ipsrc.address.ip_v6, &nfKey6.src_ip, 16); data/nfdump-1.6.20/bin/sflow_process.c:1673:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sample->ipdst.address.ip_v6, &nfKey6.dst_ip, 16); data/nfdump-1.6.20/bin/sflow_process.c:1714: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 key[SFL_MAX_MEMCACHE_KEY+1]; data/nfdump-1.6.20/bin/sflow_process.c:1721:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char enc_key[ENC_KEY_BYTES]; data/nfdump-1.6.20/bin/sflow_process.c:1742: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 uri[SFL_MAX_HTTP_URI+1]; data/nfdump-1.6.20/bin/sflow_process.c:1743: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 host[SFL_MAX_HTTP_HOST+1]; data/nfdump-1.6.20/bin/sflow_process.c:1744: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 referrer[SFL_MAX_HTTP_REFERRER+1]; data/nfdump-1.6.20/bin/sflow_process.c:1745: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 useragent[SFL_MAX_HTTP_USERAGENT+1]; data/nfdump-1.6.20/bin/sflow_process.c:1746: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 xff[SFL_MAX_HTTP_XFF+1]; data/nfdump-1.6.20/bin/sflow_process.c:1747: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 authuser[SFL_MAX_HTTP_AUTHUSER+1]; data/nfdump-1.6.20/bin/sflow_process.c:1748: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 mimetype[SFL_MAX_HTTP_MIMETYPE+1]; data/nfdump-1.6.20/bin/sflow_process.c:1798:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nowstr[200]; data/nfdump-1.6.20/bin/sflow_process.c:1825: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 application[SFLAPP_MAX_APPLICATION_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1826: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 operation[SFLAPP_MAX_OPERATION_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1827: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 attributes[SFLAPP_MAX_ATTRIBUTES_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1828: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 status[SFLAPP_MAX_STATUS_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1863: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 application[SFLAPP_MAX_APPLICATION_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1864: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 operation[SFLAPP_MAX_OPERATION_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1865: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 attributes[SFLAPP_MAX_ATTRIBUTES_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1884: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 actor[SFLAPP_MAX_ACTOR_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1897: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 actor[SFLAPP_MAX_ACTOR_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:1911: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1934: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1960: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1965:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sample->ipsrc.address.ip_v6, sample->datap, 16); data/nfdump-1.6.20/bin/sflow_process.c:1968:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sample->ipdst.address.ip_v6, sample->datap, 16); data/nfdump-1.6.20/bin/sflow_process.c:1985: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 buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:1991:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ipsrc.address.ip_v6, sample->datap, 16); data/nfdump-1.6.20/bin/sflow_process.c:1994:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ipdst.address.ip_v6, sample->datap, 16); data/nfdump-1.6.20/bin/sflow_process.c:2263: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 ifname[SFL_MAX_PORTNAME_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:2294: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[SFL_MAX_HOSTNAME_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:2295: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 os_release[SFL_MAX_OSRELEASE_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.c:2296: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 uuidStr[100]; data/nfdump-1.6.20/bin/sflow_process.c:2791: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 vm_name[SFLJVM_MAX_VMNAME_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:2792: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 vendor[SFLJVM_MAX_VENDOR_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:2793: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 version[SFLJVM_MAX_VERSION_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:2842: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 application[SFLAPP_MAX_APPLICATION_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:3061:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:3129: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 dsName[SFL_MAX_RTMETRIC_KEY_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:3143:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mname[SFL_MAX_RTMETRIC_KEY_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:3145:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mvalstr[SFL_MAX_RTMETRIC_VAL_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:3202: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 dsName[SFL_MAX_RTMETRIC_KEY_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:3218:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[SFL_MAX_RTMETRIC_KEY_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:3220:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fvalstr[SFL_MAX_RTMETRIC_VAL_LEN]; data/nfdump-1.6.20/bin/sflow_process.c:3226:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fvaladdrstr[64]; data/nfdump-1.6.20/bin/sflow_process.c:3228:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fvalmacstr[32]; data/nfdump-1.6.20/bin/sflow_process.c:3237:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fvalmac, sample->datap, 6); data/nfdump-1.6.20/bin/sflow_process.c:3251:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fvaladdr.address.ip_v6.addr, sample->datap, 16); data/nfdump-1.6.20/bin/sflow_process.c:3460:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[51]; data/nfdump-1.6.20/bin/sflow_process.c:3529: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[51]; data/nfdump-1.6.20/bin/sflow_process.h:237: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 src_user[SA_MAX_EXTENDED_USER_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.h:240: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 dst_user[SA_MAX_EXTENDED_USER_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.h: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 url[SA_MAX_EXTENDED_URL_LEN+1]; data/nfdump-1.6.20/bin/sflow_process.h:249:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[SA_MAX_EXTENDED_HOST_LEN+1]; data/nfdump-1.6.20/bin/util.c:164: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 string[512]; data/nfdump-1.6.20/bin/util.c:183: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 string[512]; data/nfdump-1.6.20/bin/util.c:241: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). i = atoi(p); data/nfdump-1.6.20/bin/util.c:261: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). i = atoi(p); data/nfdump-1.6.20/bin/util.c:281: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). i = atoi(p); data/nfdump-1.6.20/bin/util.c:300: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). i = atoi(p); data/nfdump-1.6.20/bin/util.c:319: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). i = atoi(p); data/nfdump-1.6.20/bin/util.c:335: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). i = atoi(p); data/nfdump-1.6.20/bin/util.c:364: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). *t_start = twin_last + atoi(tstring); data/nfdump-1.6.20/bin/util.c:371: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). *t_end = twin_first + atoi(tstring); data/nfdump-1.6.20/bin/util.c:394: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 datestr[255]; data/nfdump-1.6.20/bin/util.c:395: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 t1[64], t2[64]; data/nfdump-1.6.20/bin/util.c:423: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 timestring[32]; data/nfdump-1.6.20/bin/util.c:458:17: [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). when.tm_year = atoi(p) - 1900; data/nfdump-1.6.20/bin/util.c:465: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). when.tm_mon = atoi(p) - 1; data/nfdump-1.6.20/bin/util.c:472:17: [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). when.tm_mday = atoi(p); data/nfdump-1.6.20/bin/util.c:479:17: [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). when.tm_hour = atoi(p); data/nfdump-1.6.20/bin/util.c:486: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). when.tm_min = atoi(p); data/nfdump-1.6.20/bin/util.c:491:17: [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). when.tm_sec = atoi(p); data/nfdump-1.6.20/extra/nftrack/nftrack.c:109: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 pidstr[32]; data/nfdump-1.6.20/extra/nftrack/nftrack.c:111:9: [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). pidf = open(pidfile, O_RDONLY, 0); data/nfdump-1.6.20/extra/nftrack/nftrack.c:114: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 s[32]; data/nfdump-1.6.20/extra/nftrack/nftrack.c:123: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). unsigned long pid = atol(s); data/nfdump-1.6.20/extra/nftrack/nftrack.c:142:10: [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). pidf = open(pidfile, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/nfdump-1.6.20/extra/nftrack/nftrack.c:295: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 datestr[64]; data/nfdump-1.6.20/extra/nftrack/nftrack.c:296: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 pidfile[MAXPATHLEN]; data/nfdump-1.6.20/extra/nftrack/nftrack.c:334: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). topN = atoi(optarg); data/nfdump-1.6.20/extra/nftrack/nftrack.c:396:9: [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). ffd = open(ffile, O_RDONLY); data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:82: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 *buff, *s, *rrd_arg[1100]; data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:172: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 rrd_filename[1024]; data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:210:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(rrd_filename, O_RDONLY, 0); data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:238:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(rrd_filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:261: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 rrd_filename[1024], *buff, *s; data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:262: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 *rrd_arg[10]; data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:354: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 datestr1[64] , datestr2[64], rrd_filename[1024]; data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:355: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 *rrd_arg[10]; data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:464: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 rrd_filename[1024]; data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:465: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 *rrd_arg[10]; data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:81: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 statfile[MAXPATHLEN]; data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:82: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 dbpath[MAXPATHLEN]; data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:121:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(statfile, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:166:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(statfile, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:207:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(statfile, O_RDONLY ); data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:213:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(statfile, O_RDONLY ); data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:363: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). fopen(wfile, "w"); data/nfdump-1.6.20/bin/collector.c:169:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(ident) >= IDENTLEN ) { data/nfdump-1.6.20/bin/collector.c:177:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*source)->Ident, ident, IDENTLEN-1 ); data/nfdump-1.6.20/bin/collector.c:180:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(q) >= MAXPATHLEN ) { data/nfdump-1.6.20/bin/collector.c:238:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(ident) >= IDENTLEN ) { data/nfdump-1.6.20/bin/collector.c:246:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*FlowSource)->Ident, ident, IDENTLEN-1 ); data/nfdump-1.6.20/bin/collector.c:249:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(path) >= MAXPATHLEN ) { data/nfdump-1.6.20/bin/collector.c:384:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*source)->Ident, ident, IDENTLEN-1 ); data/nfdump-1.6.20/bin/collector.c:530:4: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/collector_inline.c:111:3: [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(as, "<unknown>", 99); data/nfdump-1.6.20/bin/expire.c:271:2: [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(first_timestring, "99999999999999", 15); data/nfdump-1.6.20/bin/expire.c:272:2: [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(last_timestring, "00000000000000", 15); data/nfdump-1.6.20/bin/expire.c:300:6: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(first_timestring, p, 15); data/nfdump-1.6.20/bin/expire.c:304:6: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(last_timestring, p, 15); data/nfdump-1.6.20/bin/exporter.c:163:4: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/exporter.c:434:4: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/flist.c:258: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(entry); data/nfdump-1.6.20/bin/flist.c:439: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(last_file_ptr) == 0 ) { data/nfdump-1.6.20/bin/flist.c:791:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncmp(ftsent->fts_name, NF_DUMPFILE , strlen(NF_DUMPFILE)) == 0) data/nfdump-1.6.20/bin/flist.c:1073:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode = umask(0); data/nfdump-1.6.20/bin/flist.c:1074:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mode); data/nfdump-1.6.20/bin/flist.c:1109:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(filename); data/nfdump-1.6.20/bin/flist.c:1161: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). sublen = strlen(subdir); data/nfdump-1.6.20/bin/flist.c:1162: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). pathlen = strlen(path); data/nfdump-1.6.20/bin/flist.c:1173:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(path, subdir, MAXPATHLEN-pathlen-2); // +2: add 1 for '/' data/nfdump-1.6.20/bin/fts_compat.c:53:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define NAMLEN(dirent) strlen((dirent)->d_name) data/nfdump-1.6.20/bin/fts_compat.c:152: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). if ((len = strlen(*argv)) == 0) { data/nfdump-1.6.20/bin/fts_compat.c:233: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(++cp); data/nfdump-1.6.20/bin/fts_compat.c:1086: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). if ((len = strlen(*argv)) > max) data/nfdump-1.6.20/bin/ipfix.c:399:3: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/launch.c:153:20: [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). q = realloc(q, strlen(q) + strlen(s)); data/nfdump-1.6.20/bin/launch.c:153: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). q = realloc(q, strlen(q) + strlen(s)); data/nfdump-1.6.20/bin/launch.c:159: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). if ( strlen(q) > MAXCMDLEN ) { data/nfdump-1.6.20/bin/launch.c:163: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). memmove(&q[i] + strlen(s), &q[i+2], strlen(&q[i+2]) + 1); // include trailing '0' in memmove data/nfdump-1.6.20/bin/launch.c:163:41: [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). memmove(&q[i] + strlen(s), &q[i+2], strlen(&q[i+2]) + 1); // include trailing '0' in memmove data/nfdump-1.6.20/bin/launch.c:164: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). memcpy(&q[i], s, strlen(s)); data/nfdump-1.6.20/bin/launch.c:336:3: [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(TestRecord.fname, "test", MAXPATHLEN-1); data/nfdump-1.6.20/bin/launch.c:338:3: [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(TestRecord.tstring, "20190711084500", MAXTIMESTRING-1); data/nfdump-1.6.20/bin/netflow_v1.c:235:3: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/netflow_v5_v7.c:268:3: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/netflow_v9.c:507:3: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/nfcapd.c:586:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(commbuff->tstring, fmt, MAXTIMESTRING); data/nfdump-1.6.20/bin/nfcapd.c:834: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). if ( strlen(dynsrcdir) > MAXPATHLEN ) { data/nfdump-1.6.20/bin/nfcapd.c:875:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pidfile, optarg, MAXPATHLEN-1); data/nfdump-1.6.20/bin/nfcapd.c:883: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). if ( (strlen(tmp) + strlen(optarg) + 3) < MAXPATHLEN ) { data/nfdump-1.6.20/bin/nfcapd.c:883: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). if ( (strlen(tmp) + strlen(optarg) + 3) < MAXPATHLEN ) { data/nfdump-1.6.20/bin/nfcapd.c:884: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). snprintf(pidfile, MAXPATHLEN - 3 - strlen(tmp), "%s/%s", tmp, optarg); data/nfdump-1.6.20/bin/nfcapd.c:927: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). size_t len = strlen(optarg); data/nfdump-1.6.20/bin/nfcapd.c:936: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). if ( strlen(datadir) > MAXPATHLEN ) { data/nfdump-1.6.20/bin/nfcapd.c:1083:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(pidfile) ) { data/nfdump-1.6.20/bin/nfcapd.c:1090:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(pidf, (void *)s, 31); data/nfdump-1.6.20/bin/nfcapd.c:1134: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(pidfile)) { data/nfdump-1.6.20/bin/nfcapd.c:1143:28: [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 ( write(pidf, pidstr, strlen(pidstr)) <= 0 ) { data/nfdump-1.6.20/bin/nfcapd.c:1170: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). if ( strlen(pidfile) ) data/nfdump-1.6.20/bin/nfcapd.c:1195: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). if ( strlen(pidfile) ) data/nfdump-1.6.20/bin/nfcapd.c:1243:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(pidfile) ) data/nfdump-1.6.20/bin/nfdump.c:407:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Ident, nffile_r->file_header->ident, IDENTLEN); data/nfdump-1.6.20/bin/nfdump.c:838: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). if ( strlen(print_format) > 512 ) { data/nfdump-1.6.20/bin/nfdump.c:870:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Ident, optarg, IDENTLEN); data/nfdump-1.6.20/bin/nfdump.c:923: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). if ( rfile && strlen(Ident) > 0 ) { data/nfdump-1.6.20/bin/nfdump.c:987: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). int len = strlen(AggrPrependFmt) + strlen(aggr_fmt) + strlen(AggrAppendFmt) + 7; // +7 for 'fmt:', 2 spaces and '\0' data/nfdump-1.6.20/bin/nfdump.c:987: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). int len = strlen(AggrPrependFmt) + strlen(aggr_fmt) + strlen(AggrAppendFmt) + 7; // +7 for 'fmt:', 2 spaces and '\0' data/nfdump-1.6.20/bin/nfdump.c:987:58: [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). int len = strlen(AggrPrependFmt) + strlen(aggr_fmt) + strlen(AggrAppendFmt) + 7; // +7 for 'fmt:', 2 spaces and '\0' data/nfdump-1.6.20/bin/nfdump.c:1004: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(format) ) { data/nfdump-1.6.20/bin/nfdump.c:1017: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(print_format); data/nfdump-1.6.20/bin/nfdump.c:1083:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(ffd, (void *)filter, stat_buff.st_size); data/nfdump-1.6.20/bin/nfdump.c:1097: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). if ( !filter || strlen(filter) == 0 ) data/nfdump-1.6.20/bin/nffile.c:436:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(nffile->fd, (void *)nffile->file_header, sizeof(file_header_t)); data/nfdump-1.6.20/bin/nffile.c:455:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(nffile->fd, (void *)nffile->stat_record, sizeof(stat_record_t)); data/nfdump-1.6.20/bin/nffile.c:530:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( read(fd, (void *)&FileHeader, sizeof(FileHeader)) < 0 ) { data/nfdump-1.6.20/bin/nffile.c:546:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(FileHeader.ident, Ident, IDENTLEN); data/nfdump-1.6.20/bin/nffile.c:732:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(nffile->file_header->ident, ident, IDENTLEN); data/nfdump-1.6.20/bin/nffile.c:862:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd_from, (void *)block_header, sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:874:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd_from, p, block_header->size); data/nfdump-1.6.20/bin/nffile.c:937:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, (void *)&file_header, sizeof(file_header_t)); data/nfdump-1.6.20/bin/nffile.c:956:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, (void *)stat_record, sizeof(stat_record_t)); data/nfdump-1.6.20/bin/nffile.c:1000:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(nffile->file_header->ident, ident, IDENTLEN); data/nfdump-1.6.20/bin/nffile.c:1002: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(nffile->file_header->ident) == 0 ) data/nfdump-1.6.20/bin/nffile.c:1003:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(nffile->file_header->ident, IDENTNONE, IDENTLEN); data/nfdump-1.6.20/bin/nffile.c:1028:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(nffile->fd, nffile->block_header, sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:1056:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(nffile->fd, nffile->buff_ptr, nffile->block_header->size); data/nfdump-1.6.20/bin/nffile.c:1099:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(nffile->fd, read_ptr, request_size); data/nfdump-1.6.20/bin/nffile.c:1307:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(nffile->fd, (void *)nffile->block_header, sizeof(data_block_header_t)); data/nfdump-1.6.20/bin/nffile.c:1377:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, (void *)&file_header, sizeof(file_header_t)); data/nfdump-1.6.20/bin/nffile.c:1396:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, (void *)stat_record, sizeof(stat_record_t)); data/nfdump-1.6.20/bin/nffile_inline.c:400:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((void *)output_record->username, (void *)tpl->username, sizeof(output_record->username)); data/nfdump-1.6.20/bin/nffile_inline.c:406:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((void *)output_record->username, (void *)tpl->username, sizeof(output_record->username)); data/nfdump-1.6.20/bin/nffile_inline.c:760:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((void *)tpl->username, (void *)master_record->username, sizeof(tpl->username)); data/nfdump-1.6.20/bin/nffile_inline.c:766:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((void *)tpl->username, (void *)master_record->username, sizeof(tpl->username)); data/nfdump-1.6.20/bin/nflowcache.c:649:17: [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). fmt_len += ( strlen(aggregate_info[i].fmt) + 1 ); data/nfdump-1.6.20/bin/nflowcache.c:686: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). n = &(p[strlen(p)-1]); data/nfdump-1.6.20/bin/nflowcache.c:730:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(*aggr_fmt, a->fmt, fmt_len); data/nfdump-1.6.20/bin/nflowcache.c:731: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). fmt_len -= strlen(a->fmt); data/nfdump-1.6.20/bin/nflowcache.c:732:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(*aggr_fmt, " ", fmt_len); data/nfdump-1.6.20/bin/nfpcapd.c:1293: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). if ( strlen(optarg) > 16 ) { data/nfdump-1.6.20/bin/nfpcapd.c:1345:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pidfile, optarg, MAXPATHLEN-1); data/nfdump-1.6.20/bin/nfpcapd.c:1353: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). if ( (strlen(tmp) + strlen(optarg) + 3) < MAXPATHLEN ) { data/nfdump-1.6.20/bin/nfpcapd.c:1353: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). if ( (strlen(tmp) + strlen(optarg) + 3) < MAXPATHLEN ) { data/nfdump-1.6.20/bin/nfpcapd.c:1354: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). snprintf(pidfile, MAXPATHLEN - 3 - strlen(tmp), "%s/%s", tmp, optarg); data/nfdump-1.6.20/bin/nfpcapd.c:1367: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). size_t len = strlen(optarg); data/nfdump-1.6.20/bin/nfpcapd.c:1441:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(pidfile) ) { data/nfdump-1.6.20/bin/nfpcapd.c:1448:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(pidf, (void *)s, 31); data/nfdump-1.6.20/bin/nfpcapd.c:1487: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(pidfile)) { data/nfdump-1.6.20/bin/nfpcapd.c:1496:28: [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 ( write(pidf, pidstr, strlen(pidstr)) <= 0 ) { data/nfdump-1.6.20/bin/nfpcapd.c:1618:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(pidfile) ) data/nfdump-1.6.20/bin/nfprofile.c:133:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Ident, nffile->file_header->ident, IDENTLEN); data/nfdump-1.6.20/bin/nfprofile.c:451:17: [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 ( *q && (q[strlen(q)-1] == '|') ) data/nfdump-1.6.20/bin/nfprofile.c:452: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). q[strlen(q)-1] = '\0'; data/nfdump-1.6.20/bin/nfprofile.c:495:2: [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(Ident, "none", IDENTLEN); data/nfdump-1.6.20/bin/nfprofile.c:572:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(influxdb_url, optarg, 1024); data/nfdump-1.6.20/bin/nfprofile.c:622: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(filename) == 0 ) { data/nfdump-1.6.20/bin/nfreplay.c:143:3: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(stdin); data/nfdump-1.6.20/bin/nfreplay.c:174:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(delay); data/nfdump-1.6.20/bin/nfreplay.c:335:8: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(delay); data/nfdump-1.6.20/bin/nfreplay.c:571:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(ffd, (void *)filter, stat_buff.st_size); data/nfdump-1.6.20/bin/nfstat.c:684: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(packet_limit_string); data/nfdump-1.6.20/bin/nfstat.c:731: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(byte_limit_string); data/nfdump-1.6.20/bin/nfstatfile.c:355:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r_size = read(fd, (void *)in_buff, filestat.st_size); data/nfdump-1.6.20/bin/nfstatfile.c:477: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/nfdump-1.6.20/bin/nfx.c:354: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). s = (char *)malloc(strlen(options)+1); data/nfdump-1.6.20/bin/output_csv.c:130: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:137: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:144: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:150: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:163: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:175: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:189: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:201: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:209: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:236: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:256: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:267: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:282: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:298: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:310: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:317: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:323: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_csv.c:333: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_fmt.c:512: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). int len = strlen(printmap[i].printmode); data/nfdump-1.6.20/bin/output_fmt.c:516: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). int newlen = strlen(format) + strlen(printmap[i].Format); data/nfdump-1.6.20/bin/output_fmt.c:516:36: [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). int newlen = strlen(format) + strlen(printmap[i].Format); data/nfdump-1.6.20/bin/output_fmt.c:558: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). remaining = strlen(c); data/nfdump-1.6.20/bin/output_fmt.c:560: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). int len = strlen(format_token_list[i].token); data/nfdump-1.6.20/bin/output_fmt.c:570: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). snprintf(h, STRINGSIZE-1-strlen(h), "%23s%s", "", format_token_list[i].header); data/nfdump-1.6.20/bin/output_fmt.c:572: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). snprintf(h, STRINGSIZE-1-strlen(h), "%s", format_token_list[i].header); data/nfdump-1.6.20/bin/output_fmt.c:573: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). h += strlen(h); data/nfdump-1.6.20/bin/output_fmt.c:596:36: [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). snprintf(format, 31, "%%%zus", strlen(c)); data/nfdump-1.6.20/bin/output_fmt.c:598:30: [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). snprintf(h, STRINGSIZE-1-strlen(h), format, ""); data/nfdump-1.6.20/bin/output_fmt.c:599: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). h += strlen(h); data/nfdump-1.6.20/bin/output_fmt.c:605:36: [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). snprintf(format, 31, "%%%zus", strlen(c)); data/nfdump-1.6.20/bin/output_fmt.c:607:30: [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). snprintf(h, STRINGSIZE-1-strlen(h), format, ""); data/nfdump-1.6.20/bin/output_fmt.c:608: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). h += strlen(h); data/nfdump-1.6.20/bin/output_fmt.c:650: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). s = string + strlen(string); data/nfdump-1.6.20/bin/output_fmt.c:651: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). snprintf(s, MAX_STRING_LENGTH-strlen(string)-1,".%03u", r->msec_first); data/nfdump-1.6.20/bin/output_fmt.c:664: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). s = string + strlen(string); data/nfdump-1.6.20/bin/output_fmt.c:665: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). snprintf(s, MAX_STRING_LENGTH-strlen(string)-1,".%03u", r->msec_last); data/nfdump-1.6.20/bin/output_fmt.c:678: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). s = string + strlen(string); data/nfdump-1.6.20/bin/output_fmt.c:679: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). snprintf(s, MAX_STRING_LENGTH-strlen(string)-1,".%03llu", r->received % 1000LL); data/nfdump-1.6.20/bin/output_fmt.c:715: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). s = string + strlen(string); data/nfdump-1.6.20/bin/output_fmt.c:716: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). snprintf(s, MAX_STRING_LENGTH-strlen(string)-1,".%03llu", r->event_time % 1000LL); data/nfdump-1.6.20/bin/output_json.c:112:3: [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(data_string, ",\n", STRINGSIZE-1); data/nfdump-1.6.20/bin/output_json.c:116: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_json.c:132: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_json.c:169: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_json.c:186: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_json.c:199: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_json.c:347: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_json.c:493: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:140: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:155: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:169: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:187: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:197: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:206: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:239: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:260: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:269: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:278: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:287: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:296: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:315: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:334: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:344: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:358: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:373: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:389: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:399: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:411: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:429: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:440: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:449: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:460: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:478: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:498: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:508: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_raw.c:517: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). _slen = strlen(data_string); data/nfdump-1.6.20/bin/output_util.c:204: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). if ( (len = strlen(protoString)) >= 6 ) data/nfdump-1.6.20/bin/output_util.c:209: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). ( strlen(protoList[i]) == len) ) data/nfdump-1.6.20/bin/output_util.c:235: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). size_t len = strlen(s); data/nfdump-1.6.20/bin/panonymizer.c:110: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). uint32_t len = strlen(s); data/nfdump-1.6.20/bin/panonymizer.c:118:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(s) == 32 ) { data/nfdump-1.6.20/bin/panonymizer.c:120:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(key, s, 32); data/nfdump-1.6.20/bin/panonymizer.c:126:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(s) == 66 && s[0] == '0' && s[1] == 'x' ) { data/nfdump-1.6.20/bin/profile.c:86: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). size_t len = strlen(string); data/nfdump-1.6.20/bin/profile.c:93:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(stack, string, len); data/nfdump-1.6.20/bin/profile.c:152: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). size_t len = strlen(profile_param->channel_sourcelist); data/nfdump-1.6.20/bin/profile.c:200: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). filter_size = stat_buf.st_size + strlen(source_filter) + 2; // +2 : ')\0' at the end of the filter data/nfdump-1.6.20/bin/profile.c:213:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filter, source_filter, strlen(source_filter)); data/nfdump-1.6.20/bin/profile.c:213: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). strncpy(filter, source_filter, strlen(source_filter)); data/nfdump-1.6.20/bin/profile.c:214: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). p = filter + strlen(source_filter); data/nfdump-1.6.20/bin/profile.c:216:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(ffd, (void *)p, stat_buf.st_size); data/nfdump-1.6.20/bin/profile.c:266:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( !is_alert && subdir_index && strlen(filename) == 19 && (strncmp(filename, "nfcapd.", 7) == 0) ) { data/nfdump-1.6.20/bin/profile.c:385:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(influxdb_url) > 0) data/nfdump-1.6.20/bin/sfcapd.c:568:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(commbuff->tstring, fmt, MAXTIMESTRING); data/nfdump-1.6.20/bin/sfcapd.c:805:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pidfile, optarg, MAXPATHLEN-1); data/nfdump-1.6.20/bin/sfcapd.c:813: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). if ( (strlen(tmp) + strlen(optarg) + 3) < MAXPATHLEN ) { data/nfdump-1.6.20/bin/sfcapd.c:813: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). if ( (strlen(tmp) + strlen(optarg) + 3) < MAXPATHLEN ) { data/nfdump-1.6.20/bin/sfcapd.c:814: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). snprintf(pidfile, MAXPATHLEN - 3 - strlen(tmp), "%s/%s", tmp, optarg); data/nfdump-1.6.20/bin/sfcapd.c:848: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). if ( strlen(datadir) > MAXPATHLEN ) { data/nfdump-1.6.20/bin/sfcapd.c:859: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). size_t len = strlen(optarg); data/nfdump-1.6.20/bin/sfcapd.c:970:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(pidfile) ) { data/nfdump-1.6.20/bin/sfcapd.c:977:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(pidf, (void *)s, 31); data/nfdump-1.6.20/bin/sfcapd.c:1025: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(pidfile)) { data/nfdump-1.6.20/bin/sfcapd.c:1034:23: [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). write(pidf, pidstr, strlen(pidstr)); data/nfdump-1.6.20/bin/sfcapd.c:1062: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). if ( strlen(pidfile) ) data/nfdump-1.6.20/bin/sfcapd.c:1087: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). if ( strlen(pidfile) ) data/nfdump-1.6.20/bin/sfcapd.c:1134:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(pidfile) ) data/nfdump-1.6.20/bin/sflow_nfdump.c:338:3: [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(ipstr, "<unknown>", IP_STRING_LEN); data/nfdump-1.6.20/bin/sflow_process.c:200: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). int maxlen = (strlen(in) * 3) + 1; data/nfdump-1.6.20/bin/sflow_process.c:311:4: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(buf, "-"); data/nfdump-1.6.20/bin/util.c:129:20: [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 ( !facility || strlen(facility) > 32 ) { data/nfdump-1.6.20/bin/util.c:202: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). int l = strlen(s); data/nfdump-1.6.20/bin/util.c:376:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(tstring) < 4 ) { data/nfdump-1.6.20/bin/util.c:448:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(timestring); data/nfdump-1.6.20/extra/nftrack/nftrack.c:116:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(pidf, (void *)s, 31); data/nfdump-1.6.20/extra/nftrack/nftrack.c:148: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). if ( write(pidf, pidstr, strlen(pidstr)) <= 0 ) { data/nfdump-1.6.20/extra/nftrack/nftrack.c:401:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(ffd, (void *)filter, stat_buff.st_size); data/nfdump-1.6.20/extra/nftrack/nftrack_rrd.c:216:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( read(fd, buff, statbuf.st_size) != statbuf.st_size ) { data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:229:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). num = read(fd, (void *)&stat_header, sizeof(stat_header)); data/nfdump-1.6.20/extra/nftrack/nftrack_stat.c:247:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). num = read(fd, stat_record, NUMPORTS * sizeof(data_row)); ANALYSIS SUMMARY: Hits = 700 Lines analyzed = 67449 in approximately 2.01 seconds (33577 lines/second) Physical Source Lines of Code (SLOC) = 49634 Hits@level = [0] 1065 [1] 240 [2] 433 [3] 16 [4] 10 [5] 1 Hits@level+ = [0+] 1765 [1+] 700 [2+] 460 [3+] 27 [4+] 11 [5+] 1 Hits/KSLOC@level+ = [0+] 35.5603 [1+] 14.1032 [2+] 9.26784 [3+] 0.543982 [4+] 0.221622 [5+] 0.0201475 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.