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/libgpg-error-1.38/tests/t-logging.c Examining data/libgpg-error-1.38/tests/t-version.c Examining data/libgpg-error-1.38/tests/t-common.h Examining data/libgpg-error-1.38/tests/t-argparse.c Examining data/libgpg-error-1.38/tests/t-lock.c Examining data/libgpg-error-1.38/tests/t-printf.c Examining data/libgpg-error-1.38/tests/t-stringutils.c Examining data/libgpg-error-1.38/tests/t-malloc.c Examining data/libgpg-error-1.38/tests/t-strerror.c Examining data/libgpg-error-1.38/tests/t-b64.c Examining data/libgpg-error-1.38/tests/t-poll.c Examining data/libgpg-error-1.38/tests/t-syserror.c Examining data/libgpg-error-1.38/doc/yat2m.c Examining data/libgpg-error-1.38/src/b64enc.c Examining data/libgpg-error-1.38/src/w32-iconv.c Examining data/libgpg-error-1.38/src/stringutils.c Examining data/libgpg-error-1.38/src/init.h Examining data/libgpg-error-1.38/src/visibility.c Examining data/libgpg-error-1.38/src/estream-printf.c Examining data/libgpg-error-1.38/src/estream-printf.h Examining data/libgpg-error-1.38/src/gettext.h Examining data/libgpg-error-1.38/src/gen-posix-lock-obj.c Examining data/libgpg-error-1.38/src/err-codes.h Examining data/libgpg-error-1.38/src/w32-lock-obj.h Examining data/libgpg-error-1.38/src/visibility.h Examining data/libgpg-error-1.38/src/init.c Examining data/libgpg-error-1.38/src/err-sources.h Examining data/libgpg-error-1.38/src/w32-thread.c Examining data/libgpg-error-1.38/src/estream.c Examining data/libgpg-error-1.38/src/syscall-clamp.c Examining data/libgpg-error-1.38/src/spawn-posix.c Examining data/libgpg-error-1.38/src/lock.h Examining data/libgpg-error-1.38/src/code-from-errno.c Examining data/libgpg-error-1.38/src/mkerrcodes.c Examining data/libgpg-error-1.38/src/w32-gettext.c Examining data/libgpg-error-1.38/src/w32-reg.c Examining data/libgpg-error-1.38/src/argparse.c Examining data/libgpg-error-1.38/src/code-to-errno.c Examining data/libgpg-error-1.38/src/strerror-sym.c Examining data/libgpg-error-1.38/src/b64dec.c Examining data/libgpg-error-1.38/src/w32-add.h Examining data/libgpg-error-1.38/src/strerror.c Examining data/libgpg-error-1.38/src/w32ce-add.h Examining data/libgpg-error-1.38/src/posix-lock.c Examining data/libgpg-error-1.38/src/strsource-sym.c Examining data/libgpg-error-1.38/src/logging.c Examining data/libgpg-error-1.38/src/mkheader.c Examining data/libgpg-error-1.38/src/gpgrt-int.h Examining data/libgpg-error-1.38/src/posix-thread.c Examining data/libgpg-error-1.38/src/thread.h Examining data/libgpg-error-1.38/src/version.c Examining data/libgpg-error-1.38/src/gen-w32-lock-obj.c Examining data/libgpg-error-1.38/src/w32-estream.c Examining data/libgpg-error-1.38/src/mkw32errmap.c Examining data/libgpg-error-1.38/src/strsource.c Examining data/libgpg-error-1.38/src/spawn-w32.c Examining data/libgpg-error-1.38/src/sysutils.c Examining data/libgpg-error-1.38/src/gpg-error.c Examining data/libgpg-error-1.38/src/posix-lock-obj.h Examining data/libgpg-error-1.38/src/w32-lock.c Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.tilegx-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mips64-unknown-linux-gnuabi64.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sh3-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sparc-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mips-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.ia64-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mingw32.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i686-unknown-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.s390x-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc64-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i686-unknown-kfreebsd-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.or1k-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-apple-darwin.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sparc64-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-linux-musl.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.riscv32-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.m68k-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mipsel-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.arm-apple-darwin.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc-unknown-linux-gnuspe.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i386-apple-darwin.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i686-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.alpha-unknown-linux-gnu.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.aarch64-apple-darwin.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnux32.h Examining data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sh4-unknown-linux-gnu.h Examining data/libgpg-error-1.38/debian/tests/simple-build.c FINAL RESULTS: data/libgpg-error-1.38/doc/yat2m.c:116:51: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define ATTR_PRINTF(f, a) __attribute__ ((format(printf,f,a))) data/libgpg-error-1.38/doc/yat2m.c:117:64: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define ATTR_NR_PRINTF(f, a) __attribute__ ((noreturn, format(printf,f,a))) data/libgpg-error-1.38/doc/yat2m.c:264:3: [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, format, arg_ptr); data/libgpg-error-1.38/doc/yat2m.c:283:3: [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, format, arg_ptr); data/libgpg-error-1.38/doc/yat2m.c:299:3: [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, format, arg_ptr); data/libgpg-error-1.38/doc/yat2m.c:338: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, string); data/libgpg-error-1.38/doc/yat2m.c:393:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (m->name, name); data/libgpg-error-1.38/doc/yat2m.c:416:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (m->name, macroname); data/libgpg-error-1.38/doc/yat2m.c:453:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (m->name, nameandvalue); data/libgpg-error-1.38/doc/yat2m.c:549: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 (cond->name, name); data/libgpg-error-1.38/doc/yat2m.c:656:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (lb->line+n1+1, line); data/libgpg-error-1.38/doc/yat2m.c:1249:15: [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 (macrovalue+macrovalueused, line); data/libgpg-error-1.38/doc/yat2m.c:1413:19: [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 (incname, opt_include); data/libgpg-error-1.38/doc/yat2m.c:1416:19: [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 (incname, p); data/libgpg-error-1.38/src/argparse.c:640:15: [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 (item->name, name); data/libgpg-error-1.38/src/argparse.c:1470:12: [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 (name, R_OK)) data/libgpg-error-1.38/src/estream-printf.c:1121:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (numbuf, p, adblfloat); data/libgpg-error-1.38/src/estream-printf.c:1124:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (numbuf, p, afloat); data/libgpg-error-1.38/src/estream-printf.h:107:56: [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,f,a))) data/libgpg-error-1.38/src/estream.c:299:31: [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 dbg_lock_0(f) fprintf (stderr, "estream: " f); data/libgpg-error-1.38/src/estream.c:300:31: [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 dbg_lock_1(f, a) fprintf (stderr, "estream: " f, (a)); data/libgpg-error-1.38/src/estream.c:301:31: [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 dbg_lock_2(f, a, b) fprintf (stderr, "estream: " f, (a), (b)); data/libgpg-error-1.38/src/estream.c:5118: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 (stream->intern->printable_fname+quote, fname); data/libgpg-error-1.38/src/gen-posix-lock-obj.c:87: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, PGM ": pthread_mutex_t mismatch\n"); data/libgpg-error-1.38/src/gen-posix-lock-obj.c:94: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, PGM ": internal and external lock object mismatch\n"); data/libgpg-error-1.38/src/gen-posix-lock-obj.c:170: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, PGM ": error writing to stdout: %s\n", strerror (errno)); data/libgpg-error-1.38/src/gpg-error.c:140:15: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (result, SLDIR); data/libgpg-error-1.38/src/gpg-error.c:150:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (result, SLDIR); data/libgpg-error-1.38/src/gpgrt-int.h:479:8: [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. #undef snprintf data/libgpg-error-1.38/src/gpgrt-int.h:480: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 _gpgrt_estream_snprintf data/libgpg-error-1.38/src/init.c:350: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 (p, string); data/libgpg-error-1.38/src/init.c:485:3: [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 (trace_fp, format, arg_ptr); data/libgpg-error-1.38/src/init.c:499:3: [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 (trace_fp, format, arg_ptr); data/libgpg-error-1.38/src/init.c:589:15: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (result, SLDIR); data/libgpg-error-1.38/src/init.c:599:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (result, SLDIR); data/libgpg-error-1.38/src/logging.c:300:15: [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 (addrstr, name+1); data/libgpg-error-1.38/src/logging.c:330:15: [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 (addrstr, name); data/libgpg-error-1.38/src/logging.c:528: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 (cookie->name, name? name:""); data/libgpg-error-1.38/src/mkheader.c:261: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, PGM ": error writing to stdout: %s\n", strerror (errno)); data/libgpg-error-1.38/src/mkheader.c:271: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, PGM ": error writing to stdout: %s\n", strerror (errno)); data/libgpg-error-1.38/src/mkheader.c:377: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 (incfname, srcdir); data/libgpg-error-1.38/src/mkheader.c:486:8: [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. rc = access (incfname, R_OK); data/libgpg-error-1.38/src/mkheader.c:491:12: [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. rc = access (incfname, R_OK); data/libgpg-error-1.38/src/mkheader.c:684: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 (srcdir, fname); data/libgpg-error-1.38/src/mkheader.c:770: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, PGM ": error writing to stdout: %s\n", strerror (errno)); data/libgpg-error-1.38/src/spawn-posix.c:317:3: [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 (pgmname, arg_list); data/libgpg-error-1.38/src/spawn-posix.c:812:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (pgmname, X_OK)) data/libgpg-error-1.38/src/spawn-w32.c:833:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (pgmname, X_OK)) data/libgpg-error-1.38/src/stringutils.c:169:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (stpcpy (p, "/"), name); data/libgpg-error-1.38/src/stringutils.c:171:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (stpcpy (stpcpy (p, home), "/"), name); data/libgpg-error-1.38/src/w32-gettext.c:1495: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 (catval, catval_full); data/libgpg-error-1.38/src/w32-gettext.c:1519: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 (p, dirname); data/libgpg-error-1.38/src/w32-gettext.c:1522: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 (p, catval); data/libgpg-error-1.38/src/w32-gettext.c:1526: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 (p, domainname); data/libgpg-error-1.38/src/w32-gettext.c:1545: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 (item->name, domainname); data/libgpg-error-1.38/src/w32-gettext.c:1553: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 (item->dname, dirname); data/libgpg-error-1.38/src/w32-gettext.c:1767:11: [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 (filename, dl->fname); data/libgpg-error-1.38/src/w32-gettext.c:1878:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (string, domainname); data/libgpg-error-1.38/src/w32-reg.c:140:15: [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 (result, tmp); data/libgpg-error-1.38/tests/t-b64.c:157: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 (buffer, string); data/libgpg-error-1.38/tests/t-common.h:80:3: [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, format, arg_ptr); data/libgpg-error-1.38/tests/t-common.h:104:3: [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, format, arg_ptr); data/libgpg-error-1.38/tests/t-common.h:129:3: [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, format, arg_ptr); data/libgpg-error-1.38/doc/yat2m.c:1627:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!opt_date && (s = getenv ("SOURCE_DATE_EPOCH")) && *s) data/libgpg-error-1.38/src/init.c:450: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. const char *s = getenv ("GPGRT_TRACE_FILE"); data/libgpg-error-1.38/src/sysutils.c:109: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 *s = getenv (name); data/libgpg-error-1.38/src/sysutils.c:147: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 (getenv (name)) data/libgpg-error-1.38/src/sysutils.c:162: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. if (overwrite || !getenv (name)) data/libgpg-error-1.38/src/sysutils.c:203: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 (getenv (name)) data/libgpg-error-1.38/src/sysutils.c:212:28: [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 (overwrite || !getenv (name)) data/libgpg-error-1.38/src/w32-estream.c:132:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:144:11: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:182:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:265:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:307:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:369:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:388:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:458:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:474:11: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:504:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:568:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:608:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:669:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-estream.c:700:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->mutex); data/libgpg-error-1.38/src/w32-gettext.c:676:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv ("LC_ALL"); data/libgpg-error-1.38/src/w32-gettext.c:679:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv (categoryname); data/libgpg-error-1.38/src/w32-gettext.c:682:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv ("LANG"); data/libgpg-error-1.38/src/w32-gettext.c:1212:7: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&domainlist_access_cs); data/libgpg-error-1.38/src/w32-gettext.c:1465:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&domainlist_access_cs); data/libgpg-error-1.38/src/w32-gettext.c:1556:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&domainlist_access_cs); data/libgpg-error-1.38/src/w32-gettext.c:1754:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&domainlist_access_cs); data/libgpg-error-1.38/src/w32-gettext.c:1781:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&domainlist_access_cs); data/libgpg-error-1.38/src/w32-iconv.c:697:9: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. h = LoadLibrary(TEXT("mlang.dll")); data/libgpg-error-1.38/src/w32-lock.c:74:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->csec); data/libgpg-error-1.38/src/w32-lock.c:106:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->csec); data/libgpg-error-1.38/tests/t-argparse.c:99: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. srcdir = getenv ("srcdir"); data/libgpg-error-1.38/tests/t-lock.c:174:3: [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 (time(NULL)*getpid()); /* Windows needs it per thread. */ data/libgpg-error-1.38/tests/t-lock.c:308:3: [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 (time(NULL)*getpid()); data/libgpg-error-1.38/tests/t-stringutils.c:65: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. char *home = getenv("HOME"); data/libgpg-error-1.38/doc/yat2m.c:164: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 name[1]; data/libgpg-error-1.38/doc/yat2m.c:182: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 name[1]; /* Name of the condition macro. */ data/libgpg-error-1.38/doc/yat2m.c:360: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 buffer[36]; data/libgpg-error-1.38/doc/yat2m.c:369: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 (buffer, "????" "-??" "-??"); data/libgpg-error-1.38/doc/yat2m.c:373:7: [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 (buffer,"%04d-%02d-%02d", data/libgpg-error-1.38/doc/yat2m.c:479:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return !!atoi (m->value); data/libgpg-error-1.38/doc/yat2m.c:936: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 cmdbuf[256]; data/libgpg-error-1.38/doc/yat2m.c:1099:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen ( "/dev/null", "w" ); data/libgpg-error-1.38/doc/yat2m.c:1107: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). fp = fopen ( thepage.name, "w" ); data/libgpg-error-1.38/doc/yat2m.c:1406:29: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *incfp = fopen (incname, "r"); data/libgpg-error-1.38/doc/yat2m.c:1417:27: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). incfp = fopen (incname, "r"); data/libgpg-error-1.38/doc/yat2m.c:1633:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen (*argv, "rb"); data/libgpg-error-1.38/src/argparse.c:148: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 name[1]; /* String with the long option name. */ data/libgpg-error-1.38/src/argparse.c:586: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 name[100]; data/libgpg-error-1.38/src/argparse.c:955: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 keyword[100]; data/libgpg-error-1.38/src/argparse.c:1351:19: [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, keyword, i); data/libgpg-error-1.38/src/argparse.c:1635:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tmpname, confname, s-confname); data/libgpg-error-1.38/src/argparse.c:2309:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[2]; data/libgpg-error-1.38/src/argparse.c:2542:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[50]; data/libgpg-error-1.38/src/b64dec.c:33: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 const asctobin[128] = data/libgpg-error-1.38/src/b64enc.c:42: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 const bintoasc[64] = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" data/libgpg-error-1.38/src/b64enc.c:194: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 radbuf[4]; data/libgpg-error-1.38/src/b64enc.c:228: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 (radbuf, state->radbuf, idx); data/libgpg-error-1.38/src/b64enc.c:245: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. char tmp[4]; data/libgpg-error-1.38/src/b64enc.c:266:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (state->radbuf, radbuf, idx); data/libgpg-error-1.38/src/b64enc.c:286: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 radbuf[4]; data/libgpg-error-1.38/src/b64enc.c:288:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[4]; data/libgpg-error-1.38/src/b64enc.c:312: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 (radbuf, state->radbuf, idx); data/libgpg-error-1.38/src/estream-printf.c:825: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/libgpg-error-1.38/src/estream-printf.c:857: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 numbuf[100]; data/libgpg-error-1.38/src/estream-printf.c:1063: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 numbuf[350]; data/libgpg-error-1.38/src/estream-printf.c:1064: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 formatstr[20]; data/libgpg-error-1.38/src/estream-printf.c:1181: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[1]; data/libgpg-error-1.38/src/estream-printf.c:1266: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 numbuf[100]; data/libgpg-error-1.38/src/estream-printf.c:1725: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 (parm->buffer + parm->used, buf, buflen); data/libgpg-error-1.38/src/estream-printf.c:1821: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 (parm->buffer + parm->used, buf, buflen); data/libgpg-error-1.38/src/estream.c:193: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 custom_std_fds_valid[3]; data/libgpg-error-1.38/src/estream.c:622: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 (buffer, mem_cookie->memory + mem_cookie->offset, size); data/libgpg-error-1.38/src/estream.c:709: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 (mem_cookie->memory + mem_cookie->offset, buffer, size); data/libgpg-error-1.38/src/estream.c:1599:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (path, modeflags, cmode); data/libgpg-error-1.38/src/estream.c:2287: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 buffer[1]; data/libgpg-error-1.38/src/estream.c:2335:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer + data_read, data/libgpg-error-1.38/src/estream.c:2355: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 buffer[1]; data/libgpg-error-1.38/src/estream.c:2503: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 (stream->unread_buffer + stream->unread_data_len, data, data_n); data/libgpg-error-1.38/src/estream.c:2667: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 (stream->buffer + stream->data_offset, data/libgpg-error-1.38/src/estream.c:4295: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 (*lineptr, line, line_n + 1); data/libgpg-error-1.38/src/estream.c:4504:3: [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 buffer[MAX_PATH+9+12+1]; data/libgpg-error-1.38/src/estream.c:4508: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 buffer[MAX_PATH+9+12+1]; data/libgpg-error-1.38/src/estream.c:4525:3: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy (p, L"_estream"); data/libgpg-error-1.38/src/estream.c:4527: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 (p, "_estream"); data/libgpg-error-1.38/src/estream.c:4546:7: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy (p, L".tmp"); data/libgpg-error-1.38/src/estream.c:4548:7: [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 (p, ".tmp"); data/libgpg-error-1.38/src/estream.c:4583:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fp = tmpfile (); data/libgpg-error-1.38/src/gpg-error.c:105:10: [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. static wchar_t moddir[MAX_PATH+5]; data/libgpg-error-1.38/src/gpg-error.c:149:11: [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 (result, "c:\\gnupg"); data/libgpg-error-1.38/src/gpg-error.c:442: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 line[512]; data/libgpg-error-1.38/src/gpg-error.c:454: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). fp = fopen (PKGDATADIR "/errorref.txt", "r"); data/libgpg-error-1.38/src/gpgrt-int.h:274: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 buffer[BUFFER_BLOCK_SIZE]; data/libgpg-error-1.38/src/gpgrt-int.h:275: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 unread_buffer[BUFFER_UNREAD_SIZE]; data/libgpg-error-1.38/src/gpgrt-int.h:505: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 radbuf[4]; data/libgpg-error-1.38/src/init.c:359: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. const char *argv[48]; data/libgpg-error-1.38/src/init.c:452: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 (!s || !(fp = fopen (s, "wb"))) data/libgpg-error-1.38/src/init.c:539:10: [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. static wchar_t moddir[MAX_PATH+5]; data/libgpg-error-1.38/src/init.c:598:11: [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 (result, "c:\\gnupg"); data/libgpg-error-1.38/src/init.c:658:3: [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 tmpbuf[STRBUFFER_SIZE]; data/libgpg-error-1.38/src/init.h:37: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 name[1]; /* Name of the domain. Never changed data/libgpg-error-1.38/src/init.h:55: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 strerror_buffer[STRBUFFER_SIZE]; data/libgpg-error-1.38/src/logging.c:93: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 prefix_buffer[80]; data/libgpg-error-1.38/src/logging.c:150: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 name[1]; data/libgpg-error-1.38/src/logging.c:267:19: [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 (srvr_addr_un.sun_path, "/S.log"); data/libgpg-error-1.38/src/logging.c:542: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). cookie->fd = open (name, O_WRONLY|O_APPEND|O_CREAT, data/libgpg-error-1.38/src/logging.c:1290: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 clockbuf[50]; data/libgpg-error-1.38/src/mkheader.c:76: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, string, len); data/libgpg-error-1.38/src/mkheader.c:156: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. memcpy (p, "unknown-",8); data/libgpg-error-1.38/src/mkheader.c:192: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 line[LINESIZE]; data/libgpg-error-1.38/src/mkheader.c:196: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 (fname, "r"); data/libgpg-error-1.38/src/mkheader.c:407: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 line[LINESIZE]; data/libgpg-error-1.38/src/mkheader.c:412: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 (incfname, "r"); data/libgpg-error-1.38/src/mkheader.c:418: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). fp = fopen (incfname, "r"); data/libgpg-error-1.38/src/mkheader.c:635: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 line[LINESIZE]; data/libgpg-error-1.38/src/mkheader.c:689: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 (srcdir, "./"); data/libgpg-error-1.38/src/mkheader.c:694: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 (fname, "r"); data/libgpg-error-1.38/src/posix-lock.c:253: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. memcpy (lockhd, &tmp, sizeof tmp); data/libgpg-error-1.38/src/spawn-posix.c:105:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). x = atoi (s); data/libgpg-error-1.38/src/spawn-posix.c:297: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). fds[i] = open ("/dev/null", i? O_WRONLY : O_RDONLY); data/libgpg-error-1.38/src/strerror.c:74: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, errstr, cpy_len); data/libgpg-error-1.38/src/strerror.c:130: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, errstr, cpy_len); data/libgpg-error-1.38/src/strerror.c:172: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, errstr, cpy_len); data/libgpg-error-1.38/src/stringutils.c:44: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. const char *argv[32]; data/libgpg-error-1.38/src/stringutils.c:163: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. memcpy (home_buffer, p, p - name + 1); data/libgpg-error-1.38/src/syscfg/lock-obj-pub.aarch64-apple-darwin.h:9: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. volatile char _priv[64]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu.h:9: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. volatile char _priv[48]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h:9: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. volatile char _priv[32]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.alpha-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.arm-apple-darwin.h:9: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. volatile char _priv[44]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h:9: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. volatile char _priv[4]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h:9: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. volatile char _priv[48]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i386-apple-darwin.h:9: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. volatile char _priv[44]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i686-unknown-gnu.h:9: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. volatile char _priv[32]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i686-unknown-kfreebsd-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.i686-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.ia64-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.m68k-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mingw32.h:23:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. volatile unsigned char priv[56]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mingw32.h:37:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. volatile unsigned char priv[36]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mips-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mips64-unknown-linux-gnuabi64.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.mipsel-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.or1k-unknown-linux-gnu.h:9: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. volatile char _priv[32]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc-unknown-linux-gnuspe.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc64-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.riscv32-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.s390x-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sh3-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sh4-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sparc-unknown-linux-gnu.h:9: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. volatile char _priv[24]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.sparc64-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.tilegx-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-apple-darwin.h:9: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. volatile char _priv[64]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnux32.h:9: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. volatile char _priv[32]; data/libgpg-error-1.38/src/syscfg/lock-obj-pub.x86_64-unknown-linux-musl.h:9: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. volatile char _priv[40]; data/libgpg-error-1.38/src/sysutils.c:140: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 tmpbuf[10]; data/libgpg-error-1.38/src/sysutils.c:389:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[1]; data/libgpg-error-1.38/src/w32-estream.c:86: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 buffer[READBUF_SIZE]; data/libgpg-error-1.38/src/w32-estream.c:105: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 buffer[WRITEBUF_SIZE]; data/libgpg-error-1.38/src/w32-estream.c:412: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 (buffer, ctx->buffer + ctx->readpos, nread); data/libgpg-error-1.38/src/w32-estream.c:720: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->buffer, buffer, count); data/libgpg-error-1.38/src/w32-estream.c:761: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 waitinfo[MAXIMUM_WAIT_OBJECTS]; data/libgpg-error-1.38/src/w32-gettext.c:62: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 name[28]; data/libgpg-error-1.38/src/w32-gettext.c:1159: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 d[1]; data/libgpg-error-1.38/src/w32-gettext.c:1365:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, length, NULL, 0); data/libgpg-error-1.38/src/w32-gettext.c:1379:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, length, result, n); data/libgpg-error-1.38/src/w32-gettext.c:1524: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 (p, "\\LC_MESSAGES\\"); data/libgpg-error-1.38/src/w32-gettext.c:1528: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 (p, ".mo"); data/libgpg-error-1.38/src/w32-gettext.c:1666: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. memcpy (p_tmp, buf, buflen); data/libgpg-error-1.38/src/w32-gettext.c:1684: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. memcpy (os->d, buf, buflen); data/libgpg-error-1.38/src/w32-iconv.c:958:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(name + 2); /* CP123 */ data/libgpg-error-1.38/src/w32-iconv.c:960:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(name); /* 123 */ data/libgpg-error-1.38/src/w32-iconv.c:962:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(name + 2); /* XX123 for debug */ data/libgpg-error-1.38/src/w32-iconv.c:1060: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, s, n); data/libgpg-error-1.38/src/w32-iconv.c:1185:17: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). *wbufsize = MultiByteToWideChar(cv->codepage, mbtowc_flags (cv->codepage), data/libgpg-error-1.38/src/w32-iconv.c:1255: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 tmpbuf[MB_CHAR_MAX]; /* enough room for one character */ data/libgpg-error-1.38/src/w32-iconv.c:1268: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, tmpbuf, tmpsize); data/libgpg-error-1.38/src/w32-iconv.c:1335:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, "\xFF\xFE", 2); data/libgpg-error-1.38/src/w32-iconv.c:1337:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, "\xFE\xFF", 2); data/libgpg-error-1.38/src/w32-iconv.c:1428:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, "\xFF\xFE\x00\x00", 4); data/libgpg-error-1.38/src/w32-iconv.c:1430:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, "\x00\x00\xFE\xFF", 4); data/libgpg-error-1.38/src/w32-iconv.c:1518: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[MB_CHAR_MAX]; data/libgpg-error-1.38/src/w32-iconv.c:1535:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (strncmp((char *)buf, iesc[i].esc, bufsize) == 0) data/libgpg-error-1.38/src/w32-iconv.c:1540:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (strncmp((char *)buf, iesc[i].esc, esc_len) == 0) data/libgpg-error-1.38/src/w32-iconv.c:1581: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(tmp, iesc[cs].esc, esc_len); data/libgpg-error-1.38/src/w32-iconv.c:1584:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp + esc_len, iso2022_SO_seq, 1); data/libgpg-error-1.38/src/w32-iconv.c:1587: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(tmp + esc_len, buf, len); data/libgpg-error-1.38/src/w32-iconv.c:1595:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, iesc[ISO2022JP_CS_JISX0201_KANA].esc, esc_len); data/libgpg-error-1.38/src/w32-iconv.c:1596:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp + esc_len, buf, len); data/libgpg-error-1.38/src/w32-iconv.c:1625: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[MB_CHAR_MAX]; data/libgpg-error-1.38/src/w32-iconv.c:1699:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, iesc[ISO2022JP_CS_ASCII].esc, esc_len); data/libgpg-error-1.38/src/w32-iconv.c:1705:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, iso2022_SI_seq, 1); data/libgpg-error-1.38/src/w32-iconv.c:1712: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, tmp, len + esc_len); data/libgpg-error-1.38/src/w32-iconv.c:1738:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, iso2022_SI_seq, 1); data/libgpg-error-1.38/src/w32-iconv.c:1743:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + esc_len, iesc[ISO2022JP_CS_ASCII].esc, data/libgpg-error-1.38/tests/t-logging.c:162: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 testbuf[100]; data/libgpg-error-1.38/tests/t-poll.c:103: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[15]; data/libgpg-error-1.38/tests/t-poll.c:215: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 buffer[16]; data/libgpg-error-1.38/tests/t-printf.c:388: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 buffer[20]; data/libgpg-error-1.38/tests/t-strerror.c:40:36: [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). gpg_error_t err = gpg_err_make (atoi (argv[i]), atoi (argv[i + 1])); data/libgpg-error-1.38/tests/t-strerror.c:40:52: [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). gpg_error_t err = gpg_err_make (atoi (argv[i]), atoi (argv[i + 1])); data/libgpg-error-1.38/tests/t-syserror.c:44: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 ("/does-not-exist/110761/nowhere.foo", "r"); data/libgpg-error-1.38/tests/t-syserror.c:48: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). fp = fopen (" no this file does not exists foo 4711", "r"); data/libgpg-error-1.38/doc/yat2m.c:335: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). void *p = malloc (strlen (string)+1); data/libgpg-error-1.38/doc/yat2m.c:392: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). m = xcalloc (1, sizeof *m + strlen (name)); data/libgpg-error-1.38/doc/yat2m.c:415: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). m = xcalloc (1, sizeof *m + strlen (macroname)); data/libgpg-error-1.38/doc/yat2m.c:452: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). m = xcalloc (1, sizeof *m + strlen (nameandvalue)); data/libgpg-error-1.38/doc/yat2m.c:546: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). cond = xcalloc (1, sizeof *cond + strlen (name)); data/libgpg-error-1.38/doc/yat2m.c:652: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). n1 = strlen (lb->line); data/libgpg-error-1.38/doc/yat2m.c:653: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). n = n1 + 1 + strlen (line) + 1; data/libgpg-error-1.38/doc/yat2m.c:655:7: [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 (lb->line+n1, "\n"); data/libgpg-error-1.38/doc/yat2m.c:869:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (m->name) == rlen data/libgpg-error-1.38/doc/yat2m.c:894: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). proc_texi_buffer (fp, m->value, strlen (m->value), data/libgpg-error-1.38/doc/yat2m.c:1030: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). proc_texi_buffer (fp, line, strlen (line), table_level, &eol_action); data/libgpg-error-1.38/doc/yat2m.c:1183: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 n = strlen (line); data/libgpg-error-1.38/doc/yat2m.c:1244: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 (macrovalueused + strlen (line) + 2 >= macrovaluesize) data/libgpg-error-1.38/doc/yat2m.c:1246: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). macrovaluesize += strlen (line) + 256; data/libgpg-error-1.38/doc/yat2m.c:1250: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). macrovalueused += strlen (line); data/libgpg-error-1.38/doc/yat2m.c:1411: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). incname = xmalloc (strlen (opt_include) + 1 data/libgpg-error-1.38/doc/yat2m.c:1412: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). + strlen (p) + 1); data/libgpg-error-1.38/doc/yat2m.c:1414: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 ( incname[strlen (incname)-1] != '/' ) data/libgpg-error-1.38/doc/yat2m.c:1415:21: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (incname, "/"); data/libgpg-error-1.38/src/argparse.c:241: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). count += strlen (s); data/libgpg-error-1.38/src/argparse.c:1252:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*p && p[strlen(p)-1] == '\"' ) data/libgpg-error-1.38/src/argparse.c:1253: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). p[strlen(p)-1] = 0; data/libgpg-error-1.38/src/argparse.c:1465: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). dash = name + strlen (configname); data/libgpg-error-1.38/src/argparse.c:1467: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). endp = dash + strlen (dash) - 1; data/libgpg-error-1.38/src/argparse.c:1877: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). n = strlen (keyword); data/libgpg-error-1.38/src/argparse.c:2260:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen (o->long_opt); data/libgpg-error-1.38/src/argparse.c:2319:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*s && s[strlen(s)] != '\n') data/libgpg-error-1.38/src/argparse.c:2610:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*p && p[strlen(p)] != '\n') data/libgpg-error-1.38/src/argparse.c:2621: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 (*p && p[strlen(p)] != '\n') data/libgpg-error-1.38/src/argparse.c:2808: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). for (p=buf + strlen (buf)-1; p > buf; p--) data/libgpg-error-1.38/src/estream-printf.c:1126: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). n = strlen (numbuf); data/libgpg-error-1.38/src/estream-printf.c:1222:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen (string); data/libgpg-error-1.38/src/estream-printf.c:1570:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (max_pos < 0 || max_pos >= strlen (format)) data/libgpg-error-1.38/src/estream.c:937:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read (file_cookie->fd, buffer, size); data/libgpg-error-1.38/src/estream.c:4239: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). length = strlen (s); data/libgpg-error-1.38/src/estream.c:4250: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). length = strlen (s); data/libgpg-error-1.38/src/estream.c:4505:22: [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 mystrlen(a) wcslen (a) data/libgpg-error-1.38/src/estream.c:4509: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). # define mystrlen(a) strlen (a) data/libgpg-error-1.38/src/estream.c:5115: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). stream->intern->printable_fname = mem_alloc (strlen (fname) + quote + 1); data/libgpg-error-1.38/src/gpg-error.c:119: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). result = malloc (nbytes + strlen (SLDIR) + 1); data/libgpg-error-1.38/src/gpg-error.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). result = malloc (10 + strlen (SLDIR) + 1); data/libgpg-error-1.38/src/gpg-error.c:463:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*line && line[strlen(line)-1] == '\n') data/libgpg-error-1.38/src/gpg-error.c:464: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). line[strlen(line)-1] = 0; data/libgpg-error-1.38/src/gpg-error.c:670: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). n = strlen (source_sym); data/libgpg-error-1.38/src/gpg-error.c:690: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). n = strlen (error_sym); data/libgpg-error-1.38/src/gpgrt-int.h:83: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). + strlen ((ptr)->sun_path)) data/libgpg-error-1.38/src/init.c:345: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 (string); data/libgpg-error-1.38/src/init.c:366: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). needed = strlen (s1); data/libgpg-error-1.38/src/init.c:369: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). needed += strlen (argv[argc]); data/libgpg-error-1.38/src/init.c:488:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*format && format[strlen(format)-1] != '\n') data/libgpg-error-1.38/src/init.c:501: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). trace_missing_lf = (*format && format[strlen(format)-1] != '\n'); data/libgpg-error-1.38/src/init.c:553: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). result = malloc (nbytes + strlen (SLDIR) + 1); data/libgpg-error-1.38/src/init.c:595: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). result = malloc (10 + strlen (SLDIR) + 1); data/libgpg-error-1.38/src/logging.c:263: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). && strlen (name) + 7 < sizeof (srvr_addr_un.sun_path)-1) data/libgpg-error-1.38/src/logging.c:265:19: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (srvr_addr_un.sun_path, data/libgpg-error-1.38/src/logging.c:276:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (name) < sizeof (srvr_addr_un.sun_path)-1) data/libgpg-error-1.38/src/logging.c:278:19: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (srvr_addr_un.sun_path, data/libgpg-error-1.38/src/logging.c:294: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). addrstr = _gpgrt_malloc (strlen (name) + 1); data/libgpg-error-1.38/src/logging.c:525: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). cookie = _gpgrt_malloc (sizeof *cookie + (name? strlen (name):0)); data/libgpg-error-1.38/src/logging.c:629:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (prefix_buffer, text, sizeof (prefix_buffer)-1); data/libgpg-error-1.38/src/logging.c:822: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). length += strlen (prefix_buffer); data/libgpg-error-1.38/src/logging.c:932: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). length += strlen (prefmt); data/libgpg-error-1.38/src/logging.c:948: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). ?strlen (prefix_buffer)+2:0), "", data/libgpg-error-1.38/src/logging.c:954: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). length += strlen (p); data/libgpg-error-1.38/src/logging.c:966: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 (*fmt && fmt[strlen(fmt)-1] != '\n') data/libgpg-error-1.38/src/mkheader.c:73: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 (string) + 1; data/libgpg-error-1.38/src/mkheader.c:149: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). char *buf = xmalloc (strlen (triplet) + 7 + 1); data/libgpg-error-1.38/src/mkheader.c:173: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). *r_os = result + strlen (result); /* Default to the empty string. */ data/libgpg-error-1.38/src/mkheader.c:206: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 n = strlen (line); data/libgpg-error-1.38/src/mkheader.c:366: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). incfname = malloc (strlen (srcdir) + strlen (name) data/libgpg-error-1.38/src/mkheader.c:366: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). incfname = malloc (strlen (srcdir) + strlen (name) data/libgpg-error-1.38/src/mkheader.c:367: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). + (repl?strlen (repl):0) + 1); data/libgpg-error-1.38/src/mkheader.c:378: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). p = incfname + strlen (incfname); data/libgpg-error-1.38/src/mkheader.c:434: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 n = strlen (line); data/libgpg-error-1.38/src/mkheader.c:678: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). srcdir = malloc (strlen (fname) + 2 + 1); data/libgpg-error-1.38/src/mkheader.c:704: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 n = strlen (line); data/libgpg-error-1.38/src/spawn-w32.c:210: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). n += strlen (s) + 1 + 2; /* (1 space, 2 quoting */ data/libgpg-error-1.38/src/spawn-w32.c:216:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n += strlen (s) + 1 + 2; /* (1 space, 2 quoting */ data/libgpg-error-1.38/src/strerror.c:72: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). size_t errstr_len = strlen (errstr) + 1; data/libgpg-error-1.38/src/strerror.c:82: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). if (strlen (buf) + 1 >= buflen) data/libgpg-error-1.38/src/strerror.c:128: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). size_t errstr_len = strlen (errstr) + 1; data/libgpg-error-1.38/src/strerror.c:170: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). errstr_len = strlen (errstr) + 1; data/libgpg-error-1.38/src/stringutils.c:52: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). n = strlen (first_part) + 1; data/libgpg-error-1.38/src/stringutils.c:56:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n += strlen (argv[argc]) + 1; data/libgpg-error-1.38/src/stringutils.c:77: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). n += strlen (home); data/libgpg-error-1.38/src/stringutils.c:91: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). skip = 1 + strlen (user); data/libgpg-error-1.38/src/stringutils.c:96: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). n += strlen (home); data/libgpg-error-1.38/src/stringutils.c:150: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). n = strlen (home) + 1 + strlen (name) + 1; data/libgpg-error-1.38/src/stringutils.c:150: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). n = strlen (home) + 1 + strlen (name) + 1; data/libgpg-error-1.38/src/stringutils.c:178: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). n = strlen (name); data/libgpg-error-1.38/src/sysutils.c:331:7: [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 (buffer, "/"); /* Always "/". */ data/libgpg-error-1.38/src/w32-gettext.c:1492: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). catval = jnlib_malloc (strlen (catval_full) + 1); data/libgpg-error-1.38/src/w32-gettext.c:1507: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). int len = (strlen (dirname) + 1 + strlen (catval) + 13 data/libgpg-error-1.38/src/w32-gettext.c:1507:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = (strlen (dirname) + 1 + strlen (catval) + 13 data/libgpg-error-1.38/src/w32-gettext.c:1508: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). + strlen (domainname) + 3 + 1); data/libgpg-error-1.38/src/w32-gettext.c:1520: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). p += strlen (dirname); data/libgpg-error-1.38/src/w32-gettext.c:1523: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). p += strlen (catval); data/libgpg-error-1.38/src/w32-gettext.c:1527: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). p += strlen (domainname); data/libgpg-error-1.38/src/w32-gettext.c:1539: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). item = jnlib_calloc (1, sizeof *dl + strlen (domainname)); data/libgpg-error-1.38/src/w32-gettext.c:1546: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). item->dname = jnlib_malloc (strlen (dirname) +1); data/libgpg-error-1.38/src/w32-gettext.c:1765: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). filename = jnlib_malloc (strlen (dl->fname) + 1); data/libgpg-error-1.38/src/w32-gettext.c:1810: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). uint32_t len = strlen (msgid); data/libgpg-error-1.38/src/w32-gettext.c:1875: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). string = malloc (strlen (domainname) + 1); data/libgpg-error-1.38/src/w32-gettext.c:1952:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (override_locale.name, name, sizeof (override_locale.name) - 1); data/libgpg-error-1.38/src/w32-iconv.c:852: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). name = xstrndup(_name, strlen(_name)); data/libgpg-error-1.38/src/w32-iconv.c:1043: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(token); data/libgpg-error-1.38/src/w32-iconv.c:1044: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). const char *p = str + strlen(str); data/libgpg-error-1.38/src/w32-reg.c:135: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). result = xtrymalloc (strlen (tmp)+1); data/libgpg-error-1.38/tests/t-b64.c:108: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). err = gpgrt_b64enc_write (state, string, strlen (string)); data/libgpg-error-1.38/tests/t-b64.c:150: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/libgpg-error-1.38/tests/t-b64.c:151: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). buffer = malloc (strlen (string) + 1); data/libgpg-error-1.38/tests/t-b64.c:186: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 (expected) || strncmp (buffer, expected, len)) data/libgpg-error-1.38/tests/t-b64.c:192: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). strlen (expected)); data/libgpg-error-1.38/tests/t-common.h:82:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*format && format[strlen(format)-1] != '\n') data/libgpg-error-1.38/tests/t-common.h:106:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*format && format[strlen(format)-1] != '\n') data/libgpg-error-1.38/tests/t-common.h:130:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*format && format[strlen(format)-1] != '\n') data/libgpg-error-1.38/tests/t-logging.c:86: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 (buffer) != buflen) data/libgpg-error-1.38/tests/t-logging.c:170:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp (logbuf, testbuf, strlen (testbuf)) data/libgpg-error-1.38/tests/t-logging.c:171: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). || strcmp (logbuf+strlen (testbuf), "first log\n")) data/libgpg-error-1.38/tests/t-logging.c:177:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp (logbuf, testbuf, strlen (testbuf)) data/libgpg-error-1.38/tests/t-logging.c:178: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). || strcmp (logbuf+strlen (testbuf), ("This is log line 1\n" data/libgpg-error-1.38/tests/t-printf.c:76: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 (buffer) != buflen) data/libgpg-error-1.38/tests/t-printf.c:397:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf ("rc=%d, strlen(buffer)=%d\n", rc, (int)strlen (buffer)); data/libgpg-error-1.38/tests/t-printf.c:400:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf ("rc=%d, strlen(buffer)=%d\n", rc, (int)strlen (buffer)); data/libgpg-error-1.38/tests/t-printf.c:403:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf ("rc=%d, strlen(buffer)=%d\n", rc, (int)strlen (buffer)); data/libgpg-error-1.38/tests/t-printf.c:406:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf ("rc=%d, strlen(buffer)=%d\n", rc, (int)strlen (buffer)); data/libgpg-error-1.38/tests/t-printf.c:412: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). blen = strlen (buffer); data/libgpg-error-1.38/tests/t-printf.c:415: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). blen2 = strlen (buffer); data/libgpg-error-1.38/tests/t-stringutils.c:108: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 homelen = home? strlen (home):0; data/libgpg-error-1.38/tests/t-stringutils.c:172: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). if (strlen (out) < homelen + 7) data/libgpg-error-1.38/tests/t-stringutils.c:191: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). if (strlen (out) < homelen + 3) data/libgpg-error-1.38/tests/t-stringutils.c:212: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 cwdlen = strlen (cwd); data/libgpg-error-1.38/tests/t-stringutils.c:217:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen (out) < cwdlen + 7) data/libgpg-error-1.38/tests/t-stringutils.c:228:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen (out) < cwdlen + 5) data/libgpg-error-1.38/tests/t-stringutils.c:239:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen (out) < cwdlen) ANALYSIS SUMMARY: Hits = 411 Lines analyzed = 33105 in approximately 1.12 seconds (29548 lines/second) Physical Source Lines of Code (SLOC) = 25061 Hits@level = [0] 91 [1] 135 [2] 177 [3] 36 [4] 63 [5] 0 Hits@level+ = [0+] 502 [1+] 411 [2+] 276 [3+] 99 [4+] 63 [5+] 0 Hits/KSLOC@level+ = [0+] 20.0311 [1+] 16.4 [2+] 11.0131 [3+] 3.95036 [4+] 2.51387 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.