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/dateutils-0.4.5/build-aux/yuck-scmver.c Examining data/dateutils-0.4.5/build-aux/yuck-scmver.h Examining data/dateutils-0.4.5/build-aux/yuck.c Examining data/dateutils-0.4.5/contrib/tzconv.c Examining data/dateutils-0.4.5/lib/bizda.c Examining data/dateutils-0.4.5/lib/boops.h Examining data/dateutils-0.4.5/lib/daisy.c Examining data/dateutils-0.4.5/lib/date-core-private.h Examining data/dateutils-0.4.5/lib/date-core-strpf.c Examining data/dateutils-0.4.5/lib/date-core-strpf.h Examining data/dateutils-0.4.5/lib/date-core.c Examining data/dateutils-0.4.5/lib/date-core.h Examining data/dateutils-0.4.5/lib/dt-core-private.h Examining data/dateutils-0.4.5/lib/dt-core-strpf.c Examining data/dateutils-0.4.5/lib/dt-core-strpf.h Examining data/dateutils-0.4.5/lib/dt-core-tz-glue.c Examining data/dateutils-0.4.5/lib/dt-core-tz-glue.h Examining data/dateutils-0.4.5/lib/dt-core.c Examining data/dateutils-0.4.5/lib/dt-core.h Examining data/dateutils-0.4.5/lib/dt-locale.c Examining data/dateutils-0.4.5/lib/dt-locale.h Examining data/dateutils-0.4.5/lib/generics.h Examining data/dateutils-0.4.5/lib/gmtime.h Examining data/dateutils-0.4.5/lib/leap-seconds.h Examining data/dateutils-0.4.5/lib/leaps.c Examining data/dateutils-0.4.5/lib/leaps.h Examining data/dateutils-0.4.5/lib/nifty.h Examining data/dateutils-0.4.5/lib/strops.c Examining data/dateutils-0.4.5/lib/strops.h Examining data/dateutils-0.4.5/lib/testlib.c Examining data/dateutils-0.4.5/lib/time-core-private.h Examining data/dateutils-0.4.5/lib/time-core-strpf.c Examining data/dateutils-0.4.5/lib/time-core-strpf.h Examining data/dateutils-0.4.5/lib/time-core.c Examining data/dateutils-0.4.5/lib/time-core.h Examining data/dateutils-0.4.5/lib/token.c Examining data/dateutils-0.4.5/lib/token.h Examining data/dateutils-0.4.5/lib/tzmap.c Examining data/dateutils-0.4.5/lib/tzmap.h Examining data/dateutils-0.4.5/lib/tzraw.c Examining data/dateutils-0.4.5/lib/tzraw.h Examining data/dateutils-0.4.5/lib/version.h Examining data/dateutils-0.4.5/lib/yd.c Examining data/dateutils-0.4.5/lib/ymcw.c Examining data/dateutils-0.4.5/lib/ymd.c Examining data/dateutils-0.4.5/lib/ywd.c Examining data/dateutils-0.4.5/lib/ltrcc.c Examining data/dateutils-0.4.5/src/alist.c Examining data/dateutils-0.4.5/src/alist.h Examining data/dateutils-0.4.5/src/dadd.c Examining data/dateutils-0.4.5/src/dconv.c Examining data/dateutils-0.4.5/src/ddiff.c Examining data/dateutils-0.4.5/src/dexpr.c Examining data/dateutils-0.4.5/src/dexpr.h Examining data/dateutils-0.4.5/src/dgrep.c Examining data/dateutils-0.4.5/src/dround.c Examining data/dateutils-0.4.5/src/dseq.c Examining data/dateutils-0.4.5/src/dsort.c Examining data/dateutils-0.4.5/src/dt-io-zone.c Examining data/dateutils-0.4.5/src/dt-io-zone.h Examining data/dateutils-0.4.5/src/dt-io.c Examining data/dateutils-0.4.5/src/dt-io.h Examining data/dateutils-0.4.5/src/dtest.c Examining data/dateutils-0.4.5/src/dzone.c Examining data/dateutils-0.4.5/src/prchunk.c Examining data/dateutils-0.4.5/src/prchunk.h Examining data/dateutils-0.4.5/src/strptime.c Examining data/dateutils-0.4.5/test/basic_get_dom_wday.c Examining data/dateutils-0.4.5/test/basic_get_jan01_wday.c Examining data/dateutils-0.4.5/test/basic_md_get_yday.c Examining data/dateutils-0.4.5/test/basic_ymd_get_wday.c Examining data/dateutils-0.4.5/test/clitosis.c Examining data/dateutils-0.4.5/test/dtcore-add.c Examining data/dateutils-0.4.5/test/dtcore-conv.c Examining data/dateutils-0.4.5/test/dtcore-strp.c Examining data/dateutils-0.4.5/test/enum-1.c Examining data/dateutils-0.4.5/test/itostr-1.c Examining data/dateutils-0.4.5/test/itostr-2.c Examining data/dateutils-0.4.5/test/itostr-3.c Examining data/dateutils-0.4.5/test/itostr-4.c Examining data/dateutils-0.4.5/test/strtoi-1.c Examining data/dateutils-0.4.5/test/strtoi-bench.c Examining data/dateutils-0.4.5/test/struct-1.c Examining data/dateutils-0.4.5/test/struct-2.c Examining data/dateutils-0.4.5/test/struct-3.c Examining data/dateutils-0.4.5/test/struct-4.c Examining data/dateutils-0.4.5/test/struct-5.c Examining data/dateutils-0.4.5/test/struct-6.c Examining data/dateutils-0.4.5/test/struct-7.c Examining data/dateutils-0.4.5/test/struct-8.c Examining data/dateutils-0.4.5/test/struct-9.c Examining data/dateutils-0.4.5/test/time-core-add.c FINAL RESULTS: data/dateutils-0.4.5/build-aux/yuck.c:1136:22: [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 (UNLIKELY((off = readlink(myself, buf, bsz)) < 0)) { data/dateutils-0.4.5/build-aux/yuck.c:1143:22: [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 (UNLIKELY((off = readlink(myself, buf, bsz)) < 0)) { data/dateutils-0.4.5/build-aux/yuck.c:1150:22: [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 (UNLIKELY((off = readlink(myself, buf, bsz)) < 0)) { data/dateutils-0.4.5/build-aux/yuck.c:1167:22: [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 (UNLIKELY((off = readlink(buf, buf, bsz)) < 0)) { data/dateutils-0.4.5/test/clitosis.c:394:21: [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 (UNLIKELY((z = readlink(myself, buf, bsz)) < 0)) { data/dateutils-0.4.5/test/clitosis.c:406:21: [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 (UNLIKELY((z = readlink(myself, buf, bsz)) < 0)) { data/dateutils-0.4.5/test/clitosis.c:432:21: [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 (UNLIKELY((z = readlink(buf, buf, sizeof(buf))) < 0)) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:86:30: [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. static __attribute__((format(printf, 1, 2))) void data/dateutils-0.4.5/build-aux/yuck-scmver.c:91:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/build-aux/yuck-scmver.c:321: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(cmdline[0U], cmdline); data/dateutils-0.4.5/build-aux/yuck.c:134:30: [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. static __attribute__((format(printf, 1, 2))) void data/dateutils-0.4.5/build-aux/yuck.c:139:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/build-aux/yuck.c:1371:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(m4_cmdline[0U], m4_cmdline); data/dateutils-0.4.5/lib/dt-core-strpf.c:364: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. res = snprintf(buf, bsz, "%" PRIi64, sexy); data/dateutils-0.4.5/lib/tzmap.c:105:30: [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. static __attribute__((format(printf, 1, 2))) void data/dateutils-0.4.5/lib/tzmap.c:110:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/lib/tzmap.c:116:30: [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. static __attribute__((format(printf, 1, 2))) void data/dateutils-0.4.5/lib/tzmap.c:121:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/src/dsort.c:199:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp("sort", cmdline); data/dateutils-0.4.5/src/dsort.c:235:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp("cut", cmdline); data/dateutils-0.4.5/src/dt-io.c:39:23: [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. __attribute__((format(printf, 1, 2))) data/dateutils-0.4.5/src/dt-io.c:46:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/src/dt-io.c:53:23: [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. __attribute__((format(printf, 1, 2))) data/dateutils-0.4.5/src/dt-io.c:60:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/src/dt-io.h:109:30: [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. extern __attribute__((format(printf, 1, 2))) void error(const char *fmt, ...); data/dateutils-0.4.5/src/dt-io.h:112:30: [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. extern __attribute__((format(printf, 1, 2))) void serror(const char *fmt, ...); data/dateutils-0.4.5/src/prchunk.c:100:23: [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. __attribute__((format(printf, 2, 3))) data/dateutils-0.4.5/src/prchunk.c:106:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/test/clitosis.c:197:23: [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. __attribute__((format(printf, 1, 2))) data/dateutils-0.4.5/test/clitosis.c:202:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, vap); data/dateutils-0.4.5/test/clitosis.c:1094:4: [4] (shell) execv: 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. execv("/bin/sh", sh_args); data/dateutils-0.4.5/test/clitosis.c:1155:33: [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). if (UNLIKELY(expfn == NULL || strcpy(expfn, exp.d) == NULL)) { data/dateutils-0.4.5/test/clitosis.c:1196:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(cmd_diff, diff_opt); data/dateutils-0.4.5/test/clitosis.c:1328:4: [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", NULL); data/dateutils-0.4.5/test/clitosis.c:1330:4: [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(*ctx->huskv, ctx->huskv); data/dateutils-0.4.5/test/dtcore-add.c:11: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, args); \ data/dateutils-0.4.5/test/dtcore-conv.c:11: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, args); \ data/dateutils-0.4.5/test/dtcore-strp.c:11: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, args); \ data/dateutils-0.4.5/test/struct-7.c:21: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( \ data/dateutils-0.4.5/test/time-core-add.c:11: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, args); \ data/dateutils-0.4.5/build-aux/yuck.c:1210: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. if ((tmplpath = getenv("YUCK_TEMPLATE_PATH")) != NULL) { data/dateutils-0.4.5/build-aux/yuck.c:1295:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((p = getenv("M4")) == NULL) { data/dateutils-0.4.5/build-aux/yuck.c:1414: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. source_date_epoch = getenv("SOURCE_DATE_EPOCH"); data/dateutils-0.4.5/lib/dt-locale.c:532: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. fn = getenv("LOCALE_FILE") ?: locfn; data/dateutils-0.4.5/src/dt-io-zone.c:96:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((p = getenv("TZMAP_DIR")) != NULL) { data/dateutils-0.4.5/test/clitosis.c:339:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *ifs = getenv("IFS") ?: " \t\n"; data/dateutils-0.4.5/test/clitosis.c:372:14: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if ((res = realpath("/proc/self/exe", NULL)) == NULL) { data/dateutils-0.4.5/test/clitosis.c:1523: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. if (LIKELY((envp = getenv("PATH")) != NULL)) { data/dateutils-0.4.5/test/clitosis.c:1697: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. } else if (getenv("DIFF") != NULL) { data/dateutils-0.4.5/test/clitosis.c:1698: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. cmd_diff = getenv("DIFF"); data/dateutils-0.4.5/test/clitosis.c:1729:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. with (char *blddir = getenv("builddir")) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:123:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/build-aux/yuck-scmver.c:137:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/build-aux/yuck-scmver.c:278: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 *cmdline[16U]; data/dateutils-0.4.5/build-aux/yuck-scmver.c:296:15: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch ((p = vfork())) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:610: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. with (char buf[256U]) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:681: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. with (char buf[256U]) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:740: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. with (char buf[256U]) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:765: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. with (char buf[4096U]) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:830: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 cwd[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck-scmver.c:831: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 fn[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck-scmver.c:886:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((fd = open(fn, O_RDONLY)) < 0) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:890: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. with (char buf[256U]) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:919: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[256U]; data/dateutils-0.4.5/build-aux/yuck-scmver.c:938:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((fd = open(fn, O_RDWR | O_CREAT | O_TRUNC, 0666)) < 0) { data/dateutils-0.4.5/build-aux/yuck-scmver.h:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vtag[16U]; data/dateutils-0.4.5/build-aux/yuck.c:167:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/build-aux/yuck.c:179:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/build-aux/yuck.c:190:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/build-aux/yuck.c:299: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. mktempp(char *restrict tmpl[static 1U], int prefixlen) data/dateutils-0.4.5/build-aux/yuck.c:312: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(bp, O_RDWR | O_CREAT | O_EXCL, 0666)) < 0 && data/dateutils-0.4.5/build-aux/yuck.c:314: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). fd = open(bp, O_RDWR | O_CREAT | O_EXCL, 0666)) < 0) { data/dateutils-0.4.5/build-aux/yuck.c:319:21: [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). UNLIKELY((fd = mkstemp(bp), umask(m), fd < 0)) && data/dateutils-0.4.5/build-aux/yuck.c:323:14: [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). fd = mkstemp(bp)) < 0)) { data/dateutils-0.4.5/build-aux/yuck.c:333: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. mkftempp(char *restrict tmpl[static 1U], int prefixlen) data/dateutils-0.4.5/build-aux/yuck.c:909: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 sopt[2U] = {arg->sopt, '\0'}; data/dateutils-0.4.5/build-aux/yuck.c:1063:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (UNLIKELY((res = fopen(fn, "r")) == NULL)) { data/dateutils-0.4.5/build-aux/yuck.c:1108: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 dslfn[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck.c:1113: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 fn[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck.c:1201: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 pkgdatadir[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck.c:1269: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[4096U]; data/dateutils-0.4.5/build-aux/yuck.c:1284: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 *m4_cmdline[16U] = { data/dateutils-0.4.5/build-aux/yuck.c:1356:17: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch ((m4p = vfork())) { data/dateutils-0.4.5/build-aux/yuck.c:1384: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 ((outfd = open(outfn, outfl, 0666)) < 0) { data/dateutils-0.4.5/build-aux/yuck.c:1476:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (UNLIKELY((yf = fopen(fn, "r")) == NULL)) { data/dateutils-0.4.5/build-aux/yuck.c:1495: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. wr_header(const char hdr[static 1U]) data/dateutils-0.4.5/build-aux/yuck.c:1519: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[32U]; data/dateutils-0.4.5/build-aux/yuck.c:1606:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (UNLIKELY((fp = fopen(*inc, "r")) == NULL)) { data/dateutils-0.4.5/build-aux/yuck.c:1758: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 gencfn[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck.c:1759: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 genhfn[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck.c:1827: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 genmfn[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck.c:1920:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((outf = fopen(outfn, "w")) == NULL) { data/dateutils-0.4.5/build-aux/yuck.c:1994: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 tmplfn[PATH_MAX]; data/dateutils-0.4.5/build-aux/yuck.c:2044:26: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (fn != NULL && (of = fopen(fn, "w")) == NULL) { data/dateutils-0.4.5/lib/dt-locale.c:72:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *s[GREG_MONTHS_P_YEAR + 2U]; data/dateutils-0.4.5/lib/dt-locale.c:437: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(r->str, ln, lz); data/dateutils-0.4.5/lib/dt-locale.c:534: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(fn, O_RDONLY)) < 0) { data/dateutils-0.4.5/lib/ltrcc.c:361:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(file, "r")) == NULL) { data/dateutils-0.4.5/lib/strops.c:385:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, arr[i], ncp); data/dateutils-0.4.5/lib/strops.c:396: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. static unsigned char table[ALPHABET_SIZE]; data/dateutils-0.4.5/lib/testlib.c:31: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[256]; data/dateutils-0.4.5/lib/testlib.c:36: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[256]; data/dateutils-0.4.5/lib/testlib.c:47:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/dateutils-0.4.5/lib/tzmap.c:138:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/lib/tzmap.c:211: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(fn, O_RDONLY)) < 0) { data/dateutils-0.4.5/lib/tzmap.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(p, zn, zz); data/dateutils-0.4.5/lib/tzmap.c:368: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, mn, mz); data/dateutils-0.4.5/lib/tzmap.c:383: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 fullzn[256U] = {0}; data/dateutils-0.4.5/lib/tzmap.c:443: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 last[256U]; data/dateutils-0.4.5/lib/tzmap.c:507:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((fp = fopen(file, "r")) == NULL) { data/dateutils-0.4.5/lib/tzmap.c:535: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[4U]; data/dateutils-0.4.5/lib/tzmap.c:599:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((fp = fopen(check_fn = file, "r")) == NULL) { data/dateutils-0.4.5/lib/tzmap.c:656: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). } else if ((ofd = open(outf, O_RDWR | O_CREAT | O_TRUNC, 0666)) < 0) { data/dateutils-0.4.5/lib/tzmap.h:56:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char magic[4U]; data/dateutils-0.4.5/lib/tzraw.c:94: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 tzh_magic[4]; data/dateutils-0.4.5/lib/tzraw.c:96: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 tzh_version[1]; data/dateutils-0.4.5/lib/tzraw.c:98: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 tzh_reserved[15]; data/dateutils-0.4.5/lib/tzraw.c:334: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 new[tzd_len + 1U + len + 1U]; data/dateutils-0.4.5/lib/tzraw.c:337: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, tzdir, tzd_len); data/dateutils-0.4.5/lib/tzraw.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(tmp, file, len + 1U); data/dateutils-0.4.5/lib/tzraw.c:340:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(new, O_RDONLY, 0644); data/dateutils-0.4.5/lib/tzraw.c:343: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). return open(file, O_RDONLY, 0644); data/dateutils-0.4.5/lib/tzraw.c:393: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(tgt, src, offsetof(struct zih_s, tzh_ttisgmtcnt)); data/dateutils-0.4.5/lib/tzraw.c:425: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(tgt->tys, src->tys, ntr * sizeof(*tgt->tys)); data/dateutils-0.4.5/lib/tzraw.c:435: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(tgt->zn, src->zn, nch * sizeof(*tgt->zn)); data/dateutils-0.4.5/lib/tzraw.c:485: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(res, z, z->mpsz); data/dateutils-0.4.5/lib/tzraw.h:56: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 tzh_magic[4]; /* TZ_MAGIC */ data/dateutils-0.4.5/lib/tzraw.h:57:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tzh_version[1]; /* '\0' or '2' as of 2005 */ data/dateutils-0.4.5/lib/tzraw.h:58: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 tzh_reserved[15]; /* reserved--must be zero */ data/dateutils-0.4.5/lib/tzraw.h:59: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 tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ data/dateutils-0.4.5/lib/tzraw.h:60:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ data/dateutils-0.4.5/lib/tzraw.h: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 tzh_leapcnt[4]; /* coded number of leap seconds */ data/dateutils-0.4.5/lib/tzraw.h: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 tzh_timecnt[4]; /* coded number of transition times */ data/dateutils-0.4.5/lib/tzraw.h: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 tzh_typecnt[4]; /* coded number of local time types */ data/dateutils-0.4.5/lib/tzraw.h:64: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 tzh_charcnt[4]; /* coded number of abbr. chars */ data/dateutils-0.4.5/src/alist.c:133: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(al->data + al->dend, key, klen); data/dateutils-0.4.5/src/ddiff.c:631: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[256]; data/dateutils-0.4.5/src/dexpr.c:110: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[32]; data/dateutils-0.4.5/src/dexpr.c:260: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(res, src, sizeof(*res)); data/dateutils-0.4.5/src/dsort.c:84: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[64U]; data/dateutils-0.4.5/src/dsort.c:128:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((fd = open(fn, O_RDONLY)) < 0) { data/dateutils-0.4.5/src/dsort.c:157: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 *cmdline[16U] = {"sort", "-t", "-k2"}; data/dateutils-0.4.5/src/dsort.c:167:19: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch ((sortp = vfork())) { data/dateutils-0.4.5/src/dsort.c:218:18: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch ((cutp = vfork())) { data/dateutils-0.4.5/src/dt-io-zone.c:59:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/src/dt-io-zone.c:71:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/src/dt-io-zone.c:89: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 tzmfn[PATH_MAX]; data/dateutils-0.4.5/src/dt-io-zone.c:140: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 tzmfn[PATH_MAX]; data/dateutils-0.4.5/src/dt-io.c:304: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[256]; data/dateutils-0.4.5/src/dzone.c:65:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char gbuf[256U]; data/dateutils-0.4.5/src/dzone.c:79:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, ssz); data/dateutils-0.4.5/src/prchunk.c:184: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(ctx->buf, ctx->buf + ctx->off, rsz); data/dateutils-0.4.5/src/prchunk.c:448:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((fd = open(argv[1], O_RDONLY)) < 0) { data/dateutils-0.4.5/src/prchunk.c:458: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 *l[1]; data/dateutils-0.4.5/src/strptime.c:70: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 res[256]; data/dateutils-0.4.5/test/clitosis.c:226:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char p[sizeof(u)]; data/dateutils-0.4.5/test/clitosis.c:228: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, &u, sizeof(u)); data/dateutils-0.4.5/test/clitosis.c:326: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(res, s, z); data/dateutils-0.4.5/test/clitosis.c:378: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[PATH_MAX]; data/dateutils-0.4.5/test/clitosis.c:391: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[PATH_MAX]; data/dateutils-0.4.5/test/clitosis.c:403: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[PATH_MAX]; data/dateutils-0.4.5/test/clitosis.c:415: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[PATH_MAX]; data/dateutils-0.4.5/test/clitosis.c:428: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[PATH_MAX]; data/dateutils-0.4.5/test/clitosis.c:508:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. bufexp(const char src[static 1], size_t ssz) data/dateutils-0.4.5/test/clitosis.c:529:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, src, ssz); data/dateutils-0.4.5/test/clitosis.c:548: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(buf, xp->we_wordv[0], wz); data/dateutils-0.4.5/test/clitosis.c:628: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. with (char *buf[16U * 4096U]) { data/dateutils-0.4.5/test/clitosis.c:1174:22: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch ((difftool = vfork())) { data/dateutils-0.4.5/test/clitosis.c:1218: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). (expfd = open(expfn, ofl, 0666)) < 0) { data/dateutils-0.4.5/test/clitosis.c:1220:23: [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). } else if ((actfd = open(actfn, ofl, 0666)) < 0) { data/dateutils-0.4.5/test/clitosis.c:1295:44: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch ((ctx->chld = !ctx->options.ptyp ? vfork() : pfork(&pty))) { data/dateutils-0.4.5/test/clitosis.c:1548: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(pp, p, pz + 1U/*\nul*/); data/dateutils-0.4.5/test/clitosis.c:1573: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(pp, p, pz); data/dateutils-0.4.5/test/clitosis.c:1630: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(testfile, O_RDONLY)) < 0) { data/dateutils-0.4.5/test/clitosis.c:1732: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 _blddir[256U]; data/dateutils-0.4.5/test/itostr-1.c:8: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[32U]; data/dateutils-0.4.5/test/itostr-2.c:8: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[32U]; data/dateutils-0.4.5/test/itostr-3.c:8: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[32U]; data/dateutils-0.4.5/test/itostr-4.c:8: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[32U]; data/dateutils-0.4.5/build-aux/yuck-scmver.c:120:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((ssz = strlen(src)) > dsz) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:147: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). fp = fn + strlen(fn); data/dateutils-0.4.5/build-aux/yuck-scmver.c:616:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nrd = read(*fd, buf, sizeof(buf))) <= 0) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:687:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nrd = read(*fd, buf, sizeof(buf))) <= 0) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:743:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nrd = read(*fd, buf, sizeof(buf))) <= 0) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:773:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nrd = read(*fd, bp, bz)) == (ssize_t)bz) { data/dateutils-0.4.5/build-aux/yuck-scmver.c:894:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nrd = read(fd, buf, sizeof(buf))) <= 0) { data/dateutils-0.4.5/build-aux/yuck.c:175: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 ssz = strlen(src); data/dateutils-0.4.5/build-aux/yuck.c:303: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). char *const ep = *tmpl + strlen(*tmpl); data/dateutils-0.4.5/build-aux/yuck.c:308:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umsk = umask(0022); data/dateutils-0.4.5/build-aux/yuck.c:318:17: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). } else if (m = umask(S_IXUSR | S_IRWXG | S_IRWXO), data/dateutils-0.4.5/build-aux/yuck.c:319:34: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). UNLIKELY((fd = mkstemp(bp), umask(m), fd < 0)) && data/dateutils-0.4.5/build-aux/yuck.c:808: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). bbuf_cpy(i, arg->lopt, strlen(arg->lopt)); data/dateutils-0.4.5/build-aux/yuck.c:830:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (LIKELY(bbuf_cpy(buf, str, strlen(str)) != NULL)) { data/dateutils-0.4.5/build-aux/yuck.c:1043:58: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # error neither getline() nor fgetln() available, cannot read file line by line data/dateutils-0.4.5/build-aux/yuck.c:1163: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). off = strlen(buf); data/dateutils-0.4.5/build-aux/yuck.c:1176: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). off = strlen(buf); data/dateutils-0.4.5/build-aux/yuck.c:1211: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). tmplplen = strlen(tmplpath); data/dateutils-0.4.5/build-aux/yuck.c:1271:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (ssize_t nrd; (nrd = read(srcfd, buf, sizeof(buf))) > 0;) { data/dateutils-0.4.5/build-aux/yuck.c:1628:58: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # error neither getline() nor fgetln() available, cannot read file line by line data/dateutils-0.4.5/lib/date-core.c:684: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(fmt); data/dateutils-0.4.5/lib/dt-locale.c:584: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 (UNLIKELY(ln == NULL || !(lz = strlen(ln)))) { data/dateutils-0.4.5/lib/dt-locale.c:597: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 (UNLIKELY(ln == NULL || !(lz = strlen(ln)))) { data/dateutils-0.4.5/lib/strops.c:354: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(chk); data/dateutils-0.4.5/lib/strops.c:383: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(arr[i]); data/dateutils-0.4.5/lib/tzmap.c:333: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). for (; p < ep && *p && strncmp(p, zn, zz); p += strlen(p), p++); data/dateutils-0.4.5/lib/tzmap.c:520:58: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # error neither getline() nor fgetln() available, cannot read file line by line data/dateutils-0.4.5/lib/tzmap.c:567: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 mz = strlen(mn); data/dateutils-0.4.5/lib/tzmap.c:576: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). zz = strlen(zn); data/dateutils-0.4.5/lib/tzmap.c:617:58: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # error neither getline() nor fgetln() available, cannot read file line by line data/dateutils-0.4.5/lib/tzmap.c:714: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 mz = strlen(mn); data/dateutils-0.4.5/lib/tzraw.c:332: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(file); data/dateutils-0.4.5/src/alist.c:130: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 klen = strlen(key); data/dateutils-0.4.5/src/alist.c:166: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 klen = strlen(p); data/dateutils-0.4.5/src/dexpr.c:652: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). dexpr_parse(&root, argv[i], strlen(argv[i])); data/dateutils-0.4.5/src/dgrep.c:168: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). dexpr_parse(&root, argi->args[0U], strlen(argi->args[0U])) < 0) { data/dateutils-0.4.5/src/dt-io-zone.c:67: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 ssz = strlen(src); data/dateutils-0.4.5/src/dt-io.c:77: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(str); data/dateutils-0.4.5/src/dzone.c:75: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 ssz = strlen(src); data/dateutils-0.4.5/src/prchunk.c:198:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bno += (nrd = read(ctx->fd, bno, CHUNK_SIZE)); data/dateutils-0.4.5/test/clitosis.c:546: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). with (size_t wz = strlen(xp->we_wordv[0])) { data/dateutils-0.4.5/test/clitosis.c:631:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nrd = read(srcfd, buf, sizeof(buf))) > 0) { data/dateutils-0.4.5/test/clitosis.c:995: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(key) + 9U + 8U + 1U; data/dateutils-0.4.5/test/clitosis.c:1154: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). expfn = malloc(strlen(exp.d) + 1U); data/dateutils-0.4.5/test/clitosis.c:1518: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). pz = strlen(p); data/dateutils-0.4.5/test/clitosis.c:1524: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). const size_t envz = strlen(envp); ANALYSIS SUMMARY: Hits = 225 Lines analyzed = 30572 in approximately 0.86 seconds (35695 lines/second) Physical Source Lines of Code (SLOC) = 22089 Hits@level = [0] 92 [1] 46 [2] 128 [3] 11 [4] 33 [5] 7 Hits@level+ = [0+] 317 [1+] 225 [2+] 179 [3+] 51 [4+] 40 [5+] 7 Hits/KSLOC@level+ = [0+] 14.351 [1+] 10.1861 [2+] 8.10358 [3+] 2.30884 [4+] 1.81086 [5+] 0.3169 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.