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/signing-party-2.11/gpgwrap/src/gpgwrap.c Examining data/signing-party-2.11/gpgwrap/src/version.h Examining data/signing-party-2.11/keyanalyze/keyanalyze.c Examining data/signing-party-2.11/keyanalyze/pgpring/extlib.c Examining data/signing-party-2.11/keyanalyze/pgpring/lib.c Examining data/signing-party-2.11/keyanalyze/pgpring/lib.h Examining data/signing-party-2.11/keyanalyze/pgpring/pgplib.c Examining data/signing-party-2.11/keyanalyze/pgpring/pgplib.h Examining data/signing-party-2.11/keyanalyze/pgpring/pgppacket.c Examining data/signing-party-2.11/keyanalyze/pgpring/pgppacket.h Examining data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c Examining data/signing-party-2.11/keyanalyze/process_keys.c FINAL RESULTS: data/signing-party-2.11/gpgwrap/src/gpgwrap.c:80:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, args); \ data/signing-party-2.11/gpgwrap/src/gpgwrap.c:95:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, args); \ data/signing-party-2.11/gpgwrap/src/gpgwrap.c:136:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, args); \ data/signing-party-2.11/gpgwrap/src/gpgwrap.c:151:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, args); \ data/signing-party-2.11/gpgwrap/src/gpgwrap.c:164:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, args); \ data/signing-party-2.11/gpgwrap/src/gpgwrap.c:173:56: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define do_snprintf(string, max, args...) do_snprintf2(snprintf(string, max, args), max) data/signing-party-2.11/gpgwrap/src/gpgwrap.c:575:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:779:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(VERSION_STRING " | written by Karsten Scheibler\n" data/signing-party-2.11/gpgwrap/src/gpgwrap.c:963:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(VERSION_STRING "\n"); data/signing-party-2.11/keyanalyze/keyanalyze.c:238:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, outdir); data/signing-party-2.11/keyanalyze/keyanalyze.c:244:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf,idchr); data/signing-party-2.11/keyanalyze/keyanalyze.c:262:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, outdir); data/signing-party-2.11/keyanalyze/keyanalyze.c:269:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, outdir); data/signing-party-2.11/keyanalyze/keyanalyze.c:276:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, outdir); data/signing-party-2.11/keyanalyze/keyanalyze.c:283:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, outdir); data/signing-party-2.11/keyanalyze/pgpring/lib.c:46: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, fmt, ap); data/signing-party-2.11/keyanalyze/pgpring/lib.c:267:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (abs_oldpath, oldpath); /* __STRCAT_CHECKED__ */ data/signing-party-2.11/keyanalyze/process_keys.c:202:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (k->id, "%s", strtok (NULL, ":")); data/signing-party-2.11/keyanalyze/process_keys.c:216:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (sig->id, "%s", strtok (NULL, ":")); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:380:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv(environ_name); data/signing-party-2.11/keyanalyze/keyanalyze.c:296:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int option = getopt(argc, argv, "hi:o:1"); data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:87:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt (argc, argv, "eE25sk:S")) != EOF) data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:137:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((env_pgppath = getenv ("PGPPATH"))) data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:139: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. else if ((env_home = getenv ("HOME"))) data/signing-party-2.11/gpgwrap/src/gpgwrap.c:53: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 *files[CMDLINE_MAX_FILES]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:288:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). else fd = open(passphrase_file, O_RDONLY); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:326:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(tty, O_RDWR); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:393:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, env, len); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:486:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[PASSPHRASE_BUFFER_SIZE]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:501:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(passphrase_file, O_RDONLY); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:594:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fd_num[32]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:595:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[EXEC_ARGV_SIZE]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:651:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char shell_cmd[LIST_BUFFER_SIZE]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:652:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char verbose_string[128] = ""; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:685:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(verbose_string, " -v"); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:706:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lbuffer[LIST_BUFFER_SIZE]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:714:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). else fd = open(path, O_RDONLY); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:968: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[PASSPHRASE_BUFFER_SIZE]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:975: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[PASSPHRASE_BUFFER_SIZE]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:976: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 mbuffer[PASSPHRASE_BUFFER_SIZE]; data/signing-party-2.11/keyanalyze/keyanalyze.c:120:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf1[5]; data/signing-party-2.11/keyanalyze/keyanalyze.c:121:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf2[5]; data/signing-party-2.11/keyanalyze/keyanalyze.c:126: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 (buf1,c,4); data/signing-party-2.11/keyanalyze/keyanalyze.c:127: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 (buf2,c+4,4); data/signing-party-2.11/keyanalyze/keyanalyze.c:231:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[255]; data/signing-party-2.11/keyanalyze/keyanalyze.c:232:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char idchr[9]; data/signing-party-2.11/keyanalyze/keyanalyze.c:234:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(idchr,"%08X",id); data/signing-party-2.11/keyanalyze/keyanalyze.c:245:9: [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). return fopen(buf,"w"); data/signing-party-2.11/keyanalyze/keyanalyze.c:252:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[255]; data/signing-party-2.11/keyanalyze/keyanalyze.c:254:9: [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). fpin = fopen(infile, "r"); data/signing-party-2.11/keyanalyze/keyanalyze.c:263:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf,"status.txt"); data/signing-party-2.11/keyanalyze/keyanalyze.c:264:11: [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). fpstat = fopen(buf,"w"); data/signing-party-2.11/keyanalyze/keyanalyze.c:270:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf,"msd.txt"); data/signing-party-2.11/keyanalyze/keyanalyze.c:271:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpmsd = fopen(buf,"w"); data/signing-party-2.11/keyanalyze/keyanalyze.c:277:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf,"othersets.txt"); data/signing-party-2.11/keyanalyze/keyanalyze.c:278:11: [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). fpsets = fopen(buf,"w"); data/signing-party-2.11/keyanalyze/keyanalyze.c:284:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf,"other.txt"); data/signing-party-2.11/keyanalyze/keyanalyze.c:285:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpout = fopen(buf,"w"); data/signing-party-2.11/keyanalyze/keyanalyze.c:312: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(outdir, optarg, outdirlen); data/signing-party-2.11/keyanalyze/keyanalyze.c:342:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[20]; data/signing-party-2.11/keyanalyze/pgpring/lib.c:144:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p, s, l); data/signing-party-2.11/keyanalyze/pgpring/lib.c:178: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[2048]; data/signing-party-2.11/keyanalyze/pgpring/lib.c:182:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen (s, "r+"))) data/signing-party-2.11/keyanalyze/pgpring/lib.c:198: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[2048]; data/signing-party-2.11/keyanalyze/pgpring/lib.c:220: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[LONG_STRING]; data/signing-party-2.11/keyanalyze/pgpring/lib.c:260: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 abs_oldpath[_POSIX_PATH_MAX]; data/signing-party-2.11/keyanalyze/pgpring/lib.c:356:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open (path, flags, 0600)) < 0) data/signing-party-2.11/keyanalyze/pgpring/lib.c:396:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return (fopen (path, mode)); data/signing-party-2.11/keyanalyze/pgpring/lib.c:503:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, beg, len); data/signing-party-2.11/keyanalyze/pgpring/lib.c:519:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p, begin, len); data/signing-party-2.11/keyanalyze/pgpring/pgppacket.c:134:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[4]; data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:84:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pgppath[_POSIX_PATH_MAX]; data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:85: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 kring[_POSIX_PATH_MAX]; data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:171: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 scratch[LONG_STRING]; data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:276: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 digest[SHA1_DIGEST_LENGTH]; data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:277: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 scratch[LONG_STRING]; data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:664: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 (chr, buff + 1, l - 1); data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:733:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((rfp = fopen (ringfile, "r")) == NULL) data/signing-party-2.11/keyanalyze/pgpring/pgppubring.c:757: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 (tmp, buff + 1, l - 1); data/signing-party-2.11/keyanalyze/process_keys.c:25: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 id[IDBUF]; data/signing-party-2.11/keyanalyze/process_keys.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 id[IDBUF]; data/signing-party-2.11/keyanalyze/process_keys.c:173: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 buff[1024]; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:290:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (len = 0; (i = read(fd, buffer, size)) > 0; len += i) data/signing-party-2.11/gpgwrap/src/gpgwrap.c:328:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write(fd, pp, strlen(pp)); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:333:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, buffer, size); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:339: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). write(fd, pp2, strlen(pp2)); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:340:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len2 = read(fd, buffer2, size); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:390:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len2 = strlen(env); data/signing-party-2.11/gpgwrap/src/gpgwrap.c:544: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). size = strlen(environ_name) + (4 * len) + 2; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:684: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(verbose_string) >= sizeof (verbose_string) - 4) break; data/signing-party-2.11/gpgwrap/src/gpgwrap.c:723:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (inuse = 0, free = LIST_BUFFER_SIZE; (nread = read(fd, &lbuffer[inuse], free)) > 0; ) data/signing-party-2.11/gpgwrap/src/gpgwrap.c:730:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (llen != strlen(line) + 1) do_error("line contains \\0 character"); data/signing-party-2.11/keyanalyze/keyanalyze.c:240:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf,idchr,2); data/signing-party-2.11/keyanalyze/keyanalyze.c:242: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(buf,"/"); data/signing-party-2.11/keyanalyze/keyanalyze.c:309:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). outdirlen = strlen(outdir); data/signing-party-2.11/keyanalyze/pgpring/lib.c:142: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). l = strlen (s) + 1; data/signing-party-2.11/keyanalyze/pgpring/lib.c:157: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). safe_realloc ((void **) p, strlen (*p) + 1); data/signing-party-2.11/keyanalyze/pgpring/lib.c:263:3: [1] (buffer) strlen: Does not handle 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 (abs_oldpath) + 1 + strlen (oldpath) + 1 > sizeof abs_oldpath)) data/signing-party-2.11/keyanalyze/pgpring/lib.c:263: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). (strlen (abs_oldpath) + 1 + strlen (oldpath) + 1 > sizeof abs_oldpath)) data/signing-party-2.11/keyanalyze/pgpring/lib.c:266:5: [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 (abs_oldpath, "/"); /* __STRCAT_CHECKED__ */ data/signing-party-2.11/keyanalyze/pgpring/lib.c:472:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); /* This is kind of a hack. We want to know if the data/signing-party-2.11/keyanalyze/pgpring/lib.c:516:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (begin); data/signing-party-2.11/keyanalyze/pgpring/lib.c:586: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). return a ? strlen (a) : 0; data/signing-party-2.11/keyanalyze/pgpring/lib.h:70:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). # define strfcpy(A,B,C) strncpy(A,B,C), *(A+(C)-1)=0 ANALYSIS SUMMARY: Hits = 104 Lines analyzed = 4156 in approximately 0.13 seconds (32695 lines/second) Physical Source Lines of Code (SLOC) = 2900 Hits@level = [0] 77 [1] 22 [2] 58 [3] 5 [4] 19 [5] 0 Hits@level+ = [0+] 181 [1+] 104 [2+] 82 [3+] 24 [4+] 19 [5+] 0 Hits/KSLOC@level+ = [0+] 62.4138 [1+] 35.8621 [2+] 28.2759 [3+] 8.27586 [4+] 6.55172 [5+] 0 Dot directories skipped = 2 (--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.