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/gawk-5.0.1+dfsg/eval.c Examining data/gawk-5.0.1+dfsg/awk.h Examining data/gawk-5.0.1+dfsg/awklib/eg/lib/pwcat.c Examining data/gawk-5.0.1+dfsg/awklib/eg/lib/grcat.c Examining data/gawk-5.0.1+dfsg/field.c Examining data/gawk-5.0.1+dfsg/io.c Examining data/gawk-5.0.1+dfsg/cmd.h Examining data/gawk-5.0.1+dfsg/node.c Examining data/gawk-5.0.1+dfsg/awkgram.c Examining data/gawk-5.0.1+dfsg/mbsupport.h Examining data/gawk-5.0.1+dfsg/protos.h Examining data/gawk-5.0.1+dfsg/re.c Examining data/gawk-5.0.1+dfsg/str_array.c Examining data/gawk-5.0.1+dfsg/builtin.c Examining data/gawk-5.0.1+dfsg/support/regex.c Examining data/gawk-5.0.1+dfsg/support/cdefs.h Examining data/gawk-5.0.1+dfsg/support/regex_internal.h Examining data/gawk-5.0.1+dfsg/support/getopt_int.h Examining data/gawk-5.0.1+dfsg/support/random.h Examining data/gawk-5.0.1+dfsg/support/dfa.c Examining data/gawk-5.0.1+dfsg/support/regexec.c Examining data/gawk-5.0.1+dfsg/support/intprops.h Examining data/gawk-5.0.1+dfsg/support/regcomp.c Examining data/gawk-5.0.1+dfsg/support/random.c Examining data/gawk-5.0.1+dfsg/support/getopt1.c Examining data/gawk-5.0.1+dfsg/support/dfa.h Examining data/gawk-5.0.1+dfsg/support/getopt.c Examining data/gawk-5.0.1+dfsg/support/regex_internal.c Examining data/gawk-5.0.1+dfsg/support/verify.h Examining data/gawk-5.0.1+dfsg/support/localeinfo.h Examining data/gawk-5.0.1+dfsg/support/xalloc.h Examining data/gawk-5.0.1+dfsg/support/libc-config.h Examining data/gawk-5.0.1+dfsg/support/localeinfo.c Examining data/gawk-5.0.1+dfsg/support/getopt.h Examining data/gawk-5.0.1+dfsg/support/regex.h Examining data/gawk-5.0.1+dfsg/nonposix.h Examining data/gawk-5.0.1+dfsg/main.c Examining data/gawk-5.0.1+dfsg/version.c Examining data/gawk-5.0.1+dfsg/msg.c Examining data/gawk-5.0.1+dfsg/floatcomp.c Examining data/gawk-5.0.1+dfsg/gawkapi.h Examining data/gawk-5.0.1+dfsg/vms/vms_crtl_init.c Examining data/gawk-5.0.1+dfsg/vms/redirect.h Examining data/gawk-5.0.1+dfsg/vms/vms_misc.c Examining data/gawk-5.0.1+dfsg/vms/vms_args.c Examining data/gawk-5.0.1+dfsg/vms/vms_popen.c Examining data/gawk-5.0.1+dfsg/vms/vms_cli.c Examining data/gawk-5.0.1+dfsg/vms/vms_fwrite.c Examining data/gawk-5.0.1+dfsg/vms/unixlib.h Examining data/gawk-5.0.1+dfsg/vms/vms_gawk.c Examining data/gawk-5.0.1+dfsg/vms/vms.h Examining data/gawk-5.0.1+dfsg/vms/varargs.h Examining data/gawk-5.0.1+dfsg/gettext.h Examining data/gawk-5.0.1+dfsg/gawkmisc.c Examining data/gawk-5.0.1+dfsg/mpfr.c Examining data/gawk-5.0.1+dfsg/missing_d/snprintf.c Examining data/gawk-5.0.1+dfsg/missing_d/fnmatch.h Examining data/gawk-5.0.1+dfsg/missing_d/setenv.c Examining data/gawk-5.0.1+dfsg/missing_d/wcmisc.c Examining data/gawk-5.0.1+dfsg/missing_d/strftime.c Examining data/gawk-5.0.1+dfsg/missing_d/memcpy.c Examining data/gawk-5.0.1+dfsg/missing_d/strncasecmp.c Examining data/gawk-5.0.1+dfsg/missing_d/getaddrinfo.c Examining data/gawk-5.0.1+dfsg/missing_d/timegm.c Examining data/gawk-5.0.1+dfsg/missing_d/strerror.c Examining data/gawk-5.0.1+dfsg/missing_d/strchr.c Examining data/gawk-5.0.1+dfsg/missing_d/mktime.c Examining data/gawk-5.0.1+dfsg/missing_d/fnmatch.c Examining data/gawk-5.0.1+dfsg/missing_d/system.c Examining data/gawk-5.0.1+dfsg/missing_d/strtoul.c Examining data/gawk-5.0.1+dfsg/missing_d/strcoll.c Examining data/gawk-5.0.1+dfsg/missing_d/tzset.c Examining data/gawk-5.0.1+dfsg/missing_d/strtod.c Examining data/gawk-5.0.1+dfsg/missing_d/mktime-internal.h Examining data/gawk-5.0.1+dfsg/missing_d/getaddrinfo.h Examining data/gawk-5.0.1+dfsg/missing_d/usleep.c Examining data/gawk-5.0.1+dfsg/missing_d/memcmp.c Examining data/gawk-5.0.1+dfsg/missing_d/memmove.c Examining data/gawk-5.0.1+dfsg/missing_d/memset.c Examining data/gawk-5.0.1+dfsg/gawkapi.c Examining data/gawk-5.0.1+dfsg/pc/langinfo.h Examining data/gawk-5.0.1+dfsg/pc/dlfcn.h Examining data/gawk-5.0.1+dfsg/pc/popen.c Examining data/gawk-5.0.1+dfsg/pc/getid.c Examining data/gawk-5.0.1+dfsg/pc/config.h Examining data/gawk-5.0.1+dfsg/pc/socket.h Examining data/gawk-5.0.1+dfsg/pc/in.h Examining data/gawk-5.0.1+dfsg/pc/popen.h Examining data/gawk-5.0.1+dfsg/floatmagic.h Examining data/gawk-5.0.1+dfsg/array.c Examining data/gawk-5.0.1+dfsg/replace.c Examining data/gawk-5.0.1+dfsg/cint_array.c Examining data/gawk-5.0.1+dfsg/command.c Examining data/gawk-5.0.1+dfsg/int_array.c Examining data/gawk-5.0.1+dfsg/interpret.h Examining data/gawk-5.0.1+dfsg/profile.c Examining data/gawk-5.0.1+dfsg/extension/gawkfts.h Examining data/gawk-5.0.1+dfsg/extension/ordchr.c Examining data/gawk-5.0.1+dfsg/extension/gawkdirfd.h Examining data/gawk-5.0.1+dfsg/extension/readdir.c Examining data/gawk-5.0.1+dfsg/extension/revoutput.c Examining data/gawk-5.0.1+dfsg/extension/rwarray.c Examining data/gawk-5.0.1+dfsg/extension/time.c Examining data/gawk-5.0.1+dfsg/extension/revtwoway.c Examining data/gawk-5.0.1+dfsg/extension/readfile.c Examining data/gawk-5.0.1+dfsg/extension/intdiv.c Examining data/gawk-5.0.1+dfsg/extension/filefuncs.c Examining data/gawk-5.0.1+dfsg/extension/testext.c Examining data/gawk-5.0.1+dfsg/extension/fnmatch.c Examining data/gawk-5.0.1+dfsg/extension/readdir_test.c Examining data/gawk-5.0.1+dfsg/extension/inplace.c Examining data/gawk-5.0.1+dfsg/extension/stack.h Examining data/gawk-5.0.1+dfsg/extension/stack.c Examining data/gawk-5.0.1+dfsg/extension/ext_custom.h Examining data/gawk-5.0.1+dfsg/extension/gawkfts.c Examining data/gawk-5.0.1+dfsg/extension/fork.c Examining data/gawk-5.0.1+dfsg/extension/rwarray0.c Examining data/gawk-5.0.1+dfsg/posix/gawkmisc.c Examining data/gawk-5.0.1+dfsg/symbol.c Examining data/gawk-5.0.1+dfsg/debug.c Examining data/gawk-5.0.1+dfsg/ext.c Examining data/gawk-5.0.1+dfsg/custom.h FINAL RESULTS: data/gawk-5.0.1+dfsg/debug.c:5479:2: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(file, 0600); data/gawk-5.0.1+dfsg/extension/filefuncs.c:105:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #define readlink(f,b,bs) (-1) data/gawk-5.0.1+dfsg/extension/filefuncs.c:285:20: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((*linksize = readlink(fname, buf, bufsize)) < 0) { data/gawk-5.0.1+dfsg/extension/inplace.c:59:10: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # define chown(x,y,z) (0) data/gawk-5.0.1+dfsg/extension/inplace.c:174:6: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(state.tname, sbuf.st_uid, sbuf.st_gid) < 0) { data/gawk-5.0.1+dfsg/extension/inplace.c:177:10: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. junk = chown(state.tname, -1, sbuf.st_gid); data/gawk-5.0.1+dfsg/extension/inplace.c:181:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(state.tname, sbuf.st_mode) < 0) data/gawk-5.0.1+dfsg/array.c:213:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. alen += sprintf(aname + alen, "[\"%s\"]", symbol->vname); data/gawk-5.0.1+dfsg/array.c:299:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. s += sprintf(s, "%s (", symbol->vname); data/gawk-5.0.1+dfsg/array.c:304:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. s += sprintf(s, from, symbol->vname); data/gawk-5.0.1+dfsg/array.c:307:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. s += sprintf(s, from, aname); data/gawk-5.0.1+dfsg/awkgram.c:1273:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/gawk-5.0.1+dfsg/awkgram.c:4861:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "awk::%s", tokentab[i].operator); data/gawk-5.0.1+dfsg/awkgram.c:5091: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(bp, mesg); data/gawk-5.0.1+dfsg/awkgram.c:7418:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. print_vars(vars, fprintf, fp); data/gawk-5.0.1+dfsg/awkgram.c:7643: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(fp->name, name); data/gawk-5.0.1+dfsg/awkgram.c:7892:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. pp_string_fp(fprintf, stdout, str, len, '"', true); data/gawk-5.0.1+dfsg/awkgram.c:7915:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. pp_string_fp(fprintf, stdout, str1, len1, '"', true); data/gawk-5.0.1+dfsg/awkgram.c:7918:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. pp_string_fp(fprintf, stdout, str2, len2, '"', true); data/gawk-5.0.1+dfsg/awkgram.c:9117: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(buffer, c1->memory->stptr); data/gawk-5.0.1+dfsg/awkgram.c:9120:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, c1->comment->memory->stptr); data/gawk-5.0.1+dfsg/awkgram.c:9125:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, c2->memory->stptr); data/gawk-5.0.1+dfsg/awkgram.c:9128:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, c2->comment->memory->stptr); data/gawk-5.0.1+dfsg/awkgram.c:9359:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s::%s", current_namespace, name); data/gawk-5.0.1+dfsg/builtin.c:1602: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. while ((nc = snprintf(obufout, ofre, cpbuf, data/gawk-5.0.1+dfsg/builtin.c:1610: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. while ((nc = snprintf(obufout, ofre, cpbuf, data/gawk-5.0.1+dfsg/builtin.c:2191:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. status = system(cmd); data/gawk-5.0.1+dfsg/builtin.c:4220:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, mpfr_sgn(n->mpg_numbr) < 0 ? "-nan" : "+nan"); data/gawk-5.0.1+dfsg/builtin.c:4224:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, mpfr_sgn(n->mpg_numbr) < 0 ? "-inf" : "+inf"); data/gawk-5.0.1+dfsg/builtin.c:4236: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, signbit(val) != 0 ? "-nan" : "+nan"); data/gawk-5.0.1+dfsg/builtin.c:4240: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, val < 0 ? "-inf" : "+inf"); data/gawk-5.0.1+dfsg/command.c:896:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/gawk-5.0.1+dfsg/command.c:2777: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(out_fp, mesg, args); data/gawk-5.0.1+dfsg/debug.c:34:9: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define execvp(p,a) w32_execvp(p,a) data/gawk-5.0.1+dfsg/debug.c:415: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(out_fp, mesg, args); data/gawk-5.0.1+dfsg/debug.c:964:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. valinfo(r->var_value, fprintf, out_fp); data/gawk-5.0.1+dfsg/debug.c:1071:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. valinfo(*lhs, fprintf, out_fp); data/gawk-5.0.1+dfsg/debug.c:1143:14: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. valinfo(r, fprintf, out_fp); data/gawk-5.0.1+dfsg/debug.c:1282:22: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. valinfo(newval, fprintf, out_fp); data/gawk-5.0.1+dfsg/debug.c:1556:16: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. valinfo(r, fprintf, out_fp); data/gawk-5.0.1+dfsg/debug.c:1933:24: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. pf_data.print_func = fprintf; data/gawk-5.0.1+dfsg/debug.c:2017:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fp, (cur_frame > 0 ? _("#%ld\tin ") : "#%ld\t "), cur_frame); data/gawk-5.0.1+dfsg/debug.c:2922:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(d_argv[0], d_argv); data/gawk-5.0.1+dfsg/debug.c:2976:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fp, (! exiting && exit_val != EXIT_SUCCESS) data/gawk-5.0.1+dfsg/debug.c:3440:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fp, IS_SUBSCRIPT(w) ? \ data/gawk-5.0.1+dfsg/debug.c:3443:16: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. valinfo(w->V, fprintf, out_fp); data/gawk-5.0.1+dfsg/debug.c:3581:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. valinfo(r, fprintf, out_fp); data/gawk-5.0.1+dfsg/debug.c:3618:29: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. print_instruction(cur_pc, fprintf, out_fp, false); data/gawk-5.0.1+dfsg/debug.c:4183:24: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. pf_data.print_func = fprintf; data/gawk-5.0.1+dfsg/debug.c:4354: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. nchar = vsnprintf(buf + bl, buflen - bl, format, args); data/gawk-5.0.1+dfsg/debug.c:4559:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf + bl, h->line); data/gawk-5.0.1+dfsg/debug.c:5664:23: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. pf_data.print_func = fprintf; data/gawk-5.0.1+dfsg/eval.c:489:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(sp, tab[i].name); data/gawk-5.0.1+dfsg/ext.c:116:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s::%s", name_space, name); data/gawk-5.0.1+dfsg/extension/inplace.c:167:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(state.tname, "%s.gawk.XXXXXX", filename.str_value.str); data/gawk-5.0.1+dfsg/extension/inplace.c:243:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(bakname, "%s%s", data/gawk-5.0.1+dfsg/extension/readdir.c:55:53: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #error Cannot compile the readdir extension on this system! data/gawk-5.0.1+dfsg/extension/readdir.c:113: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(fname, dirname); data/gawk-5.0.1+dfsg/extension/readdir.c:115:2: [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(fname, entry->d_name); data/gawk-5.0.1+dfsg/extension/readdir.c:149:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s\\%s", dirname, entry->d_name); data/gawk-5.0.1+dfsg/extension/readdir.c:206:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len = sprintf(the_dir->buf, "%I64u/%s", ino, dirent->d_name); data/gawk-5.0.1+dfsg/extension/readdir.c:208:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len = sprintf(the_dir->buf, "%llu/%s", ino, dirent->d_name); data/gawk-5.0.1+dfsg/extension/readdir.c:212:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len += sprintf(the_dir->buf + len, "/%s", ftstr); data/gawk-5.0.1+dfsg/extension/readdir_test.c:55:53: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #error Cannot compile the readdir extension on this system! data/gawk-5.0.1+dfsg/extension/readdir_test.c:118: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(fname, dirname); data/gawk-5.0.1+dfsg/extension/readdir_test.c:120:2: [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(fname, entry->d_name); data/gawk-5.0.1+dfsg/extension/readdir_test.c:154:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s\\%s", dirname, entry->d_name); data/gawk-5.0.1+dfsg/extension/readdir_test.c:216:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len += (flen = sprintf(the_dir->buf + len, "/%s", dirent->d_name)); data/gawk-5.0.1+dfsg/extension/readdir_test.c:220:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len += (flen = sprintf(the_dir->buf + len, "/%s", ftstr)); data/gawk-5.0.1+dfsg/gawkapi.c:1612:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s::%s", name_space, name); data/gawk-5.0.1+dfsg/gawkapi.h:1121:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, #extension ": version mismatch with gawk!\n"); \ data/gawk-5.0.1+dfsg/gawkapi.h:1158:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, #extension ": GMP version mismatch with gawk!\n"); \ data/gawk-5.0.1+dfsg/gawkapi.h:1166:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, #extension ": MPFR version mismatch with gawk!\n"); \ data/gawk-5.0.1+dfsg/io.c:910:25: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((rp->output.fp = popen(str, binmode("w"))) == NULL) data/gawk-5.0.1+dfsg/io.c:2035:3: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", command, NULL); data/gawk-5.0.1+dfsg/io.c:2087:3: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", command, NULL); data/gawk-5.0.1+dfsg/io.c:2212: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(slavenam, tem); data/gawk-5.0.1+dfsg/io.c:2242:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(slavenam, R_OK | W_OK) == 0) data/gawk-5.0.1+dfsg/io.c:2432:3: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", str, NULL); data/gawk-5.0.1+dfsg/io.c:2669:3: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", cmd, NULL); data/gawk-5.0.1+dfsg/io.c:2735:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. current = popen(cmd, binmode("r")); data/gawk-5.0.1+dfsg/io.c:2996:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, src); data/gawk-5.0.1+dfsg/io.c:3012:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, pi->awkpath[i]); data/gawk-5.0.1+dfsg/io.c:3013:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(path, src); data/gawk-5.0.1+dfsg/io.c:3060:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file_ext, "%s%s", src, EXTLIB_SUFFIX); data/gawk-5.0.1+dfsg/io.c:3088:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file_awk, "%s%s", src, DEFAULT_FILETYPE); data/gawk-5.0.1+dfsg/io.c:4281: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(sub->stptr, pidx1); data/gawk-5.0.1+dfsg/io.c:4283: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(sub->stptr, pidx2); data/gawk-5.0.1+dfsg/io.c:4285:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sub->stptr, "%s%.*s%s", pidx1, (int)subsep->stlen, data/gawk-5.0.1+dfsg/main.c:699:2: [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(_(blurb_part1), UPDATE_YEAR); /* Last update year */ data/gawk-5.0.1+dfsg/main.c:1010:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "GNU MPFR %s", mpfr_get_version()); data/gawk-5.0.1+dfsg/main.c:1012:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "GNU MP %s", gmp_version); data/gawk-5.0.1+dfsg/missing_d/snprintf.c:84:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmpfilename, "%s/%s", tmpdir, template); data/gawk-5.0.1+dfsg/missing_d/snprintf.c:118: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 *restrict buf, size_t len, data/gawk-5.0.1+dfsg/missing_d/snprintf.c:142:11: [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. actual = vfprintf (fp, fmt, args); data/gawk-5.0.1+dfsg/missing_d/snprintf.c:177: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 *restrict buf, size_t len, const char *restrict fmt, ...) data/gawk-5.0.1+dfsg/missing_d/snprintf.c:183:7: [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. rv = vsnprintf (buf, len, fmt, args); data/gawk-5.0.1+dfsg/missing_d/system.c:22:1: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s) data/gawk-5.0.1+dfsg/missing_d/tzset.c:36:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(tz1, timezone(tz.tz_minuteswest, 0)); data/gawk-5.0.1+dfsg/missing_d/tzset.c:37:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(tz2, timezone(tz.tz_minuteswest, 1)); data/gawk-5.0.1+dfsg/msg.c:105: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, emsg, argp); data/gawk-5.0.1+dfsg/pc/popen.c:8:8: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #undef popen data/gawk-5.0.1+dfsg/pc/popen.c:10:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #undef system data/gawk-5.0.1+dfsg/pc/popen.c:80:14: [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). slashify(strcpy(cmd, s), p); data/gawk-5.0.1+dfsg/pc/popen.c:94: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(p = cmd + strlen(cmd), name); free(name); data/gawk-5.0.1+dfsg/pc/popen.c:190:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(quoted, "\"%s\"", cmd); data/gawk-5.0.1+dfsg/pc/popen.c:197:24: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define os_system(cmd) system(cmd) data/gawk-5.0.1+dfsg/pc/popen.c:214:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. current = popen(command, mode); data/gawk-5.0.1+dfsg/pc/popen.c:216: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(pipes[cur].pmode, curmode); data/gawk-5.0.1+dfsg/pc/popen.c:249: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(pipes[cur].pmode, curmode); data/gawk-5.0.1+dfsg/pc/popen.h:5:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # if defined (popen) data/gawk-5.0.1+dfsg/pc/popen.h:6:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/gawk-5.0.1+dfsg/pc/popen.h:9:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define popen(c, m) os_popen(c, m) data/gawk-5.0.1+dfsg/pc/popen.h:14:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define system(c) os_system(c) data/gawk-5.0.1+dfsg/profile.c:437:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s%s%s%.*s %s", t1->pp_str, op2str(pc->opcode), data/gawk-5.0.1+dfsg/profile.c:1130:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s ? %s : %s", cond->pp_str, t->pp_str, f->pp_str); data/gawk-5.0.1+dfsg/profile.c:1138:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, data/gawk-5.0.1+dfsg/profile.c:1157:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, data/gawk-5.0.1+dfsg/profile.c:1173:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, data/gawk-5.0.1+dfsg/profile.c:1728: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(str, n->stptr); data/gawk-5.0.1+dfsg/profile.c:2085:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "awk::%s", name); data/gawk-5.0.1+dfsg/protos.h:37:14: [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). extern char *strcpy(char *, const char *); data/gawk-5.0.1+dfsg/protos.h:38:14: [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). extern char *strcat(char *, const char *); data/gawk-5.0.1+dfsg/protos.h:67:12: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int fprintf(FILE *, const char *, ...); data/gawk-5.0.1+dfsg/protos.h:75:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. extern FILE *popen(const char *, const char *); data/gawk-5.0.1+dfsg/protos.h:80:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. extern int system(const char *); data/gawk-5.0.1+dfsg/protos.h:81:12: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. extern int sscanf(const char *, const char *, ...); data/gawk-5.0.1+dfsg/protos.h:102:12: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. extern int execl(const char *, const char *, ...); data/gawk-5.0.1+dfsg/protos.h:137:12: [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. extern int snprintf(char *restrict buf, size_t len, const char *restrict fmt, ...); data/gawk-5.0.1+dfsg/support/dfa.c:2801:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, data/gawk-5.0.1+dfsg/vms/redirect.h:85:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define popen vms_popen data/gawk-5.0.1+dfsg/vms/redirect.h:88:9: [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 gawk_snprintf /* avoid %CC-I-INTRINSICDECL diagnostic */ data/gawk-5.0.1+dfsg/vms/redirect.h:89: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. #define vsnprintf gawk_vsnprintf data/gawk-5.0.1+dfsg/vms/redirect.h:92:12: [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. extern int snprintf(char *,size_t,const char *,...); data/gawk-5.0.1+dfsg/vms/redirect.h:93:12: [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. extern int vsnprintf(char *restrict,size_t,const char *,va_list); data/gawk-5.0.1+dfsg/vms/redirect.h:113:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. extern FILE *popen(const char *,const char *); data/gawk-5.0.1+dfsg/vms/vms_args.c:329: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(spec_buf, prospective_filespec); /* copy the arg */ data/gawk-5.0.1+dfsg/vms/vms_cli.c:110: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). strcat(strcpy(longbuf, cmd_verb), " "), ltmp = strlen(longbuf); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:69:2: [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(strcat(buf.arg.buf, W_cnt++ ? "," : ""), optname) data/gawk-5.0.1+dfsg/vms/vms_gawk.c:69:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strcat(buf.arg.buf, W_cnt++ ? "," : ""), optname) data/gawk-5.0.1+dfsg/vms/vms_gawk.c:281:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, usage_txt, CmdName, CmdName, CmdName, CmdName); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:282:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, options_txt); data/gawk-5.0.1+dfsg/vms/vms_misc.c:63:12: [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). return strcpy(result, str); data/gawk-5.0.1+dfsg/vms/vms_misc.c:77: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, file_spec); /* copy file name */ data/gawk-5.0.1+dfsg/vms/vms_misc.c:251:7: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *popen( const char *command, const char *mode ) { data/gawk-5.0.1+dfsg/vms/vms_popen.c:28:1: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. popen( const char *command, const char *mode ) data/gawk-5.0.1+dfsg/vms/vms_popen.c:70:14: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). extern char *mktemp(char *); data/gawk-5.0.1+dfsg/vms/vms_popen.c:96:1: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. popen( const char *command, const char *mode ) data/gawk-5.0.1+dfsg/vms/vms_popen.c:111:17: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). if ((name = mktemp(strdup("sys$scratch:gawk-pipe_XXXXXX.tmp"))) == 0) data/gawk-5.0.1+dfsg/awkgram.c:4818:70: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. {"srand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand, MPF(srand)}, data/gawk-5.0.1+dfsg/awkgram.c:5506: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. char *cp = getenv("AWKREADFUNC"); data/gawk-5.0.1+dfsg/awkgram.c:5583: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. char *cp = getenv("AWKREADFUNC"); data/gawk-5.0.1+dfsg/builtin.c:72:14: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. extern char *setstate(char *state); data/gawk-5.0.1+dfsg/builtin.c:73:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. extern long random(void); data/gawk-5.0.1+dfsg/builtin.c:74:13: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. extern void srandom(unsigned long seed); data/gawk-5.0.1+dfsg/builtin.c:2555:3: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. setstate(state); data/gawk-5.0.1+dfsg/builtin.c:2615:8: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. d1 = random(); data/gawk-5.0.1+dfsg/builtin.c:2616:8: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. d2 = random(); data/gawk-5.0.1+dfsg/builtin.c:2637:10: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. (void) setstate(state); data/gawk-5.0.1+dfsg/builtin.c:2641:3: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom((unsigned int) (save_seed = (long) time((time_t *) 0))); data/gawk-5.0.1+dfsg/builtin.c:2646:3: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom((unsigned int) (save_seed = (long) force_number(tmp)->numbr)); data/gawk-5.0.1+dfsg/debug.c:2810:13: [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 ((run = getenv("DGAWK_RESTART")) != NULL) { data/gawk-5.0.1+dfsg/debug.c:4843:8: [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. val = getenv(env_variable[type]); data/gawk-5.0.1+dfsg/io.c:1841: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. if ((cp = getenv("GAWK_SOCK_RETRIES")) != NULL) { data/gawk-5.0.1+dfsg/io.c:1852:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((ms2 = getenv("GAWK_MSEC_SLEEP")) != NULL) { data/gawk-5.0.1+dfsg/io.c:2376: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. pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c", data/gawk-5.0.1+dfsg/io.c:2646: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. pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c", data/gawk-5.0.1+dfsg/io.c:2924: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. if ((path = getenv(pi->envname)) == NULL || *path == '\0') data/gawk-5.0.1+dfsg/main.c:228:6: [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("TIDYMEM") != NULL) data/gawk-5.0.1+dfsg/main.c:244: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 ((cp = getenv("GAWK_LOCALE_DIR")) != NULL) data/gawk-5.0.1+dfsg/main.c:331: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. if (! do_posix && getenv("POSIXLY_CORRECT") != NULL) { data/gawk-5.0.1+dfsg/main.c:885:8: [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. val = getenv(pname); data/gawk-5.0.1+dfsg/main.c:1508:13: [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 ((val = getenv(name)) != NULL && isdigit((unsigned char) *val)) { data/gawk-5.0.1+dfsg/main.c:1538:12: [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. (c = getopt_long(argc, argv, optlist, optab, NULL)) != EOF; data/gawk-5.0.1+dfsg/missing_d/fnmatch.c:123:33: [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 !defined _LIBC && !defined getenv data/gawk-5.0.1+dfsg/missing_d/fnmatch.c:124: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/gawk-5.0.1+dfsg/missing_d/fnmatch.c:299:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; data/gawk-5.0.1+dfsg/missing_d/mktime.c:108: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. const char *tz = getenv ("TZ"); data/gawk-5.0.1+dfsg/missing_d/snprintf.c:68:17: [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 ((tmpdir = getenv("TMPDIR")) != NULL && *tmpdir != '\0') data/gawk-5.0.1+dfsg/missing_d/snprintf.c:70: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. else if ((tmpdir = getenv("TEMP")) != NULL && *tmpdir != '\0') data/gawk-5.0.1+dfsg/missing_d/timegm.c:10:13: [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 *tz = getenv("TZ"); data/gawk-5.0.1+dfsg/msg.c:53:19: [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. add_src_info = (getenv("GAWK_MSG_SRC") != NULL); data/gawk-5.0.1+dfsg/pc/popen.c:76:14: [3] (tmpfile) tempnam: Temporary file race condition (CWE-377). if((name = tempnam(".", "pip")) == NULL) return(NULL); data/gawk-5.0.1+dfsg/pc/popen.c:77:7: [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. p = getenv("COMSPEC"); s = getenv("SHELL"); data/gawk-5.0.1+dfsg/pc/popen.c:77:30: [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. p = getenv("COMSPEC"); s = getenv("SHELL"); data/gawk-5.0.1+dfsg/pc/popen.c:127: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. char *cmdexe = getenv("ComSpec"); data/gawk-5.0.1+dfsg/pc/popen.c:223:16: [3] (tmpfile) tempnam: Temporary file race condition (CWE-377). if((name = tempnam(".","pip"))==NULL) data/gawk-5.0.1+dfsg/posix/gawkmisc.c:109: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. if ((val = getenv("AWKBUFSIZE")) != NULL) { data/gawk-5.0.1+dfsg/protos.h:34: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(const char *); data/gawk-5.0.1+dfsg/re.c:72:13: [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. no_dfa = (getenv("GAWK_NO_DFA") != NULL); data/gawk-5.0.1+dfsg/str_array.c:114: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. if ((val = getenv("AWK_HASH")) != NULL && strcmp(val, "gst") == 0) data/gawk-5.0.1+dfsg/support/getopt.c:154: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/gawk-5.0.1+dfsg/support/getopt.c:155: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/gawk-5.0.1+dfsg/support/getopt.c:292:46: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. d->__posixly_correct = posixly_correct | !!getenv ("POSIXLY_CORRECT"); data/gawk-5.0.1+dfsg/support/getopt.c:1205: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 (int argc, char *const *argv, const char *optstring) data/gawk-5.0.1+dfsg/support/getopt.c:1241: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/gawk-5.0.1+dfsg/support/getopt.h:60:10: [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. # define getopt gawk_getopt data/gawk-5.0.1+dfsg/support/getopt.h:61:10: [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 getopt_long gawk_getopt_long data/gawk-5.0.1+dfsg/support/getopt.h:165: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/gawk-5.0.1+dfsg/support/getopt.h:174:30: [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 __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv, data/gawk-5.0.1+dfsg/support/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. # define getopt __posix_getopt data/gawk-5.0.1+dfsg/support/getopt.h:184: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/gawk-5.0.1+dfsg/support/getopt.h:188:12: [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. extern int getopt_long (int ___argc, char *const *___argv, data/gawk-5.0.1+dfsg/support/getopt1.c:67:1: [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. getopt_long (int argc, char *const *argv, const char *options, data/gawk-5.0.1+dfsg/support/getopt1.c:130:11: [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. c = getopt_long (argc, argv, "abc:d:0123456789", data/gawk-5.0.1+dfsg/support/random.c:319:1: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(x) data/gawk-5.0.1+dfsg/support/random.c:337:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. (void)random(); data/gawk-5.0.1+dfsg/support/random.c:376:3: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); data/gawk-5.0.1+dfsg/support/random.c:451:2: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(seed); data/gawk-5.0.1+dfsg/support/random.c:479:1: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. setstate(arg_state) data/gawk-5.0.1+dfsg/support/random.c:561:1: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. random() data/gawk-5.0.1+dfsg/support/random.h:27:9: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define setstate gawk_setstate data/gawk-5.0.1+dfsg/support/random.h:28:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random gawk_random data/gawk-5.0.1+dfsg/support/random.h:29:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom gawk_srandom data/gawk-5.0.1+dfsg/support/random.h:43:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. extern long random (void); data/gawk-5.0.1+dfsg/vms/redirect.h:35:9: [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. #define getopt gnu_getopt data/gawk-5.0.1+dfsg/vms/redirect.h:119: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,char **,char *); data/gawk-5.0.1+dfsg/vms/unixlib.h:17:7: [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 *getenv(), *getcwd(); data/gawk-5.0.1+dfsg/vms/vms_args.c:114:10: [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("AWK_LIBRARY")) data/gawk-5.0.1+dfsg/vms/vms_args.c:119:13: [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. shell = getenv("SHELL"); data/gawk-5.0.1+dfsg/array.c:223:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aname, symbol->vname, alen + 1); data/gawk-5.0.1+dfsg/array.c:305:8: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s += sprintf(s, ", "); data/gawk-5.0.1+dfsg/array.c:411:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str, r->stptr, r->stlen); data/gawk-5.0.1+dfsg/array.c:418:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, SUBSEP, subseplen); data/gawk-5.0.1+dfsg/array.c:422:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, r->stptr, r->stlen); data/gawk-5.0.1+dfsg/awk.h:162:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memcpy memcpy_ulong data/gawk-5.0.1+dfsg/awkgram.c:1522: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/gawk-5.0.1+dfsg/awkgram.c:1711: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 yymsgbuf[128]; data/gawk-5.0.1+dfsg/awkgram.c:3852:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(n1->stptr + n1->stlen, n2->stptr, n2->stlen); data/gawk-5.0.1+dfsg/awkgram.c:4841: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 cur_char_ring[RING_BUFFER_SIZE]; data/gawk-5.0.1+dfsg/awkgram.c:4854:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[100]; data/gawk-5.0.1+dfsg/awkgram.c:5637:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, scan, savelen); data/gawk-5.0.1+dfsg/awkgram.c:6914:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tokkey + 1, tokstart, tok - tokstart); data/gawk-5.0.1+dfsg/awkgram.c:7009:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char etoa_xlate[256]; data/gawk-5.0.1+dfsg/awkgram.c:7411:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). else if ((fp = fopen(fname, "w")) == NULL) { data/gawk-5.0.1+dfsg/awkgram.c:8904: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[BUFSIZ]; data/gawk-5.0.1+dfsg/awkgram.c:8918:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, buf, strlen(buf)); data/gawk-5.0.1+dfsg/awkgram.c:9072:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(n->stptr, str, len); data/gawk-5.0.1+dfsg/builtin.c:655:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(obufout, s, (size_t) (l)); \ data/gawk-5.0.1+dfsg/builtin.c:711: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 stackbuf[30]; data/gawk-5.0.1+dfsg/builtin.c:762:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. emalloc(cpbufs[0].buf, char *, 2*cpbufs[0].bufsize, \ data/gawk-5.0.1+dfsg/builtin.c:764:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((cp = cpbufs[0].buf+cpbufs[0].bufsize), prev, \ data/gawk-5.0.1+dfsg/builtin.c:1080: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 buf[100]; data/gawk-5.0.1+dfsg/builtin.c:1110: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(cpbuf, buf, count); data/gawk-5.0.1+dfsg/builtin.c:1217:29: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. erealloc(cpbufs[1].buf, char *, data/gawk-5.0.1+dfsg/builtin.c:1581:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cp, "*.*Z%c", cs1); data/gawk-5.0.1+dfsg/builtin.c:1587:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cp, "*Z%c", cs1); data/gawk-5.0.1+dfsg/builtin.c:1593:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cp, "*.*R*%c", cs1); data/gawk-5.0.1+dfsg/builtin.c:1601:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cp, "*.*%c", cs1); data/gawk-5.0.1+dfsg/builtin.c:1609:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cp, "*%c", cs1); data/gawk-5.0.1+dfsg/builtin.c:1963: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[BUFSIZ]; data/gawk-5.0.1+dfsg/builtin.c:2667:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[100]; data/gawk-5.0.1+dfsg/builtin.c:2722:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buff, "%d", ii); data/gawk-5.0.1+dfsg/builtin.c:2732: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(buf, buff, ilen); data/gawk-5.0.1+dfsg/builtin.c:2733: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(buf + ilen, subsepstr, subseplen); data/gawk-5.0.1+dfsg/builtin.c:2734: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(buf + ilen + subseplen, "start", 6); data/gawk-5.0.1+dfsg/builtin.c:2740: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(buf, buff, ilen); data/gawk-5.0.1+dfsg/builtin.c:2741: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(buf + ilen, subsepstr, subseplen); data/gawk-5.0.1+dfsg/builtin.c:2742: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(buf + ilen + subseplen, "length", 7); data/gawk-5.0.1+dfsg/builtin.c:4213:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[100]; data/gawk-5.0.1+dfsg/cint_array.c:1175:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[100]; data/gawk-5.0.1+dfsg/cint_array.c:1186:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%ld", num); data/gawk-5.0.1+dfsg/command.c:1145: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/gawk-5.0.1+dfsg/command.c:1334: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 yymsgbuf[128]; data/gawk-5.0.1+dfsg/command.c:2535:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, start_EVAL, slen); data/gawk-5.0.1+dfsg/command.c:2539:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s + slen, a->a_string, len); data/gawk-5.0.1+dfsg/command.c:2560:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s + slen, stmt, len); data/gawk-5.0.1+dfsg/command.c:3075:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char etoa_xlate[256]; data/gawk-5.0.1+dfsg/command.c:3113:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. for (idx = 0; (p = (char *) argtab[idx].name) != NULL; idx++) { data/gawk-5.0.1+dfsg/command.c:3154:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str, n->stptr, n->stlen); data/gawk-5.0.1+dfsg/command.c:3160:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, subsep, subseplen); data/gawk-5.0.1+dfsg/command.c:3165:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, n->stptr, n->stlen); data/gawk-5.0.1+dfsg/command.c:3198: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. name = (char *) cmdtab[i].name; data/gawk-5.0.1+dfsg/command.c:3366:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. while ((name = (char *) cmdtab[idx].name) != NULL) { data/gawk-5.0.1+dfsg/debug.c:349:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *) (stack), (const char *) tag, sizeof(jmp_buf)) data/gawk-5.0.1+dfsg/debug.c:352:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *) tag, (const char *) (stack), sizeof(jmp_buf)) data/gawk-5.0.1+dfsg/debug.c:374:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2]; data/gawk-5.0.1+dfsg/debug.c:591:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(linebuf, "%-8d", i); data/gawk-5.0.1+dfsg/debug.c:607:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(linebuf, "%-4d:b=>", i); data/gawk-5.0.1+dfsg/debug.c:609:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(linebuf, "%-4d =>", i); data/gawk-5.0.1+dfsg/debug.c:611:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(linebuf, "%-4d:b ", i); data/gawk-5.0.1+dfsg/debug.c:3760: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 buf[50]; data/gawk-5.0.1+dfsg/debug.c:3762:13: [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. noffset = sprintf(buf, "[ :%p] %-20.20s: ", (void *) pc, data/gawk-5.0.1+dfsg/debug.c:4178:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(arg->a_string, "w")) == NULL) { data/gawk-5.0.1+dfsg/debug.c:4221:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(arg->a_string, "w")) == NULL) { data/gawk-5.0.1+dfsg/debug.c:4612:13: [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. nchar = sprintf(buf + bl, "commands %d", cnum); data/gawk-5.0.1+dfsg/debug.c:4617: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(buf + bl, c->cmd_string, nchar); data/gawk-5.0.1+dfsg/debug.c:4624:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + bl, a->a_string, nchar); data/gawk-5.0.1+dfsg/debug.c:4628:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + bl, "end", nchar); data/gawk-5.0.1+dfsg/debug.c:4634: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(buf + bl, "end", nchar); data/gawk-5.0.1+dfsg/debug.c:4649: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(buf + bl, cndn->expr, nchar); data/gawk-5.0.1+dfsg/debug.c:4840:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *pstr[MAX_FIELD]; data/gawk-5.0.1+dfsg/debug.c:5211:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY); data/gawk-5.0.1+dfsg/debug.c:5323:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_WRONLY); data/gawk-5.0.1+dfsg/debug.c:5334:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "w"); data/gawk-5.0.1+dfsg/debug.c:5468: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(file, "w"); data/gawk-5.0.1+dfsg/eval.c:396:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[40]; data/gawk-5.0.1+dfsg/eval.c:401:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, _("unknown nodetype %d"), (int) type); data/gawk-5.0.1+dfsg/eval.c:469:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[BUFSIZ]; data/gawk-5.0.1+dfsg/eval.c:519: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 b1[2], b2[2]; data/gawk-5.0.1+dfsg/eval.c:551:4: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t b1[2], b2[2]; data/gawk-5.0.1+dfsg/eval.c:828:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(OFS, OFS_node->var_value->stptr, OFS_node->var_value->stlen); data/gawk-5.0.1+dfsg/extension/filefuncs.c:178:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char outbuf[12]; data/gawk-5.0.1+dfsg/extension/filefuncs.c:220:2: [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(outbuf, "----------"); data/gawk-5.0.1+dfsg/extension/gawkfts.c:246:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((sp->fts_rfd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1) data/gawk-5.0.1+dfsg/extension/gawkfts.c:399:24: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((p->fts_symfd = open(".", O_RDONLY | O_CLOEXEC, 0)) data/gawk-5.0.1+dfsg/extension/gawkfts.c:490:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(".", O_RDONLY | O_CLOEXEC, 0)) == -1) { data/gawk-5.0.1+dfsg/extension/gawkfts.c:632:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(".", O_RDONLY, 0)) == -1) data/gawk-5.0.1+dfsg/extension/gawkfts.c:1242:42: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (oldfd < 0 && (path == NULL || (fd = open(path, O_RDONLY)) == -1)) data/gawk-5.0.1+dfsg/extension/gawkfts.h:129:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fts_name[1]; /* file name */ data/gawk-5.0.1+dfsg/extension/inplace.c:62:1: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). mkstemp (char *template) data/gawk-5.0.1+dfsg/extension/inplace.c:169:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((fd = mkstemp(state.tname)) < 0) data/gawk-5.0.1+dfsg/extension/ordchr.c:86: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 str[2]; data/gawk-5.0.1+dfsg/extension/readdir.c:110:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[PATH_MAX]; data/gawk-5.0.1+dfsg/extension/readdir.c:145:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[PATH_MAX]; data/gawk-5.0.1+dfsg/extension/readdir_test.c:91:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[awk_fieldwidth_info_size(3)]; data/gawk-5.0.1+dfsg/extension/readdir_test.c:115:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[PATH_MAX]; data/gawk-5.0.1+dfsg/extension/readdir_test.c:150:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[PATH_MAX]; data/gawk-5.0.1+dfsg/extension/readdir_test.c:211:8: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. len = sprintf(the_dir->buf, "%I64u", ino); data/gawk-5.0.1+dfsg/extension/readdir_test.c:213:8: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. len = sprintf(the_dir->buf, "%llu", ino); data/gawk-5.0.1+dfsg/extension/readfile.c:118:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(filename.str_value.str, O_RDONLY|O_BINARY)) < 0) { data/gawk-5.0.1+dfsg/extension/rwarray.c:131: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(filename.str_value.str, "wb"); data/gawk-5.0.1+dfsg/extension/rwarray.c:282: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 magic_buf[30]; data/gawk-5.0.1+dfsg/extension/rwarray.c:303: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(filename.str_value.str, "rb"); data/gawk-5.0.1+dfsg/extension/rwarray0.c:257: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 magic_buf[30]; data/gawk-5.0.1+dfsg/extension/rwarray0.c:278:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename.str_value.str, O_RDONLY); data/gawk-5.0.1+dfsg/extension/testext.c:66:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[BUFSIZ]; data/gawk-5.0.1+dfsg/extension/testext.c:71:3: [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(buf, "<undefined>"); data/gawk-5.0.1+dfsg/extension/testext.c:74:3: [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(buf, "<array>"); data/gawk-5.0.1+dfsg/extension/testext.c:77:3: [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(buf, "<scalar>"); data/gawk-5.0.1+dfsg/extension/testext.c:80:3: [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(buf, "<value-cookie>"); data/gawk-5.0.1+dfsg/extension/testext.c:87:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "\"%.*s\"", data/gawk-5.0.1+dfsg/extension/testext.c:92:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%g", value->num_value); data/gawk-5.0.1+dfsg/extension/testext.c:878:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(filename.str_value.str, O_RDONLY)) < 0) { data/gawk-5.0.1+dfsg/field.c:185:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cops, tmp->stptr, tmp->stlen); data/gawk-5.0.1+dfsg/field.c:193: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(cops, OFS, OFSlen); data/gawk-5.0.1+dfsg/field.c:225: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(r->stptr, cops, r->stlen); data/gawk-5.0.1+dfsg/field.c:291:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(databuf, buf, cnt); data/gawk-5.0.1+dfsg/field.c:361:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r->stptr, save, r->stlen); data/gawk-5.0.1+dfsg/field.c:1248: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[10]; data/gawk-5.0.1+dfsg/field.c:1324:5: [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(buf, "[ \t\n]+"); data/gawk-5.0.1+dfsg/field.c:1327:5: [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(buf, "[\\\\\n]"); data/gawk-5.0.1+dfsg/field.c:1330:5: [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(buf, "[\\000\n]"); data/gawk-5.0.1+dfsg/field.c:1332:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "[%c\n]", fs->stptr[0]); data/gawk-5.0.1+dfsg/field.c:1343:5: [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(buf, "[\\\\]"); data/gawk-5.0.1+dfsg/gawkapi.c:484:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, node->stptr, node->stlen); data/gawk-5.0.1+dfsg/gawkapi.c:1573:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[100]; data/gawk-5.0.1+dfsg/gawkapi.c:1590:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "unknown type! (%d)", (int) type); data/gawk-5.0.1+dfsg/gawkapi.h:974:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, string, length); data/gawk-5.0.1+dfsg/gettext.h:227: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/gawk-5.0.1+dfsg/gettext.h:229:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/gawk-5.0.1+dfsg/gettext.h:238:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/gawk-5.0.1+dfsg/gettext.h:240:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/gawk-5.0.1+dfsg/gettext.h:275: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/gawk-5.0.1+dfsg/gettext.h:277:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/gawk-5.0.1+dfsg/gettext.h:286:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/gawk-5.0.1+dfsg/gettext.h:288:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/gawk-5.0.1+dfsg/int_array.c:529:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[100]; data/gawk-5.0.1+dfsg/int_array.c:563:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%ld", num); data/gawk-5.0.1+dfsg/interpret.h:751: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(t1->stptr + t1->stlen, t2->stptr, t2->stlen); data/gawk-5.0.1+dfsg/interpret.h:768: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(t1->wstptr + t1->wstlen, t2->wstptr, t2->wstlen * sizeof(wchar_t)); data/gawk-5.0.1+dfsg/interpret.h:778: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(p, t1->stptr, t1->stlen); data/gawk-5.0.1+dfsg/interpret.h:779: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(p + t1->stlen, t2->stptr, t2->stlen); data/gawk-5.0.1+dfsg/io.c:630:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). newfd = open("/dev/null", O_RDWR); data/gawk-5.0.1+dfsg/io.c:860:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newstr, str, explen); data/gawk-5.0.1+dfsg/io.c:1691: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 buf[10]; data/gawk-5.0.1+dfsg/io.c:1789:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). openfd = open(name, flag, 0666); data/gawk-5.0.1+dfsg/io.c:1887:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). openfd = open(name, flag, 0666); data/gawk-5.0.1+dfsg/io.c:2007:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((slave = open(slavenam, O_RDWR)) < 0) { data/gawk-5.0.1+dfsg/io.c:2050:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((slave = open(slavenam, O_RDWR)) < 0) { data/gawk-5.0.1+dfsg/io.c:2172: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 slavenam[32]; data/gawk-5.0.1+dfsg/io.c:2189:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(slavenam, "/dev/pty%c0", c); data/gawk-5.0.1+dfsg/io.c:2203:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). master = open("/dev/ptmx", O_RDWR); data/gawk-5.0.1+dfsg/io.c:2234:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(slavenam, "/dev/pty%c%x", c, i); data/gawk-5.0.1+dfsg/io.c:2240:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((master = open(slavenam, O_RDWR)) >= 0) { data/gawk-5.0.1+dfsg/io.c:2964: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(p, start, len); data/gawk-5.0.1+dfsg/io.c:3036: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 os2_src[strlen(src) + 1]; data/gawk-5.0.1+dfsg/main.c:993: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[100]; data/gawk-5.0.1+dfsg/main.c:1060:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "group%d", i + 1); data/gawk-5.0.1+dfsg/main.c:1209:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp2, cp + 2, len); data/gawk-5.0.1+dfsg/main.c:1433:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, str, len); data/gawk-5.0.1+dfsg/missing_d/fnmatch.c:336:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[CHAR_CLASS_MAX_LENGTH + 1]; data/gawk-5.0.1+dfsg/missing_d/memcpy.c:8:1: [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 (dest, src, l) data/gawk-5.0.1+dfsg/missing_d/mktime.c:619:38: [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). tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); data/gawk-5.0.1+dfsg/missing_d/mktime.c:630:21: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t from = atol (argv[1]); data/gawk-5.0.1+dfsg/missing_d/mktime.c:631:19: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t by = atol (argv[2]); data/gawk-5.0.1+dfsg/missing_d/mktime.c:632:19: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t to = atol (argv[3]); data/gawk-5.0.1+dfsg/missing_d/setenv.c:122:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, environ, cnt * sizeof(char *)); data/gawk-5.0.1+dfsg/missing_d/snprintf.c:86:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((fd = mkstemp (tmpfilename)) < 0) data/gawk-5.0.1+dfsg/missing_d/snprintf.c:107:22: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). #define safe_tmpfile tmpfile data/gawk-5.0.1+dfsg/missing_d/snprintf.c:109:16: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). #error Neither mkstemp() nor tmpfile() is available on this platform. data/gawk-5.0.1+dfsg/missing_d/snprintf.c:109:30: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). #error Neither mkstemp() nor tmpfile() is available on this platform. data/gawk-5.0.1+dfsg/missing_d/strerror.c:30:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char mesg[30]; data/gawk-5.0.1+dfsg/missing_d/strerror.c:33:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(mesg, "Unknown error (%d)", n); data/gawk-5.0.1+dfsg/missing_d/strftime.c:93:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(d, s, n) bcopy ((s), (d), (n)) data/gawk-5.0.1+dfsg/missing_d/strftime.c:93:27: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(d, s, n) bcopy ((s), (d), (n)) data/gawk-5.0.1+dfsg/missing_d/strftime.c:114:27: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define MEMCPY(d, s, n) bcopy ((s), (d), (n)) data/gawk-5.0.1+dfsg/missing_d/strftime.c:116:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define MEMCPY(d, s, n) memcpy ((d), (s), (n)) data/gawk-5.0.1+dfsg/missing_d/strftime.c:124:49: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define MEMPCPY(d, s, n) ((void *) ((char *) memcpy (d, s, n) + (n))) data/gawk-5.0.1+dfsg/missing_d/strftime.c:901: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 ufmt[4]; data/gawk-5.0.1+dfsg/missing_d/strftime.c:903: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 ubuf[1024]; /* enough for any single format in practice */ data/gawk-5.0.1+dfsg/missing_d/tzset.c:18: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 tz1[1024]; data/gawk-5.0.1+dfsg/missing_d/tzset.c:19: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 tz2[1024]; data/gawk-5.0.1+dfsg/missing_d/tzset.c:22:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tzname[2] = { data/gawk-5.0.1+dfsg/node.c:201: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[BUFSIZ]; data/gawk-5.0.1+dfsg/node.c:272: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. sp = (char *) values[num]; data/gawk-5.0.1+dfsg/node.c:275:11: [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. (void) sprintf(sp, "%ld", num); data/gawk-5.0.1+dfsg/node.c:290:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s->stptr, sp, s->stlen + 1); data/gawk-5.0.1+dfsg/node.c:343:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r->stptr, n->stptr, n->stlen); data/gawk-5.0.1+dfsg/node.c:348:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r->wstptr, n->wstptr, n->wstlen * sizeof(wchar_t)); data/gawk-5.0.1+dfsg/node.c:416:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r->stptr, s, len); data/gawk-5.0.1+dfsg/pc/popen.c:19: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 pmode[4]; data/gawk-5.0.1+dfsg/pc/popen.c:91:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(name, ".bat"); data/gawk-5.0.1+dfsg/pc/popen.c:93:10: [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. if (s) sprintf(cmd + strlen(cmd), " %cc ", unixshell(s) ? '-' : '/'); data/gawk-5.0.1+dfsg/pc/popen.c:96:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(p, i ? "wb" : "w")) != NULL) { data/gawk-5.0.1+dfsg/pc/popen.c: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 curmode[4]; data/gawk-5.0.1+dfsg/pc/popen.c:241:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((current = fopen(name, curmode)) == NULL) data/gawk-5.0.1+dfsg/pc/popen.c:244:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((current = fopen(name, curmode)) == NULL) data/gawk-5.0.1+dfsg/profile.c:1595:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p + 1, sp->pp_str, len); data/gawk-5.0.1+dfsg/profile.c:1706:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(obufout, "\\%03o", *str & 0xff); data/gawk-5.0.1+dfsg/profile.c:1791:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1796: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(s, delim, delimlen); data/gawk-5.0.1+dfsg/profile.c:1802: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(s, comment->memory->stptr, comment->memory->stlen); data/gawk-5.0.1+dfsg/profile.c:1804: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(s, tabs, indent_level + 1); data/gawk-5.0.1+dfsg/profile.c:1808:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1871: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(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1875: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(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1879: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(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1883: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(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1887:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1901:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1905:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1909:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, r->pp_str, r->pp_len); data/gawk-5.0.1+dfsg/profile.c:1933:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, s1, len1); data/gawk-5.0.1+dfsg/profile.c:1937:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, s2, len2); data/gawk-5.0.1+dfsg/profile.c:1941:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, s3, len3); data/gawk-5.0.1+dfsg/protos.h:49:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. extern aptr_t memcpy(aptr_t, const aptr_t, size_t); data/gawk-5.0.1+dfsg/protos.h:97:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). extern int open(const char *, int, ...); data/gawk-5.0.1+dfsg/support/dfa.c:420: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 sbit[NOTCHAR]; data/gawk-5.0.1+dfsg/support/dfa.c:1107:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAX_BRACKET_STRING_LEN + 1]; data/gawk-5.0.1+dfsg/support/dfa.c:1245:11: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t folded[CASE_FOLDED_BUFSIZE + 1]; data/gawk-5.0.1+dfsg/support/dfa.c:1742: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 buf[MB_LEN_MAX]; data/gawk-5.0.1+dfsg/support/dfa.c:1892:15: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t folded[CASE_FOLDED_BUFSIZE]; data/gawk-5.0.1+dfsg/support/dfa.c:2064:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dst->elems, src->elems, src->nelem * sizeof *dst->elems); data/gawk-5.0.1+dfsg/support/dfa.c:3732:7: [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 (sup->charclasses, d->charclasses, data/gawk-5.0.1+dfsg/support/dfa.c:3953:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + oldsize, new, newsize + 1); data/gawk-5.0.1+dfsg/support/dfa.c:3967:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. new = memcpy (xmalloc (len + 1), new, len); data/gawk-5.0.1+dfsg/support/dfa.c:4222:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tp, lmp->right, lrlen); data/gawk-5.0.1+dfsg/support/dfa.c:4223:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tp + lrlen, rmp->left, rllen); data/gawk-5.0.1+dfsg/support/localeinfo.c:100:37: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. case_folded_counterparts (wint_t c, wchar_t folded[CASE_FOLDED_BUFSIZE]) data/gawk-5.0.1+dfsg/support/localeinfo.h:38: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. signed char sbclen[UCHAR_MAX + 1]; data/gawk-5.0.1+dfsg/support/random.c:364:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/random", O_RDONLY, 0); data/gawk-5.0.1+dfsg/support/regcomp.c:312: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. unsigned char buf[MB_LEN_MAX]; data/gawk-5.0.1+dfsg/support/regcomp.c:395: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[256]; data/gawk-5.0.1+dfsg/support/regcomp.c:545:7: [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 (errbuf, msg, cpy_size); data/gawk-5.0.1+dfsg/support/regcomp.c:3176: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. unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; data/gawk-5.0.1+dfsg/support/regcomp.c:3177: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. unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; data/gawk-5.0.1+dfsg/support/regcomp.c:3499: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. unsigned char char_buf[2]; data/gawk-5.0.1+dfsg/support/regex.h:644: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. const char *_Restrict_ __String, size_t __nmatch, data/gawk-5.0.1+dfsg/support/regex_internal.c:214: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 buf[MB_LEN_MAX]; data/gawk-5.0.1+dfsg/support/regex_internal.c:217: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 buf[64]; data/gawk-5.0.1+dfsg/support/regex_internal.c:287:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MB_LEN_MAX]; data/gawk-5.0.1+dfsg/support/regex_internal.c:290:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/gawk-5.0.1+dfsg/support/regex_internal.c:331:7: [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 (pstr->mbs + byte_idx, buf, mbclen); data/gawk-5.0.1+dfsg/support/regex_internal.c:339:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pstr->mbs + byte_idx, data/gawk-5.0.1+dfsg/support/regex_internal.c:400: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 (pstr->mbs + byte_idx, buf, mbclen); data/gawk-5.0.1+dfsg/support/regex_internal.c:425:7: [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 (pstr->mbs + byte_idx, buf, mbcdlen); data/gawk-5.0.1+dfsg/support/regex_internal.c:444: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 (pstr->mbs + byte_idx, p, mbclen); data/gawk-5.0.1+dfsg/support/regex_internal.c:447:8: [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 (pstr->mbs + byte_idx, p, mbclen); data/gawk-5.0.1+dfsg/support/regex_internal.c:741:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buf[6]; data/gawk-5.0.1+dfsg/support/regex_internal.c:1044:7: [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 (dest->elems, src->elems, src->nelem * sizeof (Idx)); data/gawk-5.0.1+dfsg/support/regex_internal.c:1138:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); data/gawk-5.0.1+dfsg/support/regex_internal.c:1182:7: [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 (dest->elems + id, src1->elems + i1, data/gawk-5.0.1+dfsg/support/regex_internal.c:1188:7: [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 (dest->elems + id, src2->elems + i2, data/gawk-5.0.1+dfsg/support/regex_internal.c:1219:7: [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 (dest->elems, src->elems, src->nelem * sizeof (Idx)); data/gawk-5.0.1+dfsg/support/regex_internal.c:1240:7: [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 (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); data/gawk-5.0.1+dfsg/support/regex_internal.c:1268:8: [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 (dest->elems, dest->elems + sbase, data/gawk-5.0.1+dfsg/support/regex_internal.h:781:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, src, sizeof (bitset_t)); data/gawk-5.0.1+dfsg/support/regexec.c:344:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (__mempcpy (s, string1, length1), string2, length2); data/gawk-5.0.1+dfsg/support/regexec.c:346:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (s, string1, length1); data/gawk-5.0.1+dfsg/support/regexec.c:347:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (s + length1, string2, length2); data/gawk-5.0.1+dfsg/support/regexec.c:1355:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); data/gawk-5.0.1+dfsg/support/regexec.c:1367:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); data/gawk-5.0.1+dfsg/support/regexec.c:1421:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); data/gawk-5.0.1+dfsg/support/regexec.c:1529:8: [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 (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); data/gawk-5.0.1+dfsg/support/regexec.c:1540:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); data/gawk-5.0.1+dfsg/support/xalloc.h:193:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy (xmalloc (s), p, s); data/gawk-5.0.1+dfsg/vms/redirect.h:81:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #ifndef bcopy data/gawk-5.0.1+dfsg/vms/redirect.h:82:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy vms_bcopy data/gawk-5.0.1+dfsg/vms/redirect.h:84:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define open vms_open data/gawk-5.0.1+dfsg/vms/redirect.h:103:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). extern int open(const char *,int,...); data/gawk-5.0.1+dfsg/vms/vms_args.c:322: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, spec_buf[255+1], res_buf[255+1]; data/gawk-5.0.1+dfsg/vms/vms_cli.c:91: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 longbuf[8200]; data/gawk-5.0.1+dfsg/vms/vms_crtl_init.c:223: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 gnv_posix_root[4096]; data/gawk-5.0.1+dfsg/vms/vms_crtl_init.c:224: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 unix_shell_name[255]; data/gawk-5.0.1+dfsg/vms/vms_fwrite.c:83: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 devnam[255+1]; data/gawk-5.0.1+dfsg/vms/vms_fwrite.c:179:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pt, buf, count), pt[count] = '\0'; data/gawk-5.0.1+dfsg/vms/vms_gawk.c:59: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[2+ARG_SIZ+1]; data/gawk-5.0.1+dfsg/vms/vms_gawk.c:61: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 prefix[2]; /* for "-?" */ data/gawk-5.0.1+dfsg/vms/vms_gawk.c:62: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[ARG_SIZ]; data/gawk-5.0.1+dfsg/vms/vms_gawk.c:63: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 suffix[1]; /* room for '\0' */ data/gawk-5.0.1+dfsg/vms/vms_gawk.c:79: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 misc_args[10], *misc_argp; data/gawk-5.0.1+dfsg/vms/vms_misc.c:74: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[255+1]; /*(should use alloca(len+2+1)) */ data/gawk-5.0.1+dfsg/vms/vms_misc.c:79:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(tmp, ";0"); /* append version number */ data/gawk-5.0.1+dfsg/vms/vms_misc.c:89:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #ifdef open data/gawk-5.0.1+dfsg/vms/vms_misc.c:90:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # undef open data/gawk-5.0.1+dfsg/vms/vms_misc.c:93:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). extern int open(const char *,int,unsigned,...); data/gawk-5.0.1+dfsg/vms/vms_misc.c:131:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). result = open(name, mode, 0, shr, mbc, "mbf=2"); data/gawk-5.0.1+dfsg/vms/vms_misc.c:216:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tzname[2] = { "local", "" }; data/gawk-5.0.1+dfsg/vms/vms_misc.c:240:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(dst, src, len); data/gawk-5.0.1+dfsg/vms/vms_misc.c:312:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nambuf[NAM$C_MAXRSS+1]; data/gawk-5.0.1+dfsg/vms/vms_misc.c:341:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exp_nam[NAM$C_MAXRSS+1], /* expanded name buffer for sys$parse */ data/gawk-5.0.1+dfsg/vms/vms_popen.c:91:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_p, pipes, psize(pipes_lim)), free(pipes); \ data/gawk-5.0.1+dfsg/vms/vms_popen.c:118:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((current = fopen(name, mode, "mbc=24", "mbf=2")) == NULL) { data/gawk-5.0.1+dfsg/vms/vms_popen.c:293:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LNM$C_NAMLENGTH], eos; } *wrk; data/gawk-5.0.1+dfsg/array.c:208:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(symbol->vname); /* subscript in parent array */ data/gawk-5.0.1+dfsg/array.c:215: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). alen = strlen(symbol->vname); data/gawk-5.0.1+dfsg/array.c:263:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(symbol->vname); data/gawk-5.0.1+dfsg/array.c:273:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(aname); data/gawk-5.0.1+dfsg/array.c:279:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += n * strlen(from); data/gawk-5.0.1+dfsg/array.c:308:2: [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(s, ")"); data/gawk-5.0.1+dfsg/awkgram.c:1419: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). # define yystrlen strlen data/gawk-5.0.1+dfsg/awkgram.c:2246: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). char *qname = qualify_name(name, strlen(name)); data/gawk-5.0.1+dfsg/awkgram.c:2327: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(re); data/gawk-5.0.1+dfsg/awkgram.c:2359: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(re); data/gawk-5.0.1+dfsg/awkgram.c:4210: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). name = estrdup(f->func_name, strlen(f->func_name)); data/gawk-5.0.1+dfsg/awkgram.c:4234: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). char *qname = qualify_name(name, strlen(name)); data/gawk-5.0.1+dfsg/awkgram.c:5061: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). bp = thisline + strlen(thisline); data/gawk-5.0.1+dfsg/awkgram.c:5074: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). count = strlen(mesg) + 1; data/gawk-5.0.1+dfsg/awkgram.c:5310: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). s->src = estrdup(src, strlen(src)); data/gawk-5.0.1+dfsg/awkgram.c:5415: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(src) == 0) { data/gawk-5.0.1+dfsg/awkgram.c:5471: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(src) == 0) { data/gawk-5.0.1+dfsg/awkgram.c:5591:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readfunc = ( ssize_t(*)() ) read; data/gawk-5.0.1+dfsg/awkgram.c:5602: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). sourcefile->bufsize = strlen(sourcefile->src); data/gawk-5.0.1+dfsg/awkgram.c:6706: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). base = get_numbase(tokstart, strlen(tokstart)-1, false); data/gawk-5.0.1+dfsg/awkgram.c:6710: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). (int) strlen(tokstart)-1, tokstart); data/gawk-5.0.1+dfsg/awkgram.c:6713: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). (int) strlen(tokstart)-1, tokstart); data/gawk-5.0.1+dfsg/awkgram.c:6723: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). mpg_strtoui(r->mpg_i, tokstart, strlen(tokstart), NULL, base); data/gawk-5.0.1+dfsg/awkgram.c:6732: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). yylval->memory = set_profile_text(r, tokstart, strlen(tokstart)-1); data/gawk-5.0.1+dfsg/awkgram.c:6737: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). d = nondec2awknum(tokstart, strlen(tokstart)-1, NULL); data/gawk-5.0.1+dfsg/awkgram.c:6740: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). yylval->memory = set_profile_text(make_number(d), tokstart, strlen(tokstart) - 1); data/gawk-5.0.1+dfsg/awkgram.c:7632:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name); data/gawk-5.0.1+dfsg/awkgram.c:8918:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy(buffer, buf, strlen(buf)); data/gawk-5.0.1+dfsg/awkgram.c:8919: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). return strlen(buf); data/gawk-5.0.1+dfsg/awkgram.c:9119:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buffer, "\n"); data/gawk-5.0.1+dfsg/awkgram.c:9124:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buffer, "\n"); data/gawk-5.0.1+dfsg/awkgram.c:9127:4: [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(buffer, "\n"); data/gawk-5.0.1+dfsg/awkgram.c:9143:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c1->memory->stlen = strlen(buffer); data/gawk-5.0.1+dfsg/awkgram.c:9323: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). set_current_namespace(estrdup(ns->lextok, strlen(ns->lextok))); data/gawk-5.0.1+dfsg/awkgram.c:9330: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). new_ns->ns_name = estrdup(current_namespace, strlen(current_namespace)); data/gawk-5.0.1+dfsg/awkgram.c:9355: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 length = strlen(current_namespace) + 2 + len + 1; data/gawk-5.0.1+dfsg/builtin.c:140:54: [1] (buffer) strlen: Does not handle 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 ((rp != NULL) ? is_non_fatal_redirect(rp->value, strlen(rp->value)) : is_non_fatal_std(fp)) data/gawk-5.0.1+dfsg/builtin.c:1236: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 (k = strlen(ts) - 1; k >= 0; k--) { data/gawk-5.0.1+dfsg/builtin.c:1423: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 (k = strlen(ts) - 1; k >= 0; k--) { data/gawk-5.0.1+dfsg/builtin.c:1506: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). bchunk(nan_inf_val, strlen(nan_inf_val)); data/gawk-5.0.1+dfsg/builtin.c:1622:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(obufout); data/gawk-5.0.1+dfsg/builtin.c:1975: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). formatlen = strlen(format); data/gawk-5.0.1+dfsg/builtin.c:2723: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). ilen = strlen(buff); data/gawk-5.0.1+dfsg/builtin.c:2724: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). amt = ilen + subseplen + strlen("length") + 1; data/gawk-5.0.1+dfsg/builtin.c:3829: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). reslen = strlen(the_result); data/gawk-5.0.1+dfsg/builtin.c:3897: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). reslen = strlen(the_result); data/gawk-5.0.1+dfsg/builtin.c:3966: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). return make_string(the_result, strlen(the_result)); data/gawk-5.0.1+dfsg/builtin.c:4058:86: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assoc_set(dbg, make_string("array_type", 10), make_string(arg->array_funcs->name, strlen(arg->array_funcs->name))); data/gawk-5.0.1+dfsg/builtin.c:4089:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assoc_set(dbg, make_string("flags", 5), make_string(s, strlen(s))); data/gawk-5.0.1+dfsg/builtin.c:4112:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return make_string(res, strlen(res)); data/gawk-5.0.1+dfsg/cint_array.c:1159: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). r->vname = estrdup(old[i]->vname, strlen(old[i]->vname)); data/gawk-5.0.1+dfsg/cint_array.c:1187: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). subs = make_string(buf, strlen(buf)); data/gawk-5.0.1+dfsg/command.c:1042: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). # define yystrlen strlen data/gawk-5.0.1+dfsg/command.c:1675: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). size_t len = strlen(str); data/gawk-5.0.1+dfsg/command.c:2526: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(a->a_string) + 1; /* 1 for ',' */ data/gawk-5.0.1+dfsg/command.c:2538:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(a->a_string); data/gawk-5.0.1+dfsg/command.c:2550:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(stmt) + 1; /* 1 for newline */ data/gawk-5.0.1+dfsg/command.c:2552: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). slen = strlen(s); data/gawk-5.0.1+dfsg/command.c:2846: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). lexend = lexptr + strlen(lexptr); data/gawk-5.0.1+dfsg/command.c:3112:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name); data/gawk-5.0.1+dfsg/command.c:3116:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && strlen(p) == len data/gawk-5.0.1+dfsg/command.c:3200: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). && toklen == strlen(name) data/gawk-5.0.1+dfsg/command.c:3221: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). && toklen < strlen(name) data/gawk-5.0.1+dfsg/command.c:3251: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). i = find_command(name, strlen(name)); data/gawk-5.0.1+dfsg/command.c:3363: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). textlen = strlen(text); data/gawk-5.0.1+dfsg/command.c:3369: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). return estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/command.c:3385: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). textlen = strlen(text); data/gawk-5.0.1+dfsg/command.c:3396: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). return estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/command.c:3411: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). textlen = strlen(text); data/gawk-5.0.1+dfsg/command.c:3418:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/command.c:3425:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/command.c:3444: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). textlen = strlen(text); data/gawk-5.0.1+dfsg/command.c:3461: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). return estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/command.c:3468: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). return estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/debug.c:384:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(input_fd, buf, 1)) > 0) { data/gawk-5.0.1+dfsg/debug.c:440:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(s->fd, buf, s->bufsize)) > 0) { data/gawk-5.0.1+dfsg/debug.c:614: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). p = linebuf + strlen(linebuf); data/gawk-5.0.1+dfsg/debug.c:616:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(s->fd, p, supposed_len); data/gawk-5.0.1+dfsg/debug.c:2804: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). dgawk_prompt = estrdup(DEFAULT_PROMPT, strlen(DEFAULT_PROMPT)); data/gawk-5.0.1+dfsg/debug.c:2834: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). cmd_src->str = estrdup(command_file, strlen(command_file)); data/gawk-5.0.1+dfsg/debug.c:4238:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(line) > 1 data/gawk-5.0.1+dfsg/debug.c:4556: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). nchar = strlen(h->line); data/gawk-5.0.1+dfsg/debug.c:4598: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). nchar += (strlen(c->cmd_string) + 1); data/gawk-5.0.1+dfsg/debug.c:4601: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). nchar += (strlen(a->a_string) + 1); /* awk statements */ data/gawk-5.0.1+dfsg/debug.c:4602: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). nchar += (strlen("end") + 1); data/gawk-5.0.1+dfsg/debug.c:4607: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). nchar += (strlen("commands ") + 20 + strlen("end") + 1); /* 20 for cnum (an int) */ data/gawk-5.0.1+dfsg/debug.c:4607: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). nchar += (strlen("commands ") + 20 + strlen("end") + 1); /* 20 for cnum (an int) */ data/gawk-5.0.1+dfsg/debug.c:4616: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). nchar = strlen(c->cmd_string); data/gawk-5.0.1+dfsg/debug.c:4623: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). nchar = strlen(a->a_string); /* statements */ data/gawk-5.0.1+dfsg/debug.c:4627: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). nchar = strlen("end"); /* end of 'eval' */ data/gawk-5.0.1+dfsg/debug.c:4633: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). nchar = strlen("end"); /* end of 'commands' */ data/gawk-5.0.1+dfsg/debug.c:4644: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). nchar = strlen(cndn->expr); data/gawk-5.0.1+dfsg/debug.c:5200: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). cmd_src->str = estrdup(file, strlen(file)); data/gawk-5.0.1+dfsg/debug.c:5260: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). textlen = strlen(text); data/gawk-5.0.1+dfsg/debug.c:5266: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). return estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/debug.c:5339: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). output_file = estrdup(file, strlen(file)); data/gawk-5.0.1+dfsg/debug.c:5356: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). dgawk_prompt = estrdup(value, strlen(value)); data/gawk-5.0.1+dfsg/eval.c:481: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). space_needed = (strlen(tab[i].name) + (sp != buffer)); data/gawk-5.0.1+dfsg/eval.c:491: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). space_left -= strlen(sp); data/gawk-5.0.1+dfsg/eval.c:492: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). sp += strlen(sp); data/gawk-5.0.1+dfsg/eval.c:516:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s1->stptr) == s1->stlen && strlen(s2->stptr) == s2->stlen) data/gawk-5.0.1+dfsg/eval.c:516: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 (strlen(s1->stptr) == s1->stlen && strlen(s2->stptr) == s2->stlen) data/gawk-5.0.1+dfsg/eval.c:548:7: [1] (buffer) wcslen: Does not handle 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 (wcslen(s1->wstptr) == s1->wstlen && wcslen(s2->wstptr) == s2->wstlen) data/gawk-5.0.1+dfsg/eval.c:548:43: [1] (buffer) wcslen: Does not handle 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 (wcslen(s1->wstptr) == s1->wstlen && wcslen(s2->wstptr) == s2->wstlen) data/gawk-5.0.1+dfsg/eval.c:1018: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). ERRNO_node->var_value = make_string(cp, strlen(cp)); data/gawk-5.0.1+dfsg/eval.c:1028:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(string); data/gawk-5.0.1+dfsg/eval.c:1039:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(string); data/gawk-5.0.1+dfsg/ext.c:103: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). install_name = estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/ext.c:113:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(name_space) + 2 + strlen(name) + 1; data/gawk-5.0.1+dfsg/ext.c:113: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). size_t len = strlen(name_space) + 2 + strlen(name) + 1; data/gawk-5.0.1+dfsg/extension/filefuncs.c:343: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). make_const_string(sub, strlen(sub), & index), data/gawk-5.0.1+dfsg/extension/filefuncs.c:393: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). array_set(array, "name", make_const_string(name, strlen(name), & tmp)); data/gawk-5.0.1+dfsg/extension/filefuncs.c:431:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). array_set(array, "pmode", make_const_string(pmode, strlen(pmode), & tmp)); data/gawk-5.0.1+dfsg/extension/filefuncs.c:454: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). array_set(array, "type", make_const_string(type, strlen(type), & tmp)); data/gawk-5.0.1+dfsg/extension/filefuncs.c:647: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). (void) make_const_string(path, strlen(path), & value); data/gawk-5.0.1+dfsg/extension/filefuncs.c:663: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). (void) make_const_string(err, strlen(err), & value); data/gawk-5.0.1+dfsg/extension/fnmatch.c:182:5: [1] (buffer) strlen: Does not handle 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(flagtable[i].name), & index); data/gawk-5.0.1+dfsg/extension/fork.c:67: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). make_const_string(sub, strlen(sub), & index), data/gawk-5.0.1+dfsg/extension/gawkfts.c:189:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(*argv)) == 0) { data/gawk-5.0.1+dfsg/extension/gawkfts.c:281:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(++cp); data/gawk-5.0.1+dfsg/extension/gawkfts.c:788: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). dnamlen = strlen(dp->d_name); data/gawk-5.0.1+dfsg/extension/gawkfts.c:1223:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(*argv)) > max) data/gawk-5.0.1+dfsg/extension/readdir.c:114:2: [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(fname, "/"); data/gawk-5.0.1+dfsg/extension/readdir_test.c:119:2: [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(fname, "/"); data/gawk-5.0.1+dfsg/extension/readfile.c:86:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, text, sbuf->st_size) != sbuf->st_size) { data/gawk-5.0.1+dfsg/extension/rwarray.c:135: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). if (fwrite(MAGIC, 1, strlen(MAGIC), fp) != strlen(MAGIC)) data/gawk-5.0.1+dfsg/extension/rwarray.c:135: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). if (fwrite(MAGIC, 1, strlen(MAGIC), fp) != strlen(MAGIC)) data/gawk-5.0.1+dfsg/extension/rwarray.c:308:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (fread(magic_buf, 1, strlen(MAGIC), fp) != strlen(MAGIC)) { data/gawk-5.0.1+dfsg/extension/rwarray.c:308: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 (fread(magic_buf, 1, strlen(MAGIC), fp) != strlen(MAGIC)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:130: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). if (write(fd, MAGIC, strlen(MAGIC)) != strlen(MAGIC)) data/gawk-5.0.1+dfsg/extension/rwarray0.c:130: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 (write(fd, MAGIC, strlen(MAGIC)) != strlen(MAGIC)) data/gawk-5.0.1+dfsg/extension/rwarray0.c:283:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, magic_buf, strlen(MAGIC)) != strlen(MAGIC)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:283:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (read(fd, magic_buf, strlen(MAGIC)) != strlen(MAGIC)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:283: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 (read(fd, magic_buf, strlen(MAGIC)) != strlen(MAGIC)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:293:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, & major, sizeof(major)) != sizeof(major)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:304:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, & minor, sizeof(minor)) != sizeof(minor)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:344:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, & count, sizeof(count)) != sizeof(count)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:376:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(fd, & index_len, sizeof(index_len))) != sizeof(index_len)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:399:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buffer, index_len) != (ssize_t) index_len) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:420:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, & code, sizeof(code)) != sizeof(code)) data/gawk-5.0.1+dfsg/extension/rwarray0.c:437:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, & d, sizeof(d)) != sizeof(d)) data/gawk-5.0.1+dfsg/extension/rwarray0.c:444:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, & len, sizeof(len)) != sizeof(len)) { data/gawk-5.0.1+dfsg/extension/rwarray0.c:452:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, value->str_value.str, len) != (ssize_t) len) { data/gawk-5.0.1+dfsg/extension/testext.c:431: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). make_const_string(seed[i].name, strlen(seed[i].name), & index); data/gawk-5.0.1+dfsg/extension/testext.c:441: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). make_const_string(seed[i].name, strlen(seed[i].name), & index); data/gawk-5.0.1+dfsg/extension/testext.c:452: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). make_const_string(sysval[i].name, strlen(sysval[i].name), & index); data/gawk-5.0.1+dfsg/extension/testext.c:882:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (! get_file(alias.str_value.str, strlen(alias.str_value.str), "<", fd, &ibuf, &obuf)) { data/gawk-5.0.1+dfsg/extension/testext.c:925: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 (! get_file(filename.str_value.str, strlen(filename.str_value.str), filetype.str_value.str, fd.num_value, &ibuf, &obuf)) { data/gawk-5.0.1+dfsg/extension/testext.c:938: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). make_const_string(ibuf->name, strlen(ibuf->name), & val)); data/gawk-5.0.1+dfsg/extension/testext.c:949: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). make_const_string(obuf->name, strlen(obuf->name), & val)); data/gawk-5.0.1+dfsg/extension/testext.c:1105: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). make_const_string(message, strlen(message), & value))) data/gawk-5.0.1+dfsg/extension/testext.c:1109: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). make_const_string(message2, strlen(message2), & value))) data/gawk-5.0.1+dfsg/extension/testext.c:1115: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). make_const_string(message3, strlen(message3), & value))) data/gawk-5.0.1+dfsg/field.c:1354: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). FS_re_yes_case = make_regexp(buf, strlen(buf), false, true, true); data/gawk-5.0.1+dfsg/field.c:1355: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). FS_re_no_case = make_regexp(buf, strlen(buf), true, true, true); data/gawk-5.0.1+dfsg/field.c:1414: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). tmp = make_string(subscript, strlen(subscript)); data/gawk-5.0.1+dfsg/field.c:1415: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). assoc_set(PROCINFO_node, tmp, make_string(str, strlen(str))); data/gawk-5.0.1+dfsg/field.c:1427: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). tmp = make_string(subscript, strlen(subscript)); data/gawk-5.0.1+dfsg/gawkapi.c:1605: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). *fullname = estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/gawkapi.c:1609:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(name_space) + 2 + strlen(name) + 1; data/gawk-5.0.1+dfsg/gawkapi.c:1609: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). size_t len = strlen(name_space) + 2 + strlen(name) + 1; data/gawk-5.0.1+dfsg/gettext.h:223: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). size_t msgctxt_len = strlen (msgctxt) + 1; data/gawk-5.0.1+dfsg/gettext.h:224:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/gawk-5.0.1+dfsg/gettext.h:271: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). size_t msgctxt_len = strlen (msgctxt) + 1; data/gawk-5.0.1+dfsg/gettext.h:272:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/gawk-5.0.1+dfsg/int_array.c:487: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). r->vname = estrdup(oldval->vname, strlen(oldval->vname)); data/gawk-5.0.1+dfsg/int_array.c:564: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). subs = make_string(buf, strlen(buf)); data/gawk-5.0.1+dfsg/interpret.h:159: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). m = make_string(trans, strlen(trans)); data/gawk-5.0.1+dfsg/io.c:833:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(rp->value) == explen data/gawk-5.0.1+dfsg/io.c:1096:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(rp->value) == len && memcmp(rp->value, str, len) == 0) data/gawk-5.0.1+dfsg/io.c:1212:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(rp->value) == tmp->stlen data/gawk-5.0.1+dfsg/io.c:1453: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). if (is_non_fatal_redirect(rp->value, strlen(rp->value))) data/gawk-5.0.1+dfsg/io.c:1817: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). } else if (inetfile(name, strlen(name), & isi)) { data/gawk-5.0.1+dfsg/io.c:1825: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). bool non_fatal = is_non_fatal_redirect(name, strlen(name)); data/gawk-5.0.1+dfsg/io.c:1873:71: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. } while (openfd == INVALID_HANDLE && ! hard_error && retries > 0 && usleep(msleep) == 0); data/gawk-5.0.1+dfsg/io.c:1902: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). if (! inetfile(name, strlen(name), NULL) data/gawk-5.0.1+dfsg/io.c:2121: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 (extfd >= 0 || inetfile(str, strlen(str), NULL)) { data/gawk-5.0.1+dfsg/io.c:2995: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). emalloc(path, char *, strlen(src) + 1, "do_find_source"); data/gawk-5.0.1+dfsg/io.c:3007: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). emalloc(path, char *, pi->max_pathlen + strlen(src) + 1, "do_find_source"); data/gawk-5.0.1+dfsg/io.c:3036: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). char os2_src[strlen(src) + 1]; data/gawk-5.0.1+dfsg/io.c:3050: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). src_len = strlen(src); data/gawk-5.0.1+dfsg/io.c:3051: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). suffix_len = strlen(EXTLIB_SUFFIX); data/gawk-5.0.1+dfsg/io.c:3086: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). emalloc(file_awk, char *, strlen(src) + data/gawk-5.0.1+dfsg/io.c:3350:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). iop->public.read_func = ( ssize_t(*)() ) read; data/gawk-5.0.1+dfsg/io.c:4261: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_len = strlen(pidx1); data/gawk-5.0.1+dfsg/io.c:4263: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_len = strlen(pidx2); data/gawk-5.0.1+dfsg/io.c:4265: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_len = strlen(pidx1) + subsep->stlen + strlen(pidx2); data/gawk-5.0.1+dfsg/io.c:4265: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). str_len = strlen(pidx1) + subsep->stlen + strlen(pidx2); data/gawk-5.0.1+dfsg/io.c:4316: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). last_name = estrdup(name, strlen(name)); data/gawk-5.0.1+dfsg/io.c:4328:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((iop->public.read_func == ( ssize_t(*)() ) read) && tmout > 0) data/gawk-5.0.1+dfsg/io.c:4353:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(fd, buf, size); data/gawk-5.0.1+dfsg/io.c:4374:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(fd, buf, size); data/gawk-5.0.1+dfsg/io.c:4386:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(fd, buf, size); data/gawk-5.0.1+dfsg/main.c:570: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). preassigns[numassigns].val = estrdup(val, strlen(val)); data/gawk-5.0.1+dfsg/main.c:741: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). *tmp = make_str_node(str, strlen(str), SCAN); /* do process escapes */ data/gawk-5.0.1+dfsg/main.c:756: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). val = make_string(argv0, strlen(argv0)); data/gawk-5.0.1+dfsg/main.c:762: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). sub = make_string(argv0, strlen(argv0)); data/gawk-5.0.1+dfsg/main.c:770: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). val = make_string(argv[i], strlen(argv[i])); data/gawk-5.0.1+dfsg/main.c:775: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). sub = make_string(argv[i], strlen(argv[i])); data/gawk-5.0.1+dfsg/main.c:854:54: [1] (buffer) strlen: Does not handle 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 = *(vp->spec) = install_symbol(estrdup(vp->name, strlen(vp->name)), Node_var); data/gawk-5.0.1+dfsg/main.c:856: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). n->var_value = make_string(vp->strval, strlen(vp->strval)); data/gawk-5.0.1+dfsg/main.c:880: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). tmp = make_string(pname, strlen(pname)); data/gawk-5.0.1+dfsg/main.c:895: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). *aptr = make_string(val, strlen(val)); data/gawk-5.0.1+dfsg/main.c:929: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). sub = make_string(var, strlen(var)); data/gawk-5.0.1+dfsg/main.c:930: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). newval = make_string(val, strlen(val)); data/gawk-5.0.1+dfsg/main.c:974: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). val = make_string(d_argv[i], strlen(d_argv[i])); data/gawk-5.0.1+dfsg/main.c:1202: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). cp2 = cp + strlen(cp) - 1; // end char data/gawk-5.0.1+dfsg/main.c:1206:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(cp) - 3; data/gawk-5.0.1+dfsg/main.c:1227: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). it = make_str_node(cp, strlen(cp), SCAN | ELIDE_BACK_NL); data/gawk-5.0.1+dfsg/main.c:1457: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). l->thousands_sep = estrdup(t->thousands_sep, strlen(t->thousands_sep)); data/gawk-5.0.1+dfsg/main.c:1458: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). l->decimal_point = estrdup(t->decimal_point, strlen(t->decimal_point)); data/gawk-5.0.1+dfsg/main.c:1459: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). l->grouping = estrdup(t->grouping, strlen(t->grouping)); data/gawk-5.0.1+dfsg/main.c:1460: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). l->int_curr_symbol = estrdup(t->int_curr_symbol, strlen(t->int_curr_symbol)); data/gawk-5.0.1+dfsg/main.c:1461: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). l->currency_symbol = estrdup(t->currency_symbol, strlen(t->currency_symbol)); data/gawk-5.0.1+dfsg/main.c:1462:55: [1] (buffer) strlen: Does not handle 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->mon_decimal_point = estrdup(t->mon_decimal_point, strlen(t->mon_decimal_point)); data/gawk-5.0.1+dfsg/main.c:1463:55: [1] (buffer) strlen: Does not handle 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->mon_thousands_sep = estrdup(t->mon_thousands_sep, strlen(t->mon_thousands_sep)); data/gawk-5.0.1+dfsg/main.c:1464: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). l->mon_grouping = estrdup(t->mon_grouping, strlen(t->mon_grouping)); data/gawk-5.0.1+dfsg/main.c:1465: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). l->positive_sign = estrdup(t->positive_sign, strlen(t->positive_sign)); data/gawk-5.0.1+dfsg/main.c:1466: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). l->negative_sign = estrdup(t->negative_sign, strlen(t->negative_sign)); data/gawk-5.0.1+dfsg/main.c:1479: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). d_argv[i] = estrdup(argv[i], strlen(argv[i])); data/gawk-5.0.1+dfsg/mbsupport.h:42: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). #define mbrlen(s, e, mbs) strlen(s) data/gawk-5.0.1+dfsg/mbsupport.h:44:9: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define wcslen strlen data/gawk-5.0.1+dfsg/mbsupport.h:44: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). #define wcslen strlen data/gawk-5.0.1+dfsg/missing_d/setenv.c:98: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). l_value = strlen(value); data/gawk-5.0.1+dfsg/missing_d/setenv.c:102:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(c) >= l_value) { /*%< old larger; copy over */ data/gawk-5.0.1+dfsg/missing_d/snprintf.c:75:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(tmpdir) + 1 + strlen(template) + 1; data/gawk-5.0.1+dfsg/missing_d/snprintf.c:75: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). len = strlen(tmpdir) + 1 + strlen(template) + 1; data/gawk-5.0.1+dfsg/missing_d/strftime.c:118: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). # define STRLEN(s) strlen (s) data/gawk-5.0.1+dfsg/missing_d/strftime.c:679: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). format_end = f + strlen (f) + 1; data/gawk-5.0.1+dfsg/missing_d/strftime.c:691: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). len += strlen (f + len); data/gawk-5.0.1+dfsg/missing_d/strftime.c:939:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (era->era_name); data/gawk-5.0.1+dfsg/missing_d/strftime.c:1375: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). cpy (strlen (zone), zone); data/gawk-5.0.1+dfsg/missing_d/timegm.c:14: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). tz = estrdup(tz, strlen(tz)); data/gawk-5.0.1+dfsg/missing_d/usleep.c:9:1: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(unsigned int usec) data/gawk-5.0.1+dfsg/mpfr.c:230: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(s) >= 3 data/gawk-5.0.1+dfsg/mpfr.c:362: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). return make_string(result, strlen(result)); data/gawk-5.0.1+dfsg/node.c:224: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). return make_string(result, strlen(result)); data/gawk-5.0.1+dfsg/node.c:276:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s->stlen = strlen(sp); data/gawk-5.0.1+dfsg/pc/popen.c:78: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). cmd = malloc(strlen(name) + (s ? strlen(s) : 0) + 9); *cmd = '\0'; data/gawk-5.0.1+dfsg/pc/popen.c:78: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). cmd = malloc(strlen(name) + (s ? strlen(s) : 0) + 9); *cmd = '\0'; data/gawk-5.0.1+dfsg/pc/popen.c:85: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). char *p = (char *) realloc(name, strlen(name) + 5); data/gawk-5.0.1+dfsg/pc/popen.c:93: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). if (s) sprintf(cmd + strlen(cmd), " %cc ", unixshell(s) ? '-' : '/'); data/gawk-5.0.1+dfsg/pc/popen.c:94: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). strcpy(p = cmd + strlen(cmd), name); free(name); data/gawk-5.0.1+dfsg/pc/popen.c:98:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i = strlen(command); data/gawk-5.0.1+dfsg/pc/popen.c:189: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). quoted = malloc(strlen (cmd) + 2 + 1); data/gawk-5.0.1+dfsg/pc/popen.c:211:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(curmode, mode, 3); curmode[3] = '\0'; data/gawk-5.0.1+dfsg/profile.c:180: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). n->pp_len = strlen(s); data/gawk-5.0.1+dfsg/profile.c:431:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(t1->pp_str) data/gawk-5.0.1+dfsg/profile.c:432: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). + strlen(op2str(pc->opcode)) + strlen(t2->pp_str) // foo && bar data/gawk-5.0.1+dfsg/profile.c:432: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). + strlen(op2str(pc->opcode)) + strlen(t2->pp_str) // foo && bar data/gawk-5.0.1+dfsg/profile.c:672: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). tmp[strlen(tmp) - 1] = '\0'; /* remove trailing space */ data/gawk-5.0.1+dfsg/profile.c:1250: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). slen = strlen(str); data/gawk-5.0.1+dfsg/profile.c:1707:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(obufout); data/gawk-5.0.1+dfsg/profile.c:1765: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). delimlen = strlen(delim); data/gawk-5.0.1+dfsg/profile.c:1779: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). assert(strlen(paren) == 2); data/gawk-5.0.1+dfsg/profile.c:1926: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). len1 = strlen(s1); data/gawk-5.0.1+dfsg/profile.c:1927: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). len2 = strlen(s2); data/gawk-5.0.1+dfsg/profile.c:1928: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). len3 = strlen(s3); data/gawk-5.0.1+dfsg/profile.c:2082: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). size_t len = 5 + strlen(name) + 1; data/gawk-5.0.1+dfsg/profile.c:2092:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(current_namespace); data/gawk-5.0.1+dfsg/protos.h:39:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). extern char *strncpy(char *, const char *, size_t); data/gawk-5.0.1+dfsg/protos.h:45: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). extern size_t strlen(const char *); data/gawk-5.0.1+dfsg/protos.h:141:12: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. extern int usleep(unsigned int); data/gawk-5.0.1+dfsg/str_array.c:361: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). r->vname = estrdup(oldval->vname, strlen(oldval->vname)); data/gawk-5.0.1+dfsg/support/dfa.c:790:1: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal (charclass const *s1, charclass const *s2) data/gawk-5.0.1+dfsg/support/dfa.c:892:9: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal (s, &d->charclasses[i])) data/gawk-5.0.1+dfsg/support/dfa.c:1298: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). dfa->lex.left = strlen (s); data/gawk-5.0.1+dfsg/support/dfa.c:3948: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). size_t newsize = strlen (new); data/gawk-5.0.1+dfsg/support/dfa.c:3951: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). size_t oldsize = strlen (old); data/gawk-5.0.1+dfsg/support/dfa.c:4026: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). old = enlist (old, *new, strlen (*new)); data/gawk-5.0.1+dfsg/support/dfa.c:4170: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). ln = strlen (lmp->right); data/gawk-5.0.1+dfsg/support/dfa.c:4171: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). rn = strlen (rmp->right); data/gawk-5.0.1+dfsg/support/dfa.c:4196: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 (mp->in[i]) > strlen (result)) data/gawk-5.0.1+dfsg/support/dfa.c:4196:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (mp->in[i]) > strlen (result)) data/gawk-5.0.1+dfsg/support/dfa.c:4219: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). size_t lrlen = strlen (lmp->right); data/gawk-5.0.1+dfsg/support/dfa.c:4220: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). size_t rllen = strlen (rmp->left); data/gawk-5.0.1+dfsg/support/getopt.c:323: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). int len = d->__nonoption_flags_max_len = strlen (orig_str); data/gawk-5.0.1+dfsg/support/getopt.c:559: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 (namelen == (unsigned int) strlen (p->name)) data/gawk-5.0.1+dfsg/support/getopt.c:651: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). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/getopt.c:724:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/getopt.c:764:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/getopt.c:769: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). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/getopt.c:962: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). if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) data/gawk-5.0.1+dfsg/support/getopt.c:1010: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). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/getopt.c:1054: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). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/getopt.c:1092: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). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/getopt.c:1098: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). d->__nextchar += strlen (d->__nextchar); data/gawk-5.0.1+dfsg/support/random.c:366:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, (void *) state, len) == (ssize_t) len) data/gawk-5.0.1+dfsg/support/regcomp.c:491: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). ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); data/gawk-5.0.1+dfsg/support/regcomp.c:535: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). msg_size = strlen (msg) + 1; /* Includes the null. */ data/gawk-5.0.1+dfsg/support/regcomp.c:703: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). ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); data/gawk-5.0.1+dfsg/support/regcomp.c:771:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dfa->re_str, pattern, length + 1); data/gawk-5.0.1+dfsg/support/regcomp.c:2721:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && strlen ((char *) start_elem->opr.name) > 1) data/gawk-5.0.1+dfsg/support/regcomp.c:2723:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && strlen ((char *) end_elem->opr.name) > 1))) data/gawk-5.0.1+dfsg/support/regcomp.c:2831: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). size_t name_len = strlen ((const char *) name); data/gawk-5.0.1+dfsg/support/regcomp.c:2912: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). size_t sym_name_len = strlen ((char *) br_elem->opr.name); data/gawk-5.0.1+dfsg/support/regcomp.c:3047: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). size_t name_len = strlen ((const char *) name); data/gawk-5.0.1+dfsg/support/regcomp.c:3557: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 (__glibc_unlikely (strlen ((const char *) name) != 1)) data/gawk-5.0.1+dfsg/support/regexec.c:210: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). length = strlen (string); data/gawk-5.0.1+dfsg/support/xalloc.h:205: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). l = strlen(s); data/gawk-5.0.1+dfsg/symbol.c:106: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). tmp = make_string(name + 5, strlen(name) - 5); data/gawk-5.0.1+dfsg/symbol.c:108: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). tmp = make_string(name, strlen(name)); data/gawk-5.0.1+dfsg/symbol.c:198: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). tmp = make_string(p->vname, strlen(p->vname)); data/gawk-5.0.1+dfsg/symbol.c:309: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). n_name = make_string(name, strlen(name)); data/gawk-5.0.1+dfsg/symbol.c:597: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). tmp = make_string(r->vname, strlen(r->vname)); data/gawk-5.0.1+dfsg/symbol.c:684: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). n.stlen = strlen(f->fparms[j].param); data/gawk-5.0.1+dfsg/vms/redirect.h:127:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extern int read(int, void *, int); data/gawk-5.0.1+dfsg/vms/vms_args.c:273: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). int len = strlen(f_err); data/gawk-5.0.1+dfsg/vms/vms_args.c:325: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). register int len = strlen(prospective_filespec); data/gawk-5.0.1+dfsg/vms/vms_args.c:410: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). unsigned len = strlen(log_name); data/gawk-5.0.1+dfsg/vms/vms_args.c:422: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). itemlist[0].len = strlen(trans_val); data/gawk-5.0.1+dfsg/vms/vms_cli.c:50: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). item_dsc.dsc$w_length = strlen(item_dsc.dsc$a_pointer = (char *)item); data/gawk-5.0.1+dfsg/vms/vms_cli.c:66: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). item_dsc.dsc$w_length = strlen(item_dsc.dsc$a_pointer = (char *)item); data/gawk-5.0.1+dfsg/vms/vms_cli.c:110:2: [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(strcpy(longbuf, cmd_verb), " "), ltmp = strlen(longbuf); data/gawk-5.0.1+dfsg/vms/vms_cli.c:110: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). strcat(strcpy(longbuf, cmd_verb), " "), ltmp = strlen(longbuf); data/gawk-5.0.1+dfsg/vms/vms_cli.c:113:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&longbuf[ltmp], data/gawk-5.0.1+dfsg/vms/vms_crtl_init.c:146: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). name_dsc.dsc$w_length = strlen(logname); data/gawk-5.0.1+dfsg/vms/vms_crtl_init.c:175: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). proc_table_dsc.dsc$w_length = strlen(proc_table); data/gawk-5.0.1+dfsg/vms/vms_crtl_init.c:180: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). logname_dsc.dsc$w_length = strlen(logname); data/gawk-5.0.1+dfsg/vms/vms_crtl_init.c:184: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). item_list[0].buflen = strlen(value); data/gawk-5.0.1+dfsg/vms/vms_fwrite.c:87: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). device.dsc$w_length = strlen(device.dsc$a_pointer = devnam); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:122:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, "-W", 2); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:160:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, "-p", 2); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:165:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, "-d", 2); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:170:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, "-F", 2); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:175:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, "-v", 2); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:182:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, "-e", 2); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:187:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, "-f", 2); data/gawk-5.0.1+dfsg/vms/vms_gawk.c:202:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf.arg.prefix, ">$", 2); data/gawk-5.0.1+dfsg/vms/vms_misc.c:60:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(str); data/gawk-5.0.1+dfsg/vms/vms_misc.c:346: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). fab.fab$b_fns = (unsigned char) strlen (name); data/gawk-5.0.1+dfsg/vms/vms_popen.c:165: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). cmd.dsc$w_length = strlen(cmd.dsc$a_pointer = (char *)command); data/gawk-5.0.1+dfsg/vms/vms_popen.c:169: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). in.dsc$w_length = strlen(in.dsc$a_pointer = (char *)input); data/gawk-5.0.1+dfsg/vms/vms_popen.c:176: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). out.dsc$w_length = strlen(out.dsc$a_pointer = (char *)output); ANALYSIS SUMMARY: Hits = 849 Lines analyzed = 88126 in approximately 2.37 seconds (37177 lines/second) Physical Source Lines of Code (SLOC) = 61639 Hits@level = [0] 545 [1] 334 [2] 295 [3] 71 [4] 142 [5] 7 Hits@level+ = [0+] 1394 [1+] 849 [2+] 515 [3+] 220 [4+] 149 [5+] 7 Hits/KSLOC@level+ = [0+] 22.6156 [1+] 13.7737 [2+] 8.3551 [3+] 3.56917 [4+] 2.4173 [5+] 0.113564 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.