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/libassuan-2.5.3/tests/pipeconnect.c Examining data/libassuan-2.5.3/tests/ce-server.c Examining data/libassuan-2.5.3/tests/common.h Examining data/libassuan-2.5.3/tests/ce-createpipe.c Examining data/libassuan-2.5.3/tests/fdpassing.c Examining data/libassuan-2.5.3/tests/socks5.c Examining data/libassuan-2.5.3/tests/version.c Examining data/libassuan-2.5.3/src/w32-types.inc.h Examining data/libassuan-2.5.3/src/posix-fd-t.inc.h Examining data/libassuan-2.5.3/src/context.c Examining data/libassuan-2.5.3/src/w32-includes.inc.h Examining data/libassuan-2.5.3/src/assuan-buffer.c Examining data/libassuan-2.5.3/src/assuan-io.c Examining data/libassuan-2.5.3/src/posix-types.inc.h Examining data/libassuan-2.5.3/src/isascii.c Examining data/libassuan-2.5.3/src/funopen.c Examining data/libassuan-2.5.3/src/debug.h Examining data/libassuan-2.5.3/src/setenv.c Examining data/libassuan-2.5.3/src/assuan-handler.c Examining data/libassuan-2.5.3/src/posix-sock-nonce.inc.h Examining data/libassuan-2.5.3/src/memrchr.c Examining data/libassuan-2.5.3/src/assuan-inquire.c Examining data/libassuan-2.5.3/src/debug.c Examining data/libassuan-2.5.3/src/client.c Examining data/libassuan-2.5.3/src/system-w32.c Examining data/libassuan-2.5.3/src/server.c Examining data/libassuan-2.5.3/src/assuan-error.c Examining data/libassuan-2.5.3/src/assuan.c Examining data/libassuan-2.5.3/src/assuan-logging.c Examining data/libassuan-2.5.3/src/gpgcedev.c Examining data/libassuan-2.5.3/src/putc_unlocked.c Examining data/libassuan-2.5.3/src/posix-includes.inc.h Examining data/libassuan-2.5.3/src/system.c Examining data/libassuan-2.5.3/src/w32-fd-t.inc.h Examining data/libassuan-2.5.3/src/stpcpy.c Examining data/libassuan-2.5.3/src/gpgcemgr.c Examining data/libassuan-2.5.3/src/assuan-pipe-server.c Examining data/libassuan-2.5.3/src/assuan-pipe-connect.c Examining data/libassuan-2.5.3/src/w32ce-add.h Examining data/libassuan-2.5.3/src/posix-sys-pth-impl.h Examining data/libassuan-2.5.3/src/w32-sys-pth-impl.h Examining data/libassuan-2.5.3/src/system-posix.c Examining data/libassuan-2.5.3/src/mkheader.c Examining data/libassuan-2.5.3/src/conversion.c Examining data/libassuan-2.5.3/src/w32-sock-nonce.inc.h Examining data/libassuan-2.5.3/src/assuan-socket-connect.c Examining data/libassuan-2.5.3/src/assuan-defs.h Examining data/libassuan-2.5.3/src/system-w32ce.c Examining data/libassuan-2.5.3/src/sysutils.c Examining data/libassuan-2.5.3/src/w32ce-fd-t.inc.h Examining data/libassuan-2.5.3/src/assuan-uds.c Examining data/libassuan-2.5.3/src/assuan-socket.c Examining data/libassuan-2.5.3/src/assuan-socket-server.c Examining data/libassuan-2.5.3/src/assuan-listen.c Examining data/libassuan-2.5.3/debian/tests/simple-build.c FINAL RESULTS: data/libassuan-2.5.3/src/assuan-defs.h:106:30: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. struct assuan_system_hooks system; data/libassuan-2.5.3/src/assuan-handler.c:1019: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 (buf+3, line); data/libassuan-2.5.3/src/assuan-handler.c:1046:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (buffer, keyword); data/libassuan-2.5.3/src/assuan-handler.c:1050: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 (buffer, text); data/libassuan-2.5.3/src/assuan-handler.c:1057:7: [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 (helpbuf, keyword); data/libassuan-2.5.3/src/assuan-handler.c:1061: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 (helpbuf, text); data/libassuan-2.5.3/src/assuan-inquire.c:177: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 (stpcpy (cmdbuf, "INQUIRE "), keyword); data/libassuan-2.5.3/src/assuan-inquire.c:398: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 (stpcpy (cmdbuf, "INQUIRE "), keyword); data/libassuan-2.5.3/src/assuan-listen.c:51:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (buf, line); data/libassuan-2.5.3/src/assuan-listen.c:55: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 (buf+3, line); data/libassuan-2.5.3/src/assuan-socket-connect.c:259: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 (addrstr, name+1); data/libassuan-2.5.3/src/assuan-socket-connect.c:284: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 (addrstr, name); data/libassuan-2.5.3/src/assuan-socket.c:1535:43: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _assuan_system_hooks_copy (&sock_ctx->system, system_hooks); data/libassuan-2.5.3/src/context.c:167:36: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _assuan_system_hooks_copy (&ctx->system, system_hooks); data/libassuan-2.5.3/src/gpgcedev.c:206:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (fp, fmt, arg_ptr); data/libassuan-2.5.3/src/gpgcemgr.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": error creating registry key 1: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:108:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": registry key 1 created\n"); data/libassuan-2.5.3/src/gpgcemgr.c:113: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 creating registry key 2: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:127:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": registry key 2 created\n"); data/libassuan-2.5.3/src/gpgcemgr.c:147:9: [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": device not found\n"); data/libassuan-2.5.3/src/gpgcemgr.c:150:11: [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": FindFirstDevice failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:157: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": ActivateDevice handle is %p\n", dinfo.hDevice); data/libassuan-2.5.3/src/gpgcemgr.c:162:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": DeactivateDevice failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:167:13: [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": DeactivateDevice succeeded\n"); data/libassuan-2.5.3/src/gpgcemgr.c:186: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 creating debug registry key: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:207: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 creating debug registry key: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:248: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 loading sensor DLL: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.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 loading function from sensor DLL: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:285: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 opening gravity sensor: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:311:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": reading sensor data failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:333: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": can't open `GPD1': rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:337:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": GPS device successfully opened\n"); data/libassuan-2.5.3/src/gpgcemgr.c:343:11: [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 reading `GPD1': rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:368: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": GPSOpenDevice failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:372:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": GPS device successfully opened\n"); data/libassuan-2.5.3/src/gpgcemgr.c:376: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": GPSGetPosition failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:399: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 creating registry key: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:406:9: [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 deleting registry value: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:413:9: [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 setting registry value: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:422:13: [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": registry value not set\n"); data/libassuan-2.5.3/src/gpgcemgr.c:424:13: [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 reading registry value: rc=%d\n", rc); data/libassuan-2.5.3/src/gpgcemgr.c:430:13: [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": malloc failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:435:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": error reading registry value (2): " data/libassuan-2.5.3/src/gpgcemgr.c:451:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": registry value is not a string\n"); data/libassuan-2.5.3/src/gpgcemgr.c:484:11: [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": ActivateDevice 1 failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:490:11: [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": ActivateDevice 2 failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:496:11: [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": devices activated\n"); data/libassuan-2.5.3/src/gpgcemgr.c:502:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": opening `GPG1:' failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:508:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": device `GPG1:' seems to work\n"); data/libassuan-2.5.3/src/gpgcemgr.c:517:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": opening `GPG2:' failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:523:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": device `GPG2:' seems to work\n"); data/libassuan-2.5.3/src/gpgcemgr.c:542:11: [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": opening `GPG2:' failed: rc=%d\n", data/libassuan-2.5.3/src/gpgcemgr.c:558:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, PGM": writing `GPG2:' failed: rc=%d\n", data/libassuan-2.5.3/src/mkheader.c:45: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 (incfname, srcdir); data/libassuan-2.5.3/src/mkheader.c:46:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (incfname, name); data/libassuan-2.5.3/src/mkheader.c:190: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/libassuan-2.5.3/src/mkheader.c:263: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 stdout: %s\n", strerror (errno)); data/libassuan-2.5.3/src/system-posix.c:373:7: [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 (name, (char *const *) argv); data/libassuan-2.5.3/src/system.c:144:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. (ctx->system.usleep) (ctx, usec); data/libassuan-2.5.3/src/system.c:158:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. err = (ctx->system.pipe) (ctx, fd, inherit_idx); data/libassuan-2.5.3/src/system.c:175:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (ctx->system.close) (ctx, fd); data/libassuan-2.5.3/src/system.c:190:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (ctx->system.close) (ctx, fd); data/libassuan-2.5.3/src/system.c:203:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.read) (ctx, fd, buffer, size); data/libassuan-2.5.3/src/system.c:206:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (ctx->system.read) (ctx, fd, buffer, size); data/libassuan-2.5.3/src/system.c:220:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.write) (ctx, fd, buffer, size); data/libassuan-2.5.3/src/system.c:223:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (ctx->system.write) (ctx, fd, buffer, size); data/libassuan-2.5.3/src/system.c:237:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.recvmsg) (ctx, fd, msg, flags); data/libassuan-2.5.3/src/system.c:258:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (ctx->system.recvmsg) (ctx, fd, msg, flags); data/libassuan-2.5.3/src/system.c:289:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.sendmsg) (ctx, fd, msg, flags); data/libassuan-2.5.3/src/system.c:292:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (ctx->system.sendmsg) (ctx, fd, msg, flags); data/libassuan-2.5.3/src/system.c:337:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.spawn) (ctx, r_pid, name, argv, fd_in, fd_out, data/libassuan-2.5.3/src/system.c:365:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.waitpid) (ctx, pid, action, status, options); data/libassuan-2.5.3/src/system.c:368:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (ctx->system.waitpid) (ctx, pid, action, status, options); data/libassuan-2.5.3/src/system.c:383:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.socketpair) (ctx, namespace, style, protocol, filedes); data/libassuan-2.5.3/src/system.c:400:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.socket) (ctx, namespace, style, protocol); data/libassuan-2.5.3/src/system.c:412:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res = (ctx->system.connect) (ctx, sock, addr, length); data/libassuan-2.5.3/tests/common.h:100: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/libassuan-2.5.3/tests/common.h:140: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/libassuan-2.5.3/tests/common.h:155: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/libassuan-2.5.3/tests/common.h:171: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/libassuan-2.5.3/tests/common.h:206: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 (result, srcdir); data/libassuan-2.5.3/tests/common.h:208:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (result, fname); data/libassuan-2.5.3/src/assuan-defs.h:377:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #define getenv(a) _assuan_getenv ((a)) data/libassuan-2.5.3/src/assuan-logging.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. full_logging = !!getenv ("ASSUAN_FULL_LOGGING"); data/libassuan-2.5.3/src/assuan-logging.c:66: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. flagstr = getenv ("ASSUAN_DEBUG"); data/libassuan-2.5.3/src/assuan-pipe-server.c:88:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. s = getenv ("_assuan_connection_fd"); data/libassuan-2.5.3/src/assuan-pipe-server.c:121:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. s = getenv ("_assuan_pipe_connect_pid"); data/libassuan-2.5.3/src/assuan-socket.c:152:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&cygwin_fdtable_cs); data/libassuan-2.5.3/src/assuan-socket.c:175:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&cygwin_fdtable_cs); data/libassuan-2.5.3/src/assuan-socket.c:204:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&cygwin_fdtable_cs); data/libassuan-2.5.3/src/assuan-socket.c:494:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (*p && (s = getenv (p))) data/libassuan-2.5.3/src/assuan-socket.c:1429:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&cygwin_fdtable_cs); data/libassuan-2.5.3/src/gpgcedev.c:250:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:365:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&logcontrol.lock); data/libassuan-2.5.3/src/gpgcedev.c:570:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&opnctx_table_cs); data/libassuan-2.5.3/src/gpgcedev.c:608:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:654:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&logcontrol.lock); data/libassuan-2.5.3/src/gpgcedev.c:747:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&logcontrol.lock); data/libassuan-2.5.3/src/gpgcedev.c:788:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&opnctx_table_cs); data/libassuan-2.5.3/src/gpgcedev.c:806:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&logcontrol.lock); data/libassuan-2.5.3/src/gpgcedev.c:826:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&opnctx_table_cs); data/libassuan-2.5.3/src/gpgcedev.c:837:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:862:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&logcontrol.lock); data/libassuan-2.5.3/src/gpgcedev.c:939:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1055:11: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1223:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1264:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&ctx->pipeimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1290:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1316:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1341:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&opnctx_table_cs); data/libassuan-2.5.3/src/gpgcedev.c:1353:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1431:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&pimpl->critsect); data/libassuan-2.5.3/src/gpgcedev.c:1478:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&opnctx_table_cs); data/libassuan-2.5.3/src/gpgcedev.c:1621:7: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&opnctx_table_cs); data/libassuan-2.5.3/src/gpgcedev.c:1622:7: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&logcontrol.lock); data/libassuan-2.5.3/src/gpgcemgr.c:245:12: [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. dll_hd = LoadLibrary (L"HTCSensorSDK.dll"); data/libassuan-2.5.3/tests/common.h:31:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #define getenv(a) (NULL) data/libassuan-2.5.3/tests/common.h:38:28: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define _log_enter() do { EnterCriticalSection (&_log_critsect); } while (0) data/libassuan-2.5.3/tests/common.h:109:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&_log_critsect); data/libassuan-2.5.3/tests/common.h:202:29: [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 (!srcdir && !(srcdir = getenv ("srcdir"))) data/libassuan-2.5.3/src/assuan-buffer.c:131: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 (line, ctx->inbound.attic.line, atticlen); data/libassuan-2.5.3/src/assuan-buffer.c:156:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/libassuan-2.5.3/src/assuan-buffer.c:166: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 (ctx->inbound.attic.line, line, atticlen + nread); data/libassuan-2.5.3/src/assuan-buffer.c:198: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 (ctx->inbound.attic.line, endp + 1, len); data/libassuan-2.5.3/src/assuan-buffer.c:384:15: [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 (line, "%%%02X", *(unsigned char*)buffer); data/libassuan-2.5.3/src/assuan-defs.h:78: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 w32_strerror[256]; data/libassuan-2.5.3/src/assuan-defs.h:156:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[LINELENGTH]; data/libassuan-2.5.3/src/assuan-defs.h:161:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[LINELENGTH]; data/libassuan-2.5.3/src/assuan-defs.h:171:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[LINELENGTH]; data/libassuan-2.5.3/src/assuan-handler.c:195: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[ASSUAN_LINELENGTH]; data/libassuan-2.5.3/src/assuan-handler.c:726:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errline[300]; data/libassuan-2.5.3/src/assuan-handler.c:728:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ebuf[50]; data/libassuan-2.5.3/src/assuan-handler.c:1018: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 (buf, "OK "); data/libassuan-2.5.3/src/assuan-handler.c:1032: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[256]; data/libassuan-2.5.3/src/assuan-handler.c:1045: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 (buffer, "S "); data/libassuan-2.5.3/src/assuan-handler.c:1056: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 (helpbuf, "S "); data/libassuan-2.5.3/src/assuan-inquire.c:97: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 (mb->buf + mb->len, buf, len); data/libassuan-2.5.3/src/assuan-inquire.c:151: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[LINELENGTH-10]; /* (10 = strlen ("INQUIRE ")+CR,LF) */ data/libassuan-2.5.3/src/assuan-inquire.c:232:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 tmp[1]; data/libassuan-2.5.3/src/assuan-inquire.c:326:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char tmp[1]; data/libassuan-2.5.3/src/assuan-inquire.c:384: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[LINELENGTH-10]; /* (10 = strlen ("INQUIRE ")+CR,LF) */ data/libassuan-2.5.3/src/assuan-listen.c:54: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 (buf, "OK "); data/libassuan-2.5.3/src/assuan-listen.c:123: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 tmpbuf[50]; data/libassuan-2.5.3/src/assuan-logging.c:46: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/libassuan-2.5.3/src/assuan-logging.c:68: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). log_cats = atoi (flagstr); data/libassuan-2.5.3/src/assuan-logging.c:285:15: [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 (hp, " ]\n"); data/libassuan-2.5.3/src/assuan-pipe-connect.c:136: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 mypidstr[50]; data/libassuan-2.5.3/src/assuan-pipe-connect.c:142:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (mypidstr, "%lu", (unsigned long) atp->parent_pid); data/libassuan-2.5.3/src/assuan-pipe-connect.c:252:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mypidstr[50]; data/libassuan-2.5.3/src/assuan-pipe-connect.c:258:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (mypidstr, "%lu", (unsigned long) atp->parent_pid); data/libassuan-2.5.3/src/assuan-pipe-connect.c:263:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (mypidstr, "%d", atp->peer_fd); data/libassuan-2.5.3/src/assuan-pipe-connect.c:283: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 mypidstr[50]; data/libassuan-2.5.3/src/assuan-pipe-connect.c:306:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (mypidstr, "%lu", (unsigned long)getpid ()); data/libassuan-2.5.3/src/assuan-pipe-connect.c:316: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 (&child_fds[1], fd_child_list, (child_fds_cnt + 1) * sizeof (int)); data/libassuan-2.5.3/src/assuan-pipe-server.c:56:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ( fstat (atoi (s), &buf ) ) data/libassuan-2.5.3/src/assuan-pipe-server.c:94:14: [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). infd = atoi (s); data/libassuan-2.5.3/src/assuan-pipe-server.c:95:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). outfd = atoi (s); data/libassuan-2.5.3/src/assuan-socket.c:229:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); data/libassuan-2.5.3/src/assuan-socket.c:243:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); data/libassuan-2.5.3/src/assuan-socket.c:349: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[50], *p; data/libassuan-2.5.3/src/assuan-socket.c:354: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, "rb"); data/libassuan-2.5.3/src/assuan-socket.c:387: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 (nonce, narr, 16); data/libassuan-2.5.3/src/assuan-socket.c:393:14: [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). aval = atoi (buffer); data/libassuan-2.5.3/src/assuan-socket.c:408: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 (nonce, p, 16); data/libassuan-2.5.3/src/assuan-socket.c:440: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[512], *name; data/libassuan-2.5.3/src/assuan-socket.c:448: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, "rb"); data/libassuan-2.5.3/src/assuan-socket.c:713: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[22+512]; /* The extra 512 gives enough space data/libassuan-2.5.3/src/assuan-socket.c:833: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+buflen, credentials, ulen); data/libassuan-2.5.3/src/assuan-socket.c:836: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+buflen, password, plen); data/libassuan-2.5.3/src/assuan-socket.c:875: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+buflen, hostname, hostnamelen); data/libassuan-2.5.3/src/assuan-socket.c:883: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+ 4, &addru.addr_in6->sin6_addr.s6_addr, 16); /* DST.ADDR */ data/libassuan-2.5.3/src/assuan-socket.c:884: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+20, &addru.addr_in6->sin6_port, 2); /* DST.PORT */ data/libassuan-2.5.3/src/assuan-socket.c:890: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+4, &addru.addr_in->sin_addr.s_addr, 4); /* DST.ADDR */ data/libassuan-2.5.3/src/assuan-socket.c:891: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+8, &addru.addr_in->sin_port, 2); /* DST.PORT */ data/libassuan-2.5.3/src/assuan-socket.c:1007:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nonce[16]; data/libassuan-2.5.3/src/assuan-socket.c:1032:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[16]; data/libassuan-2.5.3/src/assuan-socket.c:1041: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, &n, 4); data/libassuan-2.5.3/src/assuan-socket.c:1178:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[16]; data/libassuan-2.5.3/src/assuan-socket.c:1181:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpbuf[50+16]; data/libassuan-2.5.3/src/assuan-socket.c:1232: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 (tmpbuf+len, nonce.data,16); data/libassuan-2.5.3/src/assuan-socket.c:1293: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 (unaddr, unaddr_new, sizeof *unaddr); data/libassuan-2.5.3/src/assuan-socket.c:1362: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/libassuan-2.5.3/src/assuan-socket.c:1402: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, &n, 4); data/libassuan-2.5.3/src/assuan-uds.c:95:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char control[CMSG_SPACE(sizeof (int))]; data/libassuan-2.5.3/src/assuan-uds.c:197: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 control[CMSG_SPACE(sizeof (int))]; data/libassuan-2.5.3/src/assuan-uds.c:201: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[80]; data/libassuan-2.5.3/src/assuan-uds.c:226: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 (CMSG_DATA (cmptr), &fd, sizeof (fd)); data/libassuan-2.5.3/src/assuan.c:139: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 (ctx, &wctx, sizeof (*ctx)); data/libassuan-2.5.3/src/client.c:270:10: [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). rc = atoi (line); data/libassuan-2.5.3/src/debug.c:161:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[51]; data/libassuan-2.5.3/src/gpgcedev.c:202: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 (DBGFILENAME, "a+"); data/libassuan-2.5.3/src/gpgcedev.c:375:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/libassuan-2.5.3/src/gpgcedev.c:421: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 (newtbl, opnctx_table, opnctx_table_size * sizeof (*newtbl)); data/libassuan-2.5.3/src/gpgcedev.c:490: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 (newtbl, monitor_table, monitor_table_size * sizeof (*newtbl)); data/libassuan-2.5.3/src/gpgcedev.c:648: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[25]; data/libassuan-2.5.3/src/gpgcedev.c:1511: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 (outbuf, &opnctx->rvid, sizeof (LONG)); data/libassuan-2.5.3/src/gpgcedev.c:1527: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 (&rvid, inbuf, sizeof (LONG)); data/libassuan-2.5.3/src/gpgcedev.c:1558: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 (&rvid, inbuf, sizeof (DWORD)); data/libassuan-2.5.3/src/gpgcedev.c:1559: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 (&pid, ((char *) inbuf) + sizeof (DWORD), sizeof (DWORD)); data/libassuan-2.5.3/src/gpgcemgr.c:67:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); data/libassuan-2.5.3/src/gpgcemgr.c:77:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); data/libassuan-2.5.3/src/gpgcemgr.c:325: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[1000]; data/libassuan-2.5.3/src/mkheader.c: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 line[LINESIZE]; data/libassuan-2.5.3/src/mkheader.c:48: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/libassuan-2.5.3/src/mkheader.c:163: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/libassuan-2.5.3/src/mkheader.c:195: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/libassuan-2.5.3/src/mkheader.c:197: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/libassuan-2.5.3/src/setenv.c:167:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_value[namelen + 1 + vallen]; data/libassuan-2.5.3/src/setenv.c:175: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 (new_value, name, namelen); data/libassuan-2.5.3/src/setenv.c:177: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 (&new_value[namelen + 1], value, vallen); data/libassuan-2.5.3/src/setenv.c:193:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_environ[size], new_value, namelen + 1 + vallen); data/libassuan-2.5.3/src/setenv.c:195:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_environ[size], name, namelen); data/libassuan-2.5.3/src/setenv.c:197:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&new_environ[size][namelen + 1], value, vallen); data/libassuan-2.5.3/src/setenv.c:207:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ((char *) new_environ, (char *) __environ, data/libassuan-2.5.3/src/setenv.c:225:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_value[namelen + 1 + vallen]; data/libassuan-2.5.3/src/setenv.c:233: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 (new_value, name, namelen); data/libassuan-2.5.3/src/setenv.c:235: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 (&new_value[namelen + 1], value, vallen); data/libassuan-2.5.3/src/setenv.c:250:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (np, new_value, namelen + 1 + vallen); data/libassuan-2.5.3/src/setenv.c:252:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (np, name, namelen); data/libassuan-2.5.3/src/setenv.c:254:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&np[namelen + 1], value, vallen); data/libassuan-2.5.3/src/system-posix.c:212: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/libassuan-2.5.3/src/system-posix.c:287:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[512]; data/libassuan-2.5.3/src/system-posix.c:294:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fdnul = open ("/dev/null", O_WRONLY); data/libassuan-2.5.3/src/system-w32ce.c:58:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); data/libassuan-2.5.3/src/system-w32ce.c:75:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); data/libassuan-2.5.3/src/system-w32ce.c:467: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 fdbuf[3*30]; data/libassuan-2.5.3/src/system-w32ce.c:484:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (p, "-&S2=null "); data/libassuan-2.5.3/src/system.c:108:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dst, &_assuan_system_hooks, sizeof (*dst)); data/libassuan-2.5.3/src/w32-sock-nonce.inc.h:32: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 nonce[16]; data/libassuan-2.5.3/src/w32-sock-nonce.inc.h:49: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 sun_path[108-2-4]; data/libassuan-2.5.3/tests/ce-createpipe.c:43: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/libassuan-2.5.3/tests/ce-createpipe.c:69: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/libassuan-2.5.3/tests/ce-server.c:304:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, length, NULL, 0); data/libassuan-2.5.3/tests/ce-server.c:312:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). n = MultiByteToWideChar (CP_UTF8, 0, string, length, result, n); data/libassuan-2.5.3/tests/ce-server.c:354:7: [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 buf[MAX_PATH+1]; data/libassuan-2.5.3/tests/ce-server.c:474:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/libassuan-2.5.3/tests/ce-server.c:480:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_in = fopen (line, "rb"); data/libassuan-2.5.3/tests/ce-server.c:636: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[500]; data/libassuan-2.5.3/tests/ce-server.c:733:5: [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 oldname[MAX_PATH]; data/libassuan-2.5.3/tests/ce-server.c:932: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 inqline[100]; data/libassuan-2.5.3/tests/ce-server.c:1007: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[35]; data/libassuan-2.5.3/tests/ce-server.c:1108: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[50]; data/libassuan-2.5.3/tests/common.h:242: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/libassuan-2.5.3/tests/fdpassing.c:168: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 (fname, "r"); data/libassuan-2.5.3/tests/fdpassing.c:222: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 *arglist[10]; data/libassuan-2.5.3/tests/pipeconnect.c:199: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 *arglist[5]; data/libassuan-2.5.3/tests/pipeconnect.c:272:45: [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). fd = _assuan_w32ce_finish_pipe (atoi (s+5), s[3] != '0'); data/libassuan-2.5.3/src/assuan-buffer.c:280: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). size_t prefixlen = prefix? strlen (prefix):0; data/libassuan-2.5.3/src/assuan-buffer.c:339:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = str ? (str - line) : strlen (line); data/libassuan-2.5.3/src/assuan-handler.c:118: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). for (p = value + strlen(value) - 1; p > value && spacep (p); p--) data/libassuan-2.5.3/src/assuan-handler.c:207: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 (ctx->cmdtbl[i].name); data/libassuan-2.5.3/src/assuan-handler.c:283:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset (line, ' ', endp? (endp-line):strlen(line)); data/libassuan-2.5.3/src/assuan-handler.c:1015: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). char *buf = _assuan_malloc (ctx, 3 + strlen(line) + 1); data/libassuan-2.5.3/src/assuan-handler.c:1042: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). n = 2 + strlen (keyword) + 1 + strlen (text) + 1; data/libassuan-2.5.3/src/assuan-handler.c:1042: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). n = 2 + strlen (keyword) + 1 + strlen (text) + 1; data/libassuan-2.5.3/src/assuan-handler.c:1049:11: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (buffer, " "); data/libassuan-2.5.3/src/assuan-handler.c:1060:11: [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 (helpbuf, " "); data/libassuan-2.5.3/src/assuan-inquire.c:161: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 (!ctx || !keyword || (10 + strlen (keyword) >= sizeof (cmdbuf))) data/libassuan-2.5.3/src/assuan-inquire.c:386: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 (!ctx || !keyword || (10 + strlen (keyword) >= sizeof (cmdbuf))) data/libassuan-2.5.3/src/assuan-listen.c:47: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). char *buf = _assuan_malloc (ctx, 3 + strlen (line) + 1); data/libassuan-2.5.3/src/assuan-listen.c:113:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rc = _assuan_write_line (ctx, "OK ", p, strlen (p)); data/libassuan-2.5.3/src/assuan-logging.c:108: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/libassuan-2.5.3/src/assuan-logging.c:152:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (msg && *msg && msg[strlen (msg) - 1] == '\n') data/libassuan-2.5.3/src/assuan-logging.c:263: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). hp += strlen (hp); data/libassuan-2.5.3/src/assuan-logging.c:283: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). hp += strlen (hp); data/libassuan-2.5.3/src/assuan-socket-connect.c:68: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). + strlen ((ptr)->sun_path)) data/libassuan-2.5.3/src/assuan-socket-connect.c:253: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). addrstr = _assuan_malloc (ctx, strlen (name) + 1); data/libassuan-2.5.3/src/assuan-socket.c:107: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). + strlen ((ptr)->sun_path)) data/libassuan-2.5.3/src/assuan-socket.c:738: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). hostnamelen = hostname? strlen (hostname) : 0; data/libassuan-2.5.3/src/assuan-socket.c:823: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). plen = strlen (password); data/libassuan-2.5.3/src/assuan-socket.c:1226: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). len = strlen (tmpbuf) + 1; data/libassuan-2.5.3/src/assuan-socket.c:1231: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). len = strlen (tmpbuf); data/libassuan-2.5.3/src/assuan-socket.c:1307: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 (fname)+1 >= sizeof unaddr->sun_path) data/libassuan-2.5.3/src/assuan-socket.c:1315:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (unaddr->sun_path, fname, sizeof unaddr->sun_path - 1); data/libassuan-2.5.3/src/assuan-uds.c:217: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). iovec.iov_len = strlen (buffer); data/libassuan-2.5.3/src/conversion.c:61: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). ostr = _assuan_malloc (ctx, 4 * strlen (src) + 1); data/libassuan-2.5.3/src/gpgcedev.c:380:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!WriteFile (logcontrol.filehd, buf, strlen (buf), &nwritten, NULL)) data/libassuan-2.5.3/src/gpgcedev.c:387:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!WriteFile (logcontrol.filehd, buf, strlen (buf), &nwritten, NULL)) data/libassuan-2.5.3/src/gpgcedev.c:623:19: [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). size_t length = wcslen (string); data/libassuan-2.5.3/src/gpgcemgr.c:38:19: [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). size_t length = wcslen (string); data/libassuan-2.5.3/src/gpgcemgr.c:412:42: [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). (void*)tmp, wcslen (tmp)*sizeof(wchar_t)))) data/libassuan-2.5.3/src/gpgcemgr.c:555:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!WriteFile (hd, marktwain, strlen (marktwain), data/libassuan-2.5.3/src/mkheader.c:39: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) + 1); data/libassuan-2.5.3/src/mkheader.c:39: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) + 1); data/libassuan-2.5.3/src/mkheader.c:184: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/libassuan-2.5.3/src/mkheader.c:207: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/libassuan-2.5.3/src/setenv.c:125: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). const size_t namelen = strlen (name); data/libassuan-2.5.3/src/setenv.c:126: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). const size_t vallen = value != NULL ? strlen (value) + 1 : 0; data/libassuan-2.5.3/src/setenv.c:293: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 (name); data/libassuan-2.5.3/src/system-posix.c:112:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read (fd, buffer, size); data/libassuan-2.5.3/src/system-posix.c:381: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). writen (1, errbuf, strlen (errbuf)); data/libassuan-2.5.3/src/system-w32.c:368: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/libassuan-2.5.3/src/system-w32ce.c:308:10: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). chr = getchar(); data/libassuan-2.5.3/src/system-w32ce.c:474: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). p += strlen (p); data/libassuan-2.5.3/src/system-w32ce.c:479: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). p += strlen (p); data/libassuan-2.5.3/src/system-w32ce.c:487: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). p += strlen (p); data/libassuan-2.5.3/src/system-w32ce.c:491: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 (fdbuf); data/libassuan-2.5.3/src/system-w32ce.c:496: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/libassuan-2.5.3/src/system.c:113:26: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. dst->usleep = src->usleep; data/libassuan-2.5.3/src/system.c:116:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dst->read = src->read; data/libassuan-2.5.3/src/system.c:144:16: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. (ctx->system.usleep) (ctx, usec); data/libassuan-2.5.3/src/system.c:203:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = (ctx->system.read) (ctx, fd, buffer, size); data/libassuan-2.5.3/src/system.c:206:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return (ctx->system.read) (ctx, fd, buffer, size); data/libassuan-2.5.3/tests/ce-server.c:155:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read (fd, buffer, size); data/libassuan-2.5.3/tests/ce-server.c:280:19: [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). size_t length = wcslen (string); data/libassuan-2.5.3/tests/ce-server.c:300:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t length = strlen (string); data/libassuan-2.5.3/tests/ce-server.c:450: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). err = assuan_send_data (ctx, line, strlen (line)); data/libassuan-2.5.3/tests/ce-server.c:578: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). err = assuan_send_data (ctx, string, strlen (string)); data/libassuan-2.5.3/tests/ce-server.c:612: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). while (strlen(newdir) > 1 && line[strlen(newdir)-1] == '/') data/libassuan-2.5.3/tests/ce-server.c:612: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). while (strlen(newdir) > 1 && line[strlen(newdir)-1] == '/') data/libassuan-2.5.3/tests/ce-server.c:613: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(newdir)-1] = 0; data/libassuan-2.5.3/tests/ce-server.c:687: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). err = assuan_send_data (ctx, buf, strlen (buf)); data/libassuan-2.5.3/tests/ce-server.c:1113: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). err = assuan_send_data (ctx, s, strlen (s)); data/libassuan-2.5.3/tests/ce-server.c:1118: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 = assuan_send_data (ctx, numbuf, strlen (numbuf)); data/libassuan-2.5.3/tests/ce-server.c:1132: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). err = assuan_send_data (ctx, numbuf, strlen (numbuf)); data/libassuan-2.5.3/tests/common.h:99: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). char *p = xmalloc (strlen (string) + 1); data/libassuan-2.5.3/tests/common.h:205: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). result = xmalloc (strlen (srcdir) + 1 + strlen (fname) + 1); data/libassuan-2.5.3/tests/common.h:205: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). result = xmalloc (strlen (srcdir) + 1 + strlen (fname) + 1); data/libassuan-2.5.3/tests/common.h:207:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (result, "/"); data/libassuan-2.5.3/tests/common.h:249: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/libassuan-2.5.3/tests/common.h:252: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/libassuan-2.5.3/tests/fdpassing.c:63:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c=getc (fp)) != -1) data/libassuan-2.5.3/tests/pipeconnect.c:49: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). assuan_send_data (ctx, line, strlen (line)); data/libassuan-2.5.3/tests/pipeconnect.c:87:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c=getc (fp)) != -1) ANALYSIS SUMMARY: Hits = 324 Lines analyzed = 16508 in approximately 0.43 seconds (38521 lines/second) Physical Source Lines of Code (SLOC) = 12209 Hits@level = [0] 61 [1] 77 [2] 127 [3] 38 [4] 82 [5] 0 Hits@level+ = [0+] 385 [1+] 324 [2+] 247 [3+] 120 [4+] 82 [5+] 0 Hits/KSLOC@level+ = [0+] 31.5341 [1+] 26.5378 [2+] 20.231 [3+] 9.82881 [4+] 6.71636 [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.