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/namazu2-2.0.21/lib/strstr.c Examining data/namazu2-2.0.21/lib/getopt.c Examining data/namazu2-2.0.21/lib/getopt1.c Examining data/namazu2-2.0.21/lib/getopt.h Examining data/namazu2-2.0.21/nmz/codeconv.h Examining data/namazu2-2.0.21/nmz/field.h Examining data/namazu2-2.0.21/nmz/hlist.h Examining data/namazu2-2.0.21/nmz/i18n.h Examining data/namazu2-2.0.21/nmz/idxname.h Examining data/namazu2-2.0.21/nmz/libnamazu.h Examining data/namazu2-2.0.21/nmz/l10n-ja.h Examining data/namazu2-2.0.21/nmz/parser.h Examining data/namazu2-2.0.21/nmz/query.h Examining data/namazu2-2.0.21/nmz/re.h Examining data/namazu2-2.0.21/nmz/regex.h Examining data/namazu2-2.0.21/nmz/search.h Examining data/namazu2-2.0.21/nmz/score.h Examining data/namazu2-2.0.21/nmz/util.h Examining data/namazu2-2.0.21/nmz/var.h Examining data/namazu2-2.0.21/nmz/wakati.h Examining data/namazu2-2.0.21/nmz/list.h Examining data/namazu2-2.0.21/nmz/alias.c Examining data/namazu2-2.0.21/nmz/alias.h Examining data/namazu2-2.0.21/nmz/codeconv.c Examining data/namazu2-2.0.21/nmz/field.c Examining data/namazu2-2.0.21/nmz/hlist.c Examining data/namazu2-2.0.21/nmz/i18n.c Examining data/namazu2-2.0.21/nmz/idxname.c Examining data/namazu2-2.0.21/nmz/libnamazu.c Examining data/namazu2-2.0.21/nmz/l10n-ja.c Examining data/namazu2-2.0.21/nmz/parser.c Examining data/namazu2-2.0.21/nmz/query.c Examining data/namazu2-2.0.21/nmz/re.c Examining data/namazu2-2.0.21/nmz/replace.c Examining data/namazu2-2.0.21/nmz/replace.h Examining data/namazu2-2.0.21/nmz/regex.c Examining data/namazu2-2.0.21/nmz/search.c Examining data/namazu2-2.0.21/nmz/seed.c Examining data/namazu2-2.0.21/nmz/seed.h Examining data/namazu2-2.0.21/nmz/util.c Examining data/namazu2-2.0.21/nmz/var.c Examining data/namazu2-2.0.21/nmz/wakati.c Examining data/namazu2-2.0.21/nmz/score.c Examining data/namazu2-2.0.21/nmz/list.c Examining data/namazu2-2.0.21/nmz/nmzversion.c Examining data/namazu2-2.0.21/nmz/alloca.c Examining data/namazu2-2.0.21/nmz/memcmp.c Examining data/namazu2-2.0.21/nmz/memmove.c Examining data/namazu2-2.0.21/nmz/memset.c Examining data/namazu2-2.0.21/nmz/strcasecmp.c Examining data/namazu2-2.0.21/nmz/strncasecmp.c Examining data/namazu2-2.0.21/nmz/strcspn.c Examining data/namazu2-2.0.21/nmz/strerror.c Examining data/namazu2-2.0.21/nmz/vsnprintf.c Examining data/namazu2-2.0.21/nmz/system.h Examining data/namazu2-2.0.21/nmz/support.h Examining data/namazu2-2.0.21/src/form.c Examining data/namazu2-2.0.21/src/form.h Examining data/namazu2-2.0.21/src/message.h Examining data/namazu2-2.0.21/src/namazu.c Examining data/namazu2-2.0.21/src/namazu.h Examining data/namazu2-2.0.21/src/output.c Examining data/namazu2-2.0.21/src/output.h Examining data/namazu2-2.0.21/src/rcfile.c Examining data/namazu2-2.0.21/src/rcfile.h Examining data/namazu2-2.0.21/src/charset.c Examining data/namazu2-2.0.21/src/charset.h Examining data/namazu2-2.0.21/src/result.c Examining data/namazu2-2.0.21/src/result.h Examining data/namazu2-2.0.21/src/usage.c Examining data/namazu2-2.0.21/src/usage.h Examining data/namazu2-2.0.21/src/namazu-cmd.c Examining data/namazu2-2.0.21/src/cgi.c Examining data/namazu2-2.0.21/src/cgi.h Examining data/namazu2-2.0.21/src/namazu-cgi.c FINAL RESULTS: data/namazu2-2.0.21/nmz/alias.c:95:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newp->alias, alias); data/namazu2-2.0.21/nmz/alias.c:96:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newp->real, real); data/namazu2-2.0.21/nmz/hlist.c:134:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hlist.data[i].field, buf); data/namazu2-2.0.21/nmz/i18n.c:153:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(store, lang); data/namazu2-2.0.21/nmz/i18n.c:213:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(lang_suffix, fname + baselen); /* it shouldn't be flood */ data/namazu2-2.0.21/nmz/idxname.c:85:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(indices.names[newidxnum], idxname); data/namazu2-2.0.21/nmz/idxname.c:144:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(indices.names[i], list->real); data/namazu2-2.0.21/nmz/idxname.c:171:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp, defaultidx); data/namazu2-2.0.21/nmz/idxname.c:173:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(tmp, indices.names[i] + 1); /* +1 means '+' */ data/namazu2-2.0.21/nmz/idxname.c:261:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hnptr->word, str); data/namazu2-2.0.21/nmz/libnamazu.c:217:5: [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(msg, BUFSIZE - 1, fmt, args); data/namazu2-2.0.21/nmz/libnamazu.c:235:5: [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(dyingmsg, BUFSIZE - 1, fmt, args); data/namazu2-2.0.21/nmz/libnamazu.h:188:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. char access[MAXPATH]; data/namazu2-2.0.21/nmz/query.c:158:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(query.str, querystring); data/namazu2-2.0.21/nmz/replace.c:181:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(uri, list->rep); data/namazu2-2.0.21/nmz/replace.c:227:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newp->pat, pat); data/namazu2-2.0.21/nmz/replace.c:228:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newp->rep, rep); data/namazu2-2.0.21/nmz/score.c:206:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(buf, "%s", uri); data/namazu2-2.0.21/nmz/search.c:513:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(word_mix, prevword); data/namazu2-2.0.21/nmz/search.c:514:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(word_mix, word); data/namazu2-2.0.21/nmz/search.c:572:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(expr, expr + 1); data/namazu2-2.0.21/nmz/search.c:584:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(expr, expr + 1); data/namazu2-2.0.21/nmz/search.c:592:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(expr, expr + 1); data/namazu2-2.0.21/nmz/search.c:605:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(expr, expr + 1); data/namazu2-2.0.21/nmz/search.c:641:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmpexpr, expr); data/namazu2-2.0.21/nmz/search.c:664:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(expr, str); data/namazu2-2.0.21/nmz/search.c:678:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(file_name, NMZ.field); /* make pathname */ data/namazu2-2.0.21/nmz/search.c:679:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(file_name, field_name); data/namazu2-2.0.21/nmz/search.c:695:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, str + 1); data/namazu2-2.0.21/nmz/search.c:770:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. fp = fopen(NMZ.access, "rb"); data/namazu2-2.0.21/nmz/search.c:922:27: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. nmz_pathcat(base, NMZ.access); data/namazu2-2.0.21/nmz/search.c:935:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, str + 1); data/namazu2-2.0.21/nmz/support.h:39:10: [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. # define snprintf _snprintf data/namazu2-2.0.21/nmz/support.h:39:19: [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. # define snprintf _snprintf data/namazu2-2.0.21/nmz/support.h:40:10: [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. # define vsnprintf _vsnprintf data/namazu2-2.0.21/nmz/support.h:51:11: [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. # define snprintf _nmz_snprintf data/namazu2-2.0.21/nmz/support.h:52:11: [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. # define vsnprintf _nmz_vsnprintf data/namazu2-2.0.21/nmz/util.c:296:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fp, fmt, args); data/namazu2-2.0.21/nmz/util.c:326:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/namazu2-2.0.21/nmz/util.c:348:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(name, name + i + 1); data/namazu2-2.0.21/nmz/vsnprintf.c:108:1: [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(char *str, size_t n, char const *fmt, va_list ap) data/namazu2-2.0.21/nmz/vsnprintf.c:110:1: [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(str, n, fmt, ap) data/namazu2-2.0.21/nmz/vsnprintf.c:135:9: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. ret = vsprintf(p, fmt, ap); data/namazu2-2.0.21/nmz/vsnprintf.c:144:1: [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 (char *string, size_t maxlen, const char *format, ...) data/namazu2-2.0.21/nmz/vsnprintf.c:149:11: [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. retval = vsnprintf(string, maxlen, format, args); data/namazu2-2.0.21/nmz/wakati.c:192:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(key, buf); data/namazu2-2.0.21/src/cgi.c:126:9: [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. printf("%s %s; %s" CRLF CRLF, MSG_MIME_HEADER, data/namazu2-2.0.21/src/cgi.c:141:13: [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. printf("%s %s; %s" CRLF CRLF, MSG_MIME_HEADER, data/namazu2-2.0.21/src/cgi.c:203:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp->name, name); data/namazu2-2.0.21/src/cgi.c:204:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp->value, value); data/namazu2-2.0.21/src/cgi.c:368:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ca->query, value); data/namazu2-2.0.21/src/cgi.c:388:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ca->subquery, value); data/namazu2-2.0.21/src/form.c:192:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp, tmp + l); data/namazu2-2.0.21/src/namazu-cgi.c:117:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dest, command); data/namazu2-2.0.21/src/namazu-cgi.c:124:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dest + i, name); data/namazu2-2.0.21/src/namazu-cmd.c:349:9: [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. printf("%s %s; %s" CRLF CRLF, MSG_MIME_HEADER, data/namazu2-2.0.21/src/output.c:195:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf + i, str); data/namazu2-2.0.21/src/output.c:204:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf + i, str); data/namazu2-2.0.21/src/output.c:409:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(templdir, get_templatedir()); data/namazu2-2.0.21/src/output.c:752:13: [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. printf("%s %s" CRLF CRLF, MSG_MIME_HEADER, get_contenttype()); data/namazu2-2.0.21/src/output.c:851:6: [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. printf("%s %s" CRLF CRLF, MSG_MIME_HEADER, get_contenttype()); data/namazu2-2.0.21/src/output.c:985:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buff, "%s; charset=%s", contenttype, charset); data/namazu2-2.0.21/src/output.c:1133:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, str + is_nmz_html); data/namazu2-2.0.21/src/output.c:1170:9: [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(msg, BUFSIZE - 1, fmt, args); data/namazu2-2.0.21/src/output.c:1174:13: [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. printf("%s %s; %s" CRLF CRLF, MSG_MIME_HEADER, data/namazu2-2.0.21/src/output.c:1185:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/namazu2-2.0.21/src/rcfile.c:475:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp, str); data/namazu2-2.0.21/src/rcfile.c:509:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newp->value, arg); data/namazu2-2.0.21/src/rcfile.c:709:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(loaded_rcfiles.fnames[no], fname); data/namazu2-2.0.21/src/result.c:175:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(result, buf); data/namazu2-2.0.21/src/usage.c:88:5: [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. printf(usage, VERSION, TRAC_URI, MAILING_ADDRESS); data/namazu2-2.0.21/lib/getopt.c:211:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #ifndef getenv data/namazu2-2.0.21/lib/getopt.c:212:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char *getenv (); data/namazu2-2.0.21/lib/getopt.c:397:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. posixly_correct = getenv ("POSIXLY_CORRECT"); data/namazu2-2.0.21/lib/getopt.c:972:1: [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. getopt (argc, argv, optstring) data/namazu2-2.0.21/lib/getopt.c:1002:11: [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. c = getopt (argc, argv, "abc:d:0123456789"); data/namazu2-2.0.21/lib/getopt.h:50:25: [3] (buffer) getopt_long: 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. #define nmz_getopt_long getopt_long data/namazu2-2.0.21/lib/getopt.h:161:12: [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. extern int getopt (int __argc, char *const *__argv, const char *__shortopts); data/namazu2-2.0.21/lib/getopt.h:163:12: [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. extern int getopt (); data/namazu2-2.0.21/lib/getopt.h:180:12: [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. extern int getopt (); data/namazu2-2.0.21/nmz/i18n.c:76:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv ("LANGUAGE"); data/namazu2-2.0.21/nmz/i18n.c:86:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv ("LC_ALL"); data/namazu2-2.0.21/nmz/i18n.c:91:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv (categoryname); data/namazu2-2.0.21/nmz/i18n.c:96:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv ("LANG"); data/namazu2-2.0.21/nmz/util.c:500:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return (cp = getenv(s)) ? cp : ""; data/namazu2-2.0.21/src/cgi.c:227:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((query_string = getenv("QUERY_STRING"))) { data/namazu2-2.0.21/src/cgi.c:235:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. script_name = getenv("SCRIPT_NAME"); data/namazu2-2.0.21/src/cgi.c:239:39: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. } else if (!(nmz_strprefixcasecmp(getenv("SERVER_SOFTWARE"), "Microsoft-")) data/namazu2-2.0.21/src/cgi.c:240:39: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. || !(nmz_strprefixcasecmp(getenv("SERVER_SOFTWARE"), "AnWeb")) data/namazu2-2.0.21/src/cgi.c:241:39: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. || !(nmz_strprefixcasecmp(getenv("SERVER_SOFTWARE"), "iPlanet-"))) { data/namazu2-2.0.21/src/cgi.c:243:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. script_name = getenv("SCRIPT_NAME"); data/namazu2-2.0.21/src/cgi.c:361:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *agent = getenv("HTTP_USER_AGENT"); data/namazu2-2.0.21/src/cgi.c:381:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *agent = getenv("HTTP_USER_AGENT"); data/namazu2-2.0.21/src/form.c:424:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. script_name= getenv("SCRIPT_NAME"); data/namazu2-2.0.21/src/form.c:425:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. document_name= getenv("DOCUMENT_URI"); data/namazu2-2.0.21/src/namazu-cgi.c:138:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *localedir = getenv("NAMAZULOCALEDIR"); data/namazu2-2.0.21/src/namazu-cgi.c:163:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!((getenv("QUERY_STRING") || getenv("SERVER_SOFTWARE")) data/namazu2-2.0.21/src/namazu-cgi.c:163:38: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!((getenv("QUERY_STRING") || getenv("SERVER_SOFTWARE")) data/namazu2-2.0.21/src/namazu-cgi.c:164:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. && getenv("SCRIPT_NAME"))) { data/namazu2-2.0.21/src/namazu-cmd.c:315:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *localedir = getenv("NAMAZULOCALEDIR"); data/namazu2-2.0.21/src/namazu-cmd.c:339:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("QUERY_STRING") && getenv("SCRIPT_NAME")) { data/namazu2-2.0.21/src/namazu-cmd.c:339:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("QUERY_STRING") && getenv("SCRIPT_NAME")) { data/namazu2-2.0.21/src/rcfile.c:307:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("LANG") == NULL) { data/namazu2-2.0.21/src/rcfile.c:405:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env_namazurc = getenv("NAMAZURC"); data/namazu2-2.0.21/src/rcfile.c:411:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env_namazurc = getenv("NAMAZUCONF"); data/namazu2-2.0.21/src/rcfile.c:417:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env_namazurc = getenv("NAMAZUCONFPATH"); data/namazu2-2.0.21/src/rcfile.c:479:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = getenv("HOME")) != NULL) { data/namazu2-2.0.21/src/rcfile.c:808:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((env_norc = getenv("NAMAZUNORC"))) { data/namazu2-2.0.21/src/rcfile.c:851:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *home = getenv("HOME"); data/namazu2-2.0.21/nmz/alloca.c:153: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 align[ALIGN_SIZE]; /* To force sizeof(header). */ data/namazu2-2.0.21/nmz/field.c:77:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(field, "subject"); data/namazu2-2.0.21/nmz/field.c:79:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(field, "from"); data/namazu2-2.0.21/nmz/field.c:81:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(field, "uri"); data/namazu2-2.0.21/nmz/field.c:143:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 field_name[BUFSIZE]; /* storing field name */ data/namazu2-2.0.21/nmz/field.c:166: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 fname[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/field.c:167: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 tmpfield[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/field.c:196:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_field = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/field.c:203:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_field_idx = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/hlist.c:72: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 field_for_sort[BUFSIZE] = ""; /* field_for_sort name used with sorting */ data/namazu2-2.0.21/nmz/hlist.c:92: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(to.data + n, from.data, from.num * sizeof (to.data[0])); data/namazu2-2.0.21/nmz/hlist.c:112:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/namazu2-2.0.21/nmz/hlist.c:182: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). r = intcmp(atoi(v2->field), atoi(v1->field)); data/namazu2-2.0.21/nmz/hlist.c:182:33: [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). r = intcmp(atoi(v2->field), atoi(v1->field)); data/namazu2-2.0.21/nmz/hlist.c:546:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). date_index = fopen(NMZ.t, "rb"); data/namazu2-2.0.21/nmz/i18n.c:106:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 lang[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/i18n.c:132:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 lang[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/i18n.c:152:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(store, "LANG="); data/namazu2-2.0.21/nmz/i18n.c:189: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 fname[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/i18n.c:190: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 suffix[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/i18n.c:209: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(fname, "rb"); data/namazu2-2.0.21/nmz/idxname.c:65: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 defaultidx[BUFSIZE] = OPT_INDEXDIR; data/namazu2-2.0.21/nmz/libnamazu.c:83: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 dyingmsg[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/libnamazu.c:213:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 msg[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/libnamazu.h:173: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 i[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:174: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 ii[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:175: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 head[MAXPATH]; /* followed by a language code */ data/namazu2-2.0.21/nmz/libnamazu.h:176: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 foot[MAXPATH]; /* followed by a language code */ data/namazu2-2.0.21/nmz/libnamazu.h:177: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 body[MAXPATH]; /* followed by a language code */ data/namazu2-2.0.21/nmz/libnamazu.h:178: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 lock[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:179: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 result[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:180: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 slog[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:181: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 w[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:182: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 wi[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:183: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 field[MAXPATH]; /* followed by a field name */ data/namazu2-2.0.21/nmz/libnamazu.h:184: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 t[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:185: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 p[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:186: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 pi[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:187: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 tips[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:188: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 access[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:189: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 version[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:190: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 warnlog[MAXPATH]; data/namazu2-2.0.21/nmz/libnamazu.h:207: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 *names[INDEX_MAX + 1]; /* Index names */ data/namazu2-2.0.21/nmz/libnamazu.h:215: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 str[BUFSIZE]; /* Query string */ data/namazu2-2.0.21/nmz/libnamazu.h:216: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 *tab[QUERY_TOKEN_MAX + 1]; /* Token pointers pointed to str */ data/namazu2-2.0.21/nmz/libnamazu.h:237: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 field[BUFSIZE]; data/namazu2-2.0.21/nmz/libnamazu.h:238: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 data[BUFSIZE]; data/namazu2-2.0.21/nmz/re.c:78: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 tmpexpr[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/re.c:117: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[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/re.c:179:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[BUFSIZE]; data/namazu2-2.0.21/nmz/re.c:196: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[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/re.c:205:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). date_index = fopen(NMZ.t, "rb"); data/namazu2-2.0.21/nmz/regex.c:161: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(stackx, stackb, xlen * sizeof (type)); \ data/namazu2-2.0.21/nmz/regex.c:222: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 re_syntax_table[256]; data/namazu2-2.0.21/nmz/regex.c:1239:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char error_msg[ERROR_MSG_MAX_SIZE+1]; data/namazu2-2.0.21/nmz/regex.c:1644: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 str[CHAR_CLASS_MAX_LENGTH + 1]; data/namazu2-2.0.21/nmz/regex.c:2117: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(b, laststart+2, mcnt); data/namazu2-2.0.21/nmz/regex.c:2130: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(b, laststart, mcnt); data/namazu2-2.0.21/nmz/regex.c:2813:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *stacka[NFAILURES]; data/namazu2-2.0.21/nmz/regex.c:3608:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *stacka[1]; data/namazu2-2.0.21/nmz/replace.c:93: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 tmp[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/replace.c:118: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 repl[BUFSIZE]; data/namazu2-2.0.21/nmz/score.c:118: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 fname[BUFSIZE] = "", buf[BUFSIZE]; data/namazu2-2.0.21/nmz/score.c:126:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_field = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/score.c:132:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_field_idx = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/score.c:156: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 fname[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/score.c:164:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_field = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/score.c:183: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 fname[BUFSIZE] = "", buf[BUFSIZE]; data/namazu2-2.0.21/nmz/score.c:190:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_field = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/score.c:196:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_field_idx = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/score.c:412: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 uri[BUFSIZE]; data/namazu2-2.0.21/nmz/score.c:555:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *scoring_method[2]= {"SIMPLE", "TFIDF"}; data/namazu2-2.0.21/nmz/search.c:120: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[BUFSIZE]; data/namazu2-2.0.21/nmz/search.c:169: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[BUFSIZE], tmpkey[BUFSIZE]; data/namazu2-2.0.21/nmz/search.c:417:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). *phrase = fopen(NMZ.p, "rb"); data/namazu2-2.0.21/nmz/search.c:423:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). *phrase_index = fopen(NMZ.pi, "rb"); data/namazu2-2.0.21/nmz/search.c:440: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 *p, tmpkey[BUFSIZE] = "", *words[QUERY_TOKEN_MAX + 1], *prevword = NULL; data/namazu2-2.0.21/nmz/search.c:483:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *word, word_mix[BUFSIZE]; data/namazu2-2.0.21/nmz/search.c:615: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[BUFSIZE * 4] = "", *bufp, *exprp; data/namazu2-2.0.21/nmz/search.c:639: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 tmpexpr[BUFSIZE * 2]; /* because of escaping meta characters */ data/namazu2-2.0.21/nmz/search.c:644:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(NMZ.w, "rb"); data/namazu2-2.0.21/nmz/search.c:670: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 expr[BUFSIZE * 2], /* For escaping meta characters */ data/namazu2-2.0.21/nmz/search.c:681:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file_name, "rb"); data/namazu2-2.0.21/nmz/search.c:707:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((lock = fopen(NMZ.lock, "rb"))) { data/namazu2-2.0.21/nmz/search.c:758: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[BUFSIZE]; data/namazu2-2.0.21/nmz/search.c:770:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(NMZ.access, "rb"); data/namazu2-2.0.21/nmz/search.c:788:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Nmz.i = fopen(NMZ.i, "rb"); data/namazu2-2.0.21/nmz/search.c:793:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Nmz.wi = fopen(NMZ.wi, "rb"); /* Check NMZ.wi at first to recognize index format */ data/namazu2-2.0.21/nmz/search.c:799:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Nmz.ii = fopen(NMZ.ii, "rb"); data/namazu2-2.0.21/nmz/search.c:806:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Nmz.w = fopen(NMZ.w, "rb"); data/namazu2-2.0.21/nmz/search.c:846:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). slog = fopen(NMZ.slog, "a"); data/namazu2-2.0.21/nmz/search.c:987: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 term[BUFSIZE], tmpkey[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/search.c:1141: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 tmpkey[BUFSIZE] = ""; data/namazu2-2.0.21/nmz/util.c:282: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(NMZ.warnlog, "a+"); data/namazu2-2.0.21/nmz/util.c:339: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 work[BUFSIZE]; data/namazu2-2.0.21/nmz/util.c:469:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "rb"); data/namazu2-2.0.21/nmz/wakati.c:127: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[BUFSIZE * 2] = ""; data/namazu2-2.0.21/nmz/wakati.c:136: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 tmp[BUFSIZE]; data/namazu2-2.0.21/src/cgi.c:263: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 name[BUFSIZE]; data/namazu2-2.0.21/src/cgi.c:264: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 value[BUFSIZE]; data/namazu2-2.0.21/src/cgi.c:424: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 field[BUFSIZE]; data/namazu2-2.0.21/src/cgi.c:509: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 name[BUFSIZE] = "", tmp[BUFSIZE] = "", *x; data/namazu2-2.0.21/src/form.c:237: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 value[BUFSIZE] = ""; data/namazu2-2.0.21/src/form.c:270:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char field[BUFSIZE] = ""; data/namazu2-2.0.21/src/form.c:305: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). if (atoi(value) == get_maxresult()) { data/namazu2-2.0.21/src/form.c:320: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 value[BUFSIZE] = ""; data/namazu2-2.0.21/src/form.c:333:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE] = "", *x; data/namazu2-2.0.21/src/form.c:367: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 tmp[BUFSIZE] = ""; data/namazu2-2.0.21/src/form.c:390: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, *p, tmpfname[BUFSIZE] = "", suffix[BUFSIZE] = ""; data/namazu2-2.0.21/src/form.c:536: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, *p, *q, name[BUFSIZE] = ""; data/namazu2-2.0.21/src/namazu-cgi.c:137: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 query[BUFSIZE] = "", subquery[BUFSIZE] = ""; data/namazu2-2.0.21/src/namazu-cgi.c:194:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFSIZE]; data/namazu2-2.0.21/src/namazu-cmd.c:110: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). *out = atoi (nmz_optarg); data/namazu2-2.0.21/src/namazu-cmd.c:314: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 query[BUFSIZE] = "", subquery[BUFSIZE] = ""; data/namazu2-2.0.21/src/namazu.c:70: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 templatedir[BUFSIZE] = ""; data/namazu2-2.0.21/src/namazu.c:144: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 query_with_subquery[BUFSIZE * 2] = ""; data/namazu2-2.0.21/src/output.c:80: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 template_suffix[BUFSIZE] = "normal"; /* suffix of NMZ.result.* */ data/namazu2-2.0.21/src/output.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 emphasis_start_tag[BUFSIZE] = "<strong class=\"keyword\">"; data/namazu2-2.0.21/src/output.c:86: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 emphasis_end_tag[BUFSIZE] = "</strong>"; data/namazu2-2.0.21/src/output.c:87: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 contenttype[BUFSIZE] = "text/html"; data/namazu2-2.0.21/src/output.c:178: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[BUFSIZE] = "", *str; data/namazu2-2.0.21/src/output.c:252: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[BUFSIZE] = ""; data/namazu2-2.0.21/src/output.c:349: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 fname[BUFSIZE] = "", lang_suffix[BUFSIZE] = "", *buf; data/namazu2-2.0.21/src/output.c:350: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 templatesuffix[BUFSIZE] = ""; data/namazu2-2.0.21/src/output.c:391: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 *template_caches[INDEX_MAX]; /* For caching each NMZ.result */ data/namazu2-2.0.21/src/output.c:408: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 templdir[BUFSIZE]; data/namazu2-2.0.21/src/output.c:423: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 result[BUFSIZE * 128] = ""; data/namazu2-2.0.21/src/output.c:458: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 tmpbuf[BUFSIZE] = ""; data/namazu2-2.0.21/src/output.c:686: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 suffix[BUFSIZE] = "", tmpfname[BUFSIZE] = ""; data/namazu2-2.0.21/src/output.c:737: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[BUFSIZE] = ""; data/namazu2-2.0.21/src/output.c:923:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buff[BUFSIZE]; data/namazu2-2.0.21/src/output.c:941:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char suffix[BUFSIZE] = ""; data/namazu2-2.0.21/src/output.c:1126: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[BUFSIZE * 16] = ""; data/namazu2-2.0.21/src/output.c:1167:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 msg[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:78: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 user_namazurc[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:80: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 namazunorc[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:101: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 fnames[3][BUFSIZE]; data/namazu2-2.0.21/src/rcfile.c:335: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). int arg1 = atoi(args->value); data/namazu2-2.0.21/src/rcfile.c:344: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). int arg1 = atoi(args->value); data/namazu2-2.0.21/src/rcfile.c:363: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). int arg1 = atoi(args->value); data/namazu2-2.0.21/src/rcfile.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 tmp[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:567:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char directive[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:589:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char arg[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:720: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[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:723:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "rb"); data/namazu2-2.0.21/src/rcfile.c:806: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 *env_norc, _norc[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:832:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE] = ""; data/namazu2-2.0.21/src/rcfile.c:853:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE] = ""; data/namazu2-2.0.21/src/result.c:141: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[BUFSIZE * 8] = ""; data/namazu2-2.0.21/src/result.c:144:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", d.score); data/namazu2-2.0.21/src/result.c:147:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", counter); data/namazu2-2.0.21/src/result.c:182: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 tmp[BUFSIZE] = ""; data/namazu2-2.0.21/src/result.c:218:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[BUFSIZE] = ""; data/namazu2-2.0.21/src/result.c:368: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 achars[BUFSIZE] = ""; /* acceptable characters */ data/namazu2-2.0.21/src/result.c:384:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char field[BUFSIZE] = ""; data/namazu2-2.0.21/lib/getopt.c:234:51: [1] (buffer) strlen: Does not handle 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 (!defined __STDC__ || !__STDC__) && !defined strlen data/namazu2-2.0.21/lib/getopt.c:237: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). extern int strlen (const char *); data/namazu2-2.0.21/lib/getopt.c:428:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = nonoption_flags_max_len = strlen (orig_str); data/namazu2-2.0.21/lib/getopt.c:656: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). == (unsigned int) strlen (p->name)) data/namazu2-2.0.21/lib/getopt.c:683: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/lib/getopt.c:715: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/lib/getopt.c:731: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/lib/getopt.c:736: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/lib/getopt.c:847:51: [1] (buffer) strlen: Does not handle 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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/namazu2-2.0.21/lib/getopt.c:870: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/lib/getopt.c:890: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/lib/getopt.c:904: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/lib/getopt.c:908: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). nextchar += strlen (nextchar); data/namazu2-2.0.21/nmz/alias.c:80: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). newp->alias = malloc(strlen(alias) + 1); data/namazu2-2.0.21/nmz/alias.c:87: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). newp->real = malloc(strlen(real) + 1); data/namazu2-2.0.21/nmz/codeconv.c:409: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). num = strlen((char *)s); data/namazu2-2.0.21/nmz/codeconv.c:489:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < strlen(s); i++) { data/namazu2-2.0.21/nmz/codeconv.c:559: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). tmp = realloc(tmp, strlen(str) * 5); data/namazu2-2.0.21/nmz/field.c:171:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(data, ""); /* For safety. */ data/namazu2-2.0.21/nmz/field.c:173:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpfield, field, BUFSIZE - 1); data/namazu2-2.0.21/nmz/field.c:186:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data, fc[i].data, BUFSIZE - 1); /* data length should be BUFSIZE - 1 */ data/namazu2-2.0.21/nmz/field.c:193:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, NMZ.field, BUFSIZE - 1); data/namazu2-2.0.21/nmz/field.c:194: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(fname, tmpfield, BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/field.c:194:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(fname, tmpfield, BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/field.c:202: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 string. strncat(fname, ".i", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/field.c:202: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). strncat(fname, ".i", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/field.c:225:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fc[cache_idx].field, tmpfield, BUFSIZE - 1); data/namazu2-2.0.21/nmz/field.c:227:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fc[cache_idx].data, data, BUFSIZE - 1); data/namazu2-2.0.21/nmz/field.c:242:16: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(fc[i].field, ""); data/namazu2-2.0.21/nmz/field.c:243:16: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(fc[i].data, ""); data/namazu2-2.0.21/nmz/hlist.c:118: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). leng = strlen(buf); data/namazu2-2.0.21/nmz/hlist.c:711:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(field_for_sort, field, BUFSIZE - 1); data/namazu2-2.0.21/nmz/i18n.c:113:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lang, value, BUFSIZE - 1); data/namazu2-2.0.21/nmz/i18n.c:135:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lang, value, BUFSIZE - 1); data/namazu2-2.0.21/nmz/i18n.c:149:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). store = (char *)malloc(strlen(lang) + 6); /* do *not* free */ data/namazu2-2.0.21/nmz/i18n.c:192:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, pfname, BUFSIZE - 1); data/namazu2-2.0.21/nmz/i18n.c:193: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). baselen = strlen(fname); data/namazu2-2.0.21/nmz/i18n.c:194: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(fname, ".", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/i18n.c:194: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). strncat(fname, ".", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/i18n.c:196: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(fname, suffix, BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/i18n.c:196:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(fname, suffix, BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/i18n.c:218: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). for (i = (int)strlen(fname) - 1; i >= 0; i--) { data/namazu2-2.0.21/nmz/i18n.c:226: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(fname) < baselen) { data/namazu2-2.0.21/nmz/idxname.c:82: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). indices.names[newidxnum] = malloc(strlen(idxname) + 1); data/namazu2-2.0.21/nmz/idxname.c:139:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). indices.names[i] = malloc(strlen(list->real) + 1); data/namazu2-2.0.21/nmz/idxname.c:165: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). tmp = malloc(strlen(defaultidx) data/namazu2-2.0.21/nmz/idxname.c:166: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). + 1 + strlen(indices.names[i]) + 1); data/namazu2-2.0.21/nmz/idxname.c:172:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(tmp, "/"); data/namazu2-2.0.21/nmz/idxname.c:257:31: [1] (buffer) strlen: Does not handle 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 ((hnptr->word = malloc(strlen(str) +1)) == NULL) { data/namazu2-2.0.21/nmz/idxname.c:272:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(defaultidx, idx, BUFSIZE - 1); data/namazu2-2.0.21/nmz/query.c:154: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(querystring) > QUERY_MAX) { data/namazu2-2.0.21/nmz/re.c:98:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpexpr, expr, BUFSIZE - 1); /* save orig_expr */ data/namazu2-2.0.21/nmz/re.c:101: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). nmz_re_compile_pattern(tmpexpr, strlen(tmpexpr), rp); data/namazu2-2.0.21/nmz/re.c:132: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 (buf[strlen(buf) - 1] != '\n') { /* too long */ data/namazu2-2.0.21/nmz/re.c:136: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). buf[strlen(buf) - 1] = '\0'; /* LF to NULL */ data/namazu2-2.0.21/nmz/re.c:137:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(buf) == 0) { data/namazu2-2.0.21/nmz/re.c:141: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). if (nmz_re_search(rp, buf, strlen(buf), 0, strlen(buf), 0) != -1) { data/namazu2-2.0.21/nmz/re.c:141:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (nmz_re_search(rp, buf, strlen(buf), 0, strlen(buf), 0) != -1) { data/namazu2-2.0.21/nmz/re.c:227: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 (buf[strlen(buf) - 1] != '\n') { /* too long */ data/namazu2-2.0.21/nmz/re.c:231: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). buf[strlen(buf) - 1] = '\0'; /* LF to NULL */ data/namazu2-2.0.21/nmz/re.c:232:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(buf) == 0) { data/namazu2-2.0.21/nmz/re.c:239: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). if (nmz_re_search(rp, buf, strlen(buf), 0, strlen(buf), 0) != -1) { data/namazu2-2.0.21/nmz/re.c:239:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (nmz_re_search(rp, buf, strlen(buf), 0, strlen(buf), 0) != -1) { data/namazu2-2.0.21/nmz/replace.c:100:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, uri, BUFSIZE - 1); data/namazu2-2.0.21/nmz/replace.c:115:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (0 < (mlen = nmz_re_match (re, tmp, strlen (tmp), 0, ®s))) data/namazu2-2.0.21/nmz/replace.c:166:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(uri, repl, BUFSIZE - 1); data/namazu2-2.0.21/nmz/replace.c:167:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(uri + j, tmp + mlen, data/namazu2-2.0.21/nmz/replace.c:168: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). BUFSIZE - (j + strlen(tmp + mlen)) - 1); data/namazu2-2.0.21/nmz/replace.c:177: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). npat = (int)strlen(list->pat); data/namazu2-2.0.21/nmz/replace.c:178: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). nrep = (int)strlen(list->rep); data/namazu2-2.0.21/nmz/replace.c:207:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newp->pat = malloc(strlen(pat) + 1); data/namazu2-2.0.21/nmz/replace.c:214:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newp->rep = malloc(strlen(rep) + 1); data/namazu2-2.0.21/nmz/replace.c:230:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (nmz_re_compile_pattern (newp->pat, strlen (newp->pat), newp->pat_re)) { data/namazu2-2.0.21/nmz/score.c:123:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, NMZ.field, BUFSIZE - 1); data/namazu2-2.0.21/nmz/score.c:124: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 string. strncat(fname, "size", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:124:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(fname, "size", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:131: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 string. strncat(fname, ".i", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:131: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). strncat(fname, ".i", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:161:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, NMZ.t, BUFSIZE - 1); data/namazu2-2.0.21/nmz/score.c:162: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(fname, "\0", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:162: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). strncat(fname, "\0", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:187:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, NMZ.field, BUFSIZE - 1); data/namazu2-2.0.21/nmz/score.c:188: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 string. strncat(fname, "uri", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:188: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). strncat(fname, "uri", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:195: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 string. strncat(fname, ".i", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/score.c:195: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). strncat(fname, ".i", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/nmz/search.c:180:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpkey, key, BUFSIZE - 1); data/namazu2-2.0.21/nmz/search.c:181: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). tmpkey[strlen(tmpkey) - 1] = '\0'; data/namazu2-2.0.21/nmz/search.c:182: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). n = strlen(tmpkey); data/namazu2-2.0.21/nmz/search.c:252: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(key) <= 1) data/namazu2-2.0.21/nmz/search.c:258: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 (*key == '/' && key[strlen(key) - 1] == '/') { data/namazu2-2.0.21/nmz/search.c:267: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). && key[strlen(key) - 1] == '*' data/namazu2-2.0.21/nmz/search.c:268: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). && *(key + strlen(key) - 2) != '\\' ) data/namazu2-2.0.21/nmz/search.c:273: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). } else if (key[strlen(key) - 1] == '*' data/namazu2-2.0.21/nmz/search.c:274: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). && *(key + strlen(key) - 2) != '\\') data/namazu2-2.0.21/nmz/search.c:446:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpkey, key, BUFSIZE - 1); data/namazu2-2.0.21/nmz/search.c:468:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(p) > 0) { data/namazu2-2.0.21/nmz/search.c:570: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). if (*expr == '*' && expr[strlen(expr) - 1] != '*') { data/namazu2-2.0.21/nmz/search.c:574:9: [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(expr, "$", BUFSIZE * 2 - strlen(expr) - 1); data/namazu2-2.0.21/nmz/search.c:574: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). strncat(expr, "$", BUFSIZE * 2 - strlen(expr) - 1); data/namazu2-2.0.21/nmz/search.c:576: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). } else if (*expr != '*' && expr[strlen(expr) - 1] == '*') { data/namazu2-2.0.21/nmz/search.c:578: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). expr[strlen(expr) - 1] = '\0'; data/namazu2-2.0.21/nmz/search.c:580:9: [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 string. strncat(expr, ".*", BUFSIZE * 2 - strlen(expr) - 1); data/namazu2-2.0.21/nmz/search.c:580:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(expr, ".*", BUFSIZE * 2 - strlen(expr) - 1); data/namazu2-2.0.21/nmz/search.c:582: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). } else if (*expr == '*' && expr[strlen(expr) - 1] == '*') { data/namazu2-2.0.21/nmz/search.c:585: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). expr[strlen(expr) - 1] = '\0'; data/namazu2-2.0.21/nmz/search.c:587: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). } else if (*expr == '/' && expr[strlen(expr) - 1] == '/') { data/namazu2-2.0.21/nmz/search.c:593: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). expr[strlen(expr) - 1]= '\0'; data/namazu2-2.0.21/nmz/search.c:601:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((*expr == '"' && expr[strlen(expr) - 1] == '"') data/namazu2-2.0.21/nmz/search.c:602:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || (*expr == '{' && expr[strlen(expr) - 1] == '}')) data/namazu2-2.0.21/nmz/search.c:606: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). expr[strlen(expr) - 1] = '\0'; data/namazu2-2.0.21/nmz/search.c:631:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(expr, buf, bufsize - 1); data/namazu2-2.0.21/nmz/search.c:728: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). line += strlen("allow"); data/namazu2-2.0.21/nmz/search.c:740: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). line += strlen("deny"); data/namazu2-2.0.21/nmz/search.c:932: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(str) >= 3 && (*str == '"' && str[strlen(str) - 1] == '"')) data/namazu2-2.0.21/nmz/search.c:932:50: [1] (buffer) strlen: Does not handle 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(str) >= 3 && (*str == '"' && str[strlen(str) - 1] == '"')) data/namazu2-2.0.21/nmz/search.c:933: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). || (*str == '{' && str[strlen(str) - 1] == '}')) data/namazu2-2.0.21/nmz/search.c:936: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). str[strlen(str) - 1]= '\0'; data/namazu2-2.0.21/nmz/search.c:989:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpkey, key, BUFSIZE - 1); data/namazu2-2.0.21/nmz/search.c:993: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). tmpkey[strlen(tmpkey) - 1] = '\0'; data/namazu2-2.0.21/nmz/search.c:1145:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpkey, key, BUFSIZE - 1); data/namazu2-2.0.21/nmz/search.c:1219: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(str) >= 2 && *str == '/' && str[strlen(str) - 1] == '/') { data/namazu2-2.0.21/nmz/search.c:1219:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) >= 2 && *str == '/' && str[strlen(str) - 1] == '/') { data/namazu2-2.0.21/nmz/util.c:188: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). char *p = str + strlen(str) - 1; data/namazu2-2.0.21/nmz/util.c:224:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int tmp = getc(fp); data/namazu2-2.0.21/nmz/util.c:299:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (fmt[strlen(fmt) - 1] != '\n') { data/namazu2-2.0.21/nmz/util.c:329:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (fmt[strlen(fmt) - 1] != '\n') { data/namazu2-2.0.21/nmz/util.c:346:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = (int)strlen(name) - 1; i >= 0; i--) { data/namazu2-2.0.21/nmz/util.c:352:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(work, base, BUFSIZE - 1); data/namazu2-2.0.21/nmz/util.c:354: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(work, "/", BUFSIZE - strlen(work) - 1); data/namazu2-2.0.21/nmz/util.c:354:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(work, "/", BUFSIZE - strlen(work) - 1); data/namazu2-2.0.21/nmz/util.c:355: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(work, name, BUFSIZE - strlen(work) - 1); data/namazu2-2.0.21/nmz/util.c:355: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). strncat(work, name, BUFSIZE - strlen(work) - 1); data/namazu2-2.0.21/nmz/util.c:356:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, work, BUFSIZE - 1); data/namazu2-2.0.21/nmz/util.c:364: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(str) > 10) { /* Too large number */ data/namazu2-2.0.21/nmz/util.c:416: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). len1 = strlen(str1); data/namazu2-2.0.21/nmz/util.c:417: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). len2 = strlen(str2); data/namazu2-2.0.21/nmz/util.c:431: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). len1 = strlen(str1); data/namazu2-2.0.21/nmz/util.c:432: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). len2 = strlen(str2); data/namazu2-2.0.21/nmz/util.c:446: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). len1 = strlen(str1); data/namazu2-2.0.21/nmz/util.c:447: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). len2 = strlen(str2); data/namazu2-2.0.21/nmz/util.c:611:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, n - 1); data/namazu2-2.0.21/nmz/vsnprintf.c:97:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, p, n-1); data/namazu2-2.0.21/nmz/wakati.c:131: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). for (i = 0; i < (int)strlen(key); ) { data/namazu2-2.0.21/nmz/wakati.c:145:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, key + i, j + 2); data/namazu2-2.0.21/nmz/wakati.c:154:3: [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(buf, key + i, key_leng); data/namazu2-2.0.21/nmz/wakati.c:155:17: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, "\t"); data/namazu2-2.0.21/nmz/wakati.c:165:25: [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(buf, key + i + j, 2); data/namazu2-2.0.21/nmz/wakati.c:168:21: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, "\t"); data/namazu2-2.0.21/nmz/wakati.c:170:21: [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(buf, key + i, 2); data/namazu2-2.0.21/nmz/wakati.c:171:21: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, "\t"); data/namazu2-2.0.21/nmz/wakati.c:182:17: [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(buf, key + i, 1); data/namazu2-2.0.21/nmz/wakati.c:186:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, "\t"); data/namazu2-2.0.21/nmz/wakati.c:191: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(buf) <= BUFSIZE) { data/namazu2-2.0.21/src/cgi.c:170: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). str = str + strlen(str) - 1; data/namazu2-2.0.21/src/cgi.c:188:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp->name = malloc(strlen(name) + 1); data/namazu2-2.0.21/src/cgi.c:195: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). tmp->value = malloc(strlen(value) + 1); data/namazu2-2.0.21/src/cgi.c:231: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). contlen = strlen(query_string); data/namazu2-2.0.21/src/cgi.c:277:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, querystring, len); data/namazu2-2.0.21/src/cgi.c:288: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). tmp = querystring + strlen(querystring); /* last point: '\0' */ data/namazu2-2.0.21/src/cgi.c:295:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(value, querystring, len); data/namazu2-2.0.21/src/cgi.c:354: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(value) > QUERY_MAX) { data/namazu2-2.0.21/src/cgi.c:374: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(value) > QUERY_MAX) { data/namazu2-2.0.21/src/cgi.c:426: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). value += strlen("field:"); data/namazu2-2.0.21/src/cgi.c:428:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(field, value, n); data/namazu2-2.0.21/src/cgi.c:436: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). value += strlen(":ascending"); data/namazu2-2.0.21/src/cgi.c:439: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). value += strlen(":descending"); data/namazu2-2.0.21/src/cgi.c:513:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, pp, BUFSIZE); data/namazu2-2.0.21/src/cgi.c:517:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, pp, BUFSIZE); data/namazu2-2.0.21/src/cgi.c:519: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). pp += strlen(pp); data/namazu2-2.0.21/src/cgi.c:524:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, nmz_get_defaultidx(), BUFSIZE - 1); data/namazu2-2.0.21/src/cgi.c:525: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. Risk is low because the source is a constant character. strncat(tmp, "/", BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/cgi.c:525: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). strncat(tmp, "/", BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/cgi.c:526: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(tmp, name, BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/cgi.c:526:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(tmp, name, BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/form.c:189: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). l = strlen(d); data/namazu2-2.0.21/src/form.c:206: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). for (s += strlen("value=\""); *s && *s != '"'; s++, value++) data/namazu2-2.0.21/src/form.c:272: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 = value + strlen("field:"); data/namazu2-2.0.21/src/form.c:275:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(field, p, n); data/namazu2-2.0.21/src/form.c:336:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, pp, BUFSIZE - 1); data/namazu2-2.0.21/src/form.c:339:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, pp, BUFSIZE - 1); data/namazu2-2.0.21/src/form.c:340: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). pp += strlen(pp); data/namazu2-2.0.21/src/form.c:345: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). strlen(nmz_get_defaultidx()) + 1) == 0) data/namazu2-2.0.21/src/form.c:372:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, start, l); data/namazu2-2.0.21/src/form.c:409:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpfname, fname, BUFSIZE - 1); data/namazu2-2.0.21/src/form.c:410: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(tmpfname, suffix, BUFSIZE - strlen(tmpfname) - 1); data/namazu2-2.0.21/src/form.c:410: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). strncat(tmpfname, suffix, BUFSIZE - strlen(tmpfname) - 1); data/namazu2-2.0.21/src/form.c:449: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). nmz_param_table[0].len_name = strlen(nmz_param_table[0].name); data/namazu2-2.0.21/src/form.c:451: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). nmz_param_table[0].len_value = strlen(nmz_param_table[0].value); data/namazu2-2.0.21/src/form.c:454: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). nmz_param_table[1].len_name = strlen(nmz_param_table[1].name); data/namazu2-2.0.21/src/form.c:456: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). nmz_param_table[1].len_value = strlen(nmz_param_table[1].value); data/namazu2-2.0.21/src/form.c:458: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). newsize = bufsize = strlen(buf) + 1; data/namazu2-2.0.21/src/form.c:508: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). patlen = strlen(pat); data/namazu2-2.0.21/src/form.c:509: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). replen = strlen(rep); data/namazu2-2.0.21/src/form.c:515:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(str + replen, str + patlen, strlen(str) - patlen + 1); data/namazu2-2.0.21/src/form.c:520:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(str + replen, str + patlen, strlen(str) - patlen + 1); data/namazu2-2.0.21/src/namazu-cgi.c:118:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = (int)strlen(dest) - 1; i >= 0; i--) { data/namazu2-2.0.21/src/namazu-cmd.c:220:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nmz_set_sortfield(nmz_optarg + strlen("field:")); data/namazu2-2.0.21/src/namazu-cmd.c:369: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(argv[i]) > QUERY_MAX) { data/namazu2-2.0.21/src/namazu-cmd.c:373:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(query, argv[i++], BUFSIZE - 1); data/namazu2-2.0.21/src/namazu.c:129:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(templatedir, dir, BUFSIZE - 1); data/namazu2-2.0.21/src/namazu.c:159: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(subquery) > 0) { data/namazu2-2.0.21/src/namazu.c:160:9: [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(query_with_subquery, "( ", BUFSIZE * 2 - 1); data/namazu2-2.0.21/src/namazu.c:161:9: [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(query_with_subquery, query, BUFSIZE * 2 - 1 - strlen(query_with_subquery)); data/namazu2-2.0.21/src/namazu.c:161:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(query_with_subquery, query, BUFSIZE * 2 - 1 - strlen(query_with_subquery)); data/namazu2-2.0.21/src/namazu.c:162:9: [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 string. strncat(query_with_subquery, " ) ", BUFSIZE * 2 - 1 - strlen(query_with_subquery)); data/namazu2-2.0.21/src/namazu.c:162:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(query_with_subquery, " ) ", BUFSIZE * 2 - 1 - strlen(query_with_subquery)); data/namazu2-2.0.21/src/namazu.c:163:9: [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(query_with_subquery, subquery, BUFSIZE * 2 - 1 - strlen(query_with_subquery)); data/namazu2-2.0.21/src/namazu.c:163:66: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(query_with_subquery, subquery, BUFSIZE * 2 - 1 - strlen(query_with_subquery)); data/namazu2-2.0.21/src/namazu.c:165:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(query_with_subquery, query, BUFSIZE * 2 - 1); data/namazu2-2.0.21/src/output.c:180:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(ostr) + 1; data/namazu2-2.0.21/src/output.c:190:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf + i, str, 3); data/namazu2-2.0.21/src/output.c:200:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf + i, str, len); data/namazu2-2.0.21/src/output.c:227:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(str, "<", strlen("<")) == 0) { data/namazu2-2.0.21/src/output.c:230:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strncmp(str, ">", strlen(">")) == 0) { data/namazu2-2.0.21/src/output.c:233: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). } else if (strncmp(str, "&", strlen("&")) == 0) { data/namazu2-2.0.21/src/output.c:236:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strncmp(str, """, strlen(""")) == 0) { data/namazu2-2.0.21/src/output.c:245:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ostr, buf, len); data/namazu2-2.0.21/src/output.c:253:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, str, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:353:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, NMZ.result, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:354: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(fname, ".", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/src/output.c:354: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). strncat(fname, ".", BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/src/output.c:356: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(fname, templatesuffix, BUFSIZE - strlen(fname) - 1); /* usually "normal" */ data/namazu2-2.0.21/src/output.c:356:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(fname, templatesuffix, BUFSIZE - strlen(fname) - 1); /* usually "normal" */ data/namazu2-2.0.21/src/output.c:362: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(fname, lang_suffix, BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/src/output.c:362:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(fname, lang_suffix, BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/src/output.c:459:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpbuf, template, BUFSIZE -1); data/namazu2-2.0.21/src/output.c:522:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(qs, "whence=", strlen("whence=")) == 0) { data/namazu2-2.0.21/src/output.c:525: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). for (qs += strlen("whence="); nmz_isdigit((unsigned char)*qs); qs++); data/namazu2-2.0.21/src/output.c:637: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). + strlen(nmz_get_defaultidx()) + 1; data/namazu2-2.0.21/src/output.c:691:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpfname, fname, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:692: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(tmpfname, suffix, BUFSIZE - strlen(tmpfname) - 1); data/namazu2-2.0.21/src/output.c:692:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(tmpfname, suffix, BUFSIZE - strlen(tmpfname) - 1); data/namazu2-2.0.21/src/output.c:898:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(emphasis_start_tag, start_tag, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:899:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(emphasis_end_tag, end_tag, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:917:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(contenttype, str, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:931: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). if (!strncasecmp(p, "charset=", strlen("charset="))) { data/namazu2-2.0.21/src/output.c:947:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, suffix + 1, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:956:17: [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(buff, "ja_JP.SJIS", BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:959:17: [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(buff, "ja_JP.ISO-2022-JP", BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:962:17: [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(buff, "ja", BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:976: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). for(i = (int)strlen(buff) - 1; i >= 0; i--) { data/namazu2-2.0.21/src/output.c:1089:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(template_suffix, tmpl, BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:1108:9: [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(template_suffix, "normal", BUFSIZE - 1); data/namazu2-2.0.21/src/output.c:1187: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 (fmt[strlen(fmt) - 1] != '\n') { data/namazu2-2.0.21/src/rcfile.c:433:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(arg, line, n); data/namazu2-2.0.21/src/rcfile.c:442:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (nn >= (BUFSIZE - strlen(arg))) nn = BUFSIZE - strlen(arg) - 1; data/namazu2-2.0.21/src/rcfile.c:442:63: [1] (buffer) strlen: Does not handle 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 (nn >= (BUFSIZE - strlen(arg))) nn = BUFSIZE - strlen(arg) - 1; data/namazu2-2.0.21/src/rcfile.c:443:13: [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(arg, line, nn); data/namazu2-2.0.21/src/rcfile.c:457:17: [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(arg, line + 1, 1); data/namazu2-2.0.21/src/rcfile.c:480:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, home, BUFSIZE - 1); data/namazu2-2.0.21/src/rcfile.c:481:13: [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(tmp, "/", BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/rcfile.c:481: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). strncat(tmp, "/", BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/rcfile.c:482:13: [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(tmp, str + strlen("~/"), BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/rcfile.c:482: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). strncat(tmp, str + strlen("~/"), BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/rcfile.c:482:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(tmp, str + strlen("~/"), BUFSIZE - strlen(tmp) - 1); data/namazu2-2.0.21/src/rcfile.c:483:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, tmp, BUFSIZE - 1); data/namazu2-2.0.21/src/rcfile.c:504: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). newp->value = malloc(strlen(arg) + 1); data/namazu2-2.0.21/src/rcfile.c:574:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(directive, line, n); data/namazu2-2.0.21/src/rcfile.c:735: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). if (buf[strlen(buf) - 1] == '\\') { /* ending with \ */ data/namazu2-2.0.21/src/rcfile.c:738: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). buf[strlen(buf) - 1] = '\0'; /* Remove ending \ */ data/namazu2-2.0.21/src/rcfile.c:739:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). remaining = (int)(BUFSIZE - strlen(buf) - 1); data/namazu2-2.0.21/src/rcfile.c:744: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). if (fgets(buf + strlen(buf), remaining, fp) == NULL) { data/namazu2-2.0.21/src/rcfile.c:779:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(user_namazurc, arg, BUFSIZE - 1); data/namazu2-2.0.21/src/rcfile.c:786:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(namazunorc, arg, BUFSIZE - 1); data/namazu2-2.0.21/src/rcfile.c:809:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(_norc, env_norc, BUFSIZE - 1); data/namazu2-2.0.21/src/rcfile.c:833:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, namazurcdir, BUFSIZE - 1); data/namazu2-2.0.21/src/rcfile.c:834:13: [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 string. strncat(fname, "/namazurc", data/namazu2-2.0.21/src/rcfile.c:835: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). BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/src/rcfile.c:854:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname, home, BUFSIZE - 1); data/namazu2-2.0.21/src/rcfile.c:855:13: [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 string. strncat(fname, "/.namazurc", data/namazu2-2.0.21/src/rcfile.c:856: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). BUFSIZE - strlen(fname) - 1); data/namazu2-2.0.21/src/result.c:85: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). size_t leng = strlen(numstr); data/namazu2-2.0.21/src/result.c:184:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, str, BUFSIZE - 1); data/namazu2-2.0.21/src/result.c:185:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(str, ""); data/namazu2-2.0.21/src/result.c:188:13: [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 string. strncat(str, "<", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:188:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, "<", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:190:13: [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 string. strncat(str, ">", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:190:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, ">", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:192:13: [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 string. strncat(str, "&", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:192:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, "&", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:194:13: [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 string. strncat(str, """, BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:194:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, """, BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:196:13: [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 string. strncat(str, "'", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:196:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, "'", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:198:13: [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 string. strncat(str, "(", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:198:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, "(", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:200:13: [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 string. strncat(str, ")", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:200:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, ")", BUFSIZE - strlen(str) - 1); data/namazu2-2.0.21/src/result.c:202: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 (strlen(str) < BUFSIZE - 1) data/namazu2-2.0.21/src/result.c:203:17: [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(str, tmp + i, 1); data/namazu2-2.0.21/src/result.c:227:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(key, nmz_get_querytoken(i), BUFSIZE - 1); data/namazu2-2.0.21/src/result.c:231: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). memmove(key, key + 1, strlen(key + 1) + 1); data/namazu2-2.0.21/src/result.c:232: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). key[strlen(key) - 1] = '\0'; data/namazu2-2.0.21/src/result.c:250:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(lowerPtr, word, strlen(word))) { data/namazu2-2.0.21/src/result.c:252:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). endPos = lowerPtr + strlen(word); data/namazu2-2.0.21/src/result.c:253: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). lowerPtr += strlen(word); data/namazu2-2.0.21/src/result.c:254:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ptr += strlen(word); data/namazu2-2.0.21/src/result.c:261:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(lowerPtr, word, strlen(word))) { data/namazu2-2.0.21/src/result.c:263:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). endPos = lowerPtr + strlen(word); data/namazu2-2.0.21/src/result.c:269:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lowerPtr += strlen(word); data/namazu2-2.0.21/src/result.c:270: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). ptr += strlen(word); data/namazu2-2.0.21/src/result.c:288: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). memmove(ptr + 2, ptr, strlen(ptr) + 1); data/namazu2-2.0.21/src/result.c:297:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(key) > 0) { data/namazu2-2.0.21/src/result.c:298: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 (strlen(key) >= 2 data/namazu2-2.0.21/src/result.c:299: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). && ((key[0] == '"' && key[strlen(key) - 1] == '"') data/namazu2-2.0.21/src/result.c:300:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || (key[0] == '{' && key[strlen(key) - 1] == '}') data/namazu2-2.0.21/src/result.c:301:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || (key[0] == '/' && key[strlen(key) - 1] == '/'))) { data/namazu2-2.0.21/src/result.c:302: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). memmove(key, key + 1, strlen(key + 1) + 1); data/namazu2-2.0.21/src/result.c:303: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). key[strlen(key) - 1] = '\0'; data/namazu2-2.0.21/src/result.c:307:43: [1] (buffer) strlen: Does not handle 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(key, key + 1, strlen(key + 1) + 1); data/namazu2-2.0.21/src/result.c:309: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). if (key[strlen(key) - 1] == '*') { data/namazu2-2.0.21/src/result.c:310: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). key[strlen(key) - 1] = '\0'; data/namazu2-2.0.21/src/result.c:315: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). keylen = strlen(key); data/namazu2-2.0.21/src/result.c:323: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). memmove(ptr + 2, ptr, strlen(ptr) + 1); data/namazu2-2.0.21/src/result.c:370:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(r, "\t"); /* '\t' has an important role cf. html_print() */ data/namazu2-2.0.21/src/result.c:372:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(achars, FIELD_SAFE_CHARS, BUFSIZE - 1); data/namazu2-2.0.21/src/result.c:373: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(achars, ":", BUFSIZE - strlen(achars) - 1); /* for namazu::score, namazu::counter */ data/namazu2-2.0.21/src/result.c:373: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). strncat(achars, ":", BUFSIZE - strlen(achars) - 1); /* for namazu::score, namazu::counter */ data/namazu2-2.0.21/src/result.c:380:13: [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(r, p, pp - p); data/namazu2-2.0.21/src/result.c:386:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(field, pp, n); data/namazu2-2.0.21/src/result.c:394:13: [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(r, p, BUFSIZE * 128 - strlen(r) - 1); data/namazu2-2.0.21/src/result.c:394:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(r, p, BUFSIZE * 128 - strlen(r) - 1); ANALYSIS SUMMARY: Hits = 587 Lines analyzed = 20363 in approximately 0.59 seconds (34780 lines/second) Physical Source Lines of Code (SLOC) = 14145 Hits@level = [0] 199 [1] 323 [2] 155 [3] 38 [4] 71 [5] 0 Hits@level+ = [0+] 786 [1+] 587 [2+] 264 [3+] 109 [4+] 71 [5+] 0 Hits/KSLOC@level+ = [0+] 55.5673 [1+] 41.4988 [2+] 18.6638 [3+] 7.7059 [4+] 5.01944 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.