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/rcs-blame-1.3.1/lib/xstrndup.h Examining data/rcs-blame-1.3.1/lib/stdbool_.h Examining data/rcs-blame-1.3.1/lib/mempcpy.h Examining data/rcs-blame-1.3.1/lib/gettext.h Examining data/rcs-blame-1.3.1/lib/strchrnul.h Examining data/rcs-blame-1.3.1/lib/memcmp.c Examining data/rcs-blame-1.3.1/lib/memcpy.c Examining data/rcs-blame-1.3.1/lib/vsnprintf.c Examining data/rcs-blame-1.3.1/lib/size_max.h Examining data/rcs-blame-1.3.1/lib/strtoul.c Examining data/rcs-blame-1.3.1/lib/argp-fmtstream.c Examining data/rcs-blame-1.3.1/lib/memset.c Examining data/rcs-blame-1.3.1/lib/dirname.h Examining data/rcs-blame-1.3.1/lib/asnprintf.c Examining data/rcs-blame-1.3.1/lib/strncasecmp.c Examining data/rcs-blame-1.3.1/lib/strcasecmp.c Examining data/rcs-blame-1.3.1/lib/time_r.c Examining data/rcs-blame-1.3.1/lib/vsnprintf.h Examining data/rcs-blame-1.3.1/lib/progname.h Examining data/rcs-blame-1.3.1/lib/getopt1.c Examining data/rcs-blame-1.3.1/lib/dirname.c Examining data/rcs-blame-1.3.1/lib/filenamecat.c Examining data/rcs-blame-1.3.1/lib/time_r.h Examining data/rcs-blame-1.3.1/lib/malloc.c Examining data/rcs-blame-1.3.1/lib/xgetcwd.c Examining data/rcs-blame-1.3.1/lib/strnlen1.h Examining data/rcs-blame-1.3.1/lib/strstr.c Examining data/rcs-blame-1.3.1/lib/obstack.h Examining data/rcs-blame-1.3.1/lib/argp-xinl.c Examining data/rcs-blame-1.3.1/lib/progname.c Examining data/rcs-blame-1.3.1/lib/setenv.c Examining data/rcs-blame-1.3.1/lib/xalloc-die.c Examining data/rcs-blame-1.3.1/lib/alloca_.h Examining data/rcs-blame-1.3.1/lib/filenamecat.h Examining data/rcs-blame-1.3.1/lib/basename.c Examining data/rcs-blame-1.3.1/lib/readlink.c Examining data/rcs-blame-1.3.1/lib/lstat.h Examining data/rcs-blame-1.3.1/lib/wcwidth.h Examining data/rcs-blame-1.3.1/lib/printf-parse.h Examining data/rcs-blame-1.3.1/lib/realloc.c Examining data/rcs-blame-1.3.1/lib/strnlen.c Examining data/rcs-blame-1.3.1/lib/stdint_.h Examining data/rcs-blame-1.3.1/lib/exitfail.c Examining data/rcs-blame-1.3.1/lib/strpbrk.h Examining data/rcs-blame-1.3.1/lib/xreadlink.c Examining data/rcs-blame-1.3.1/lib/argp-ba.c Examining data/rcs-blame-1.3.1/lib/minmax.h Examining data/rcs-blame-1.3.1/lib/strtol.c Examining data/rcs-blame-1.3.1/lib/ansi2knr.c Examining data/rcs-blame-1.3.1/lib/argp-eexst.c Examining data/rcs-blame-1.3.1/lib/same-inode.h Examining data/rcs-blame-1.3.1/lib/strndup.c Examining data/rcs-blame-1.3.1/lib/stripslash.c Examining data/rcs-blame-1.3.1/lib/xreadlink.h Examining data/rcs-blame-1.3.1/lib/getcwd.h Examining data/rcs-blame-1.3.1/lib/error.h Examining data/rcs-blame-1.3.1/lib/setenv.h Examining data/rcs-blame-1.3.1/lib/obstack.c Examining data/rcs-blame-1.3.1/lib/pathmax.h Examining data/rcs-blame-1.3.1/lib/getcwd.c Examining data/rcs-blame-1.3.1/lib/lstat.c Examining data/rcs-blame-1.3.1/lib/vasnprintf.h Examining data/rcs-blame-1.3.1/lib/argp-pvh.c Examining data/rcs-blame-1.3.1/lib/exitfail.h Examining data/rcs-blame-1.3.1/lib/strftime.h Examining data/rcs-blame-1.3.1/lib/memmove.c Examining data/rcs-blame-1.3.1/lib/mempcpy.c Examining data/rcs-blame-1.3.1/lib/argp-help.c Examining data/rcs-blame-1.3.1/lib/mktime.c Examining data/rcs-blame-1.3.1/lib/getline.c Examining data/rcs-blame-1.3.1/lib/mbchar.c Examining data/rcs-blame-1.3.1/lib/xstrndup.c Examining data/rcs-blame-1.3.1/lib/strdup.c Examining data/rcs-blame-1.3.1/lib/unlocked-io.h Examining data/rcs-blame-1.3.1/lib/cycle-check.h Examining data/rcs-blame-1.3.1/lib/strndup.h Examining data/rcs-blame-1.3.1/lib/cycle-check.c Examining data/rcs-blame-1.3.1/lib/argp-fs-xinl.c Examining data/rcs-blame-1.3.1/lib/getopt_.h Examining data/rcs-blame-1.3.1/lib/getdelim.h Examining data/rcs-blame-1.3.1/lib/error.c Examining data/rcs-blame-1.3.1/lib/printf-args.c Examining data/rcs-blame-1.3.1/lib/unsetenv.c Examining data/rcs-blame-1.3.1/lib/vasnprintf.c Examining data/rcs-blame-1.3.1/lib/xgetcwd.h Examining data/rcs-blame-1.3.1/lib/xalloc.h Examining data/rcs-blame-1.3.1/lib/mbuiter.h Examining data/rcs-blame-1.3.1/lib/sysexit_.h Examining data/rcs-blame-1.3.1/lib/exit.h Examining data/rcs-blame-1.3.1/lib/getopt.c Examining data/rcs-blame-1.3.1/lib/argp-pv.c Examining data/rcs-blame-1.3.1/lib/canonicalize.h Examining data/rcs-blame-1.3.1/lib/memchr.c Examining data/rcs-blame-1.3.1/lib/argp-pin.c Examining data/rcs-blame-1.3.1/lib/getopt_int.h Examining data/rcs-blame-1.3.1/lib/dev-ino.h Examining data/rcs-blame-1.3.1/lib/strftime.c Examining data/rcs-blame-1.3.1/lib/allocsa.c Examining data/rcs-blame-1.3.1/lib/allocsa.h Examining data/rcs-blame-1.3.1/lib/argp-parse.c Examining data/rcs-blame-1.3.1/lib/printf-args.h Examining data/rcs-blame-1.3.1/lib/strpbrk.c Examining data/rcs-blame-1.3.1/lib/strstr.h Examining data/rcs-blame-1.3.1/lib/strcase.h Examining data/rcs-blame-1.3.1/lib/stat_.h Examining data/rcs-blame-1.3.1/lib/gettimeofday.c Examining data/rcs-blame-1.3.1/lib/strnlen.h Examining data/rcs-blame-1.3.1/lib/printf-parse.c Examining data/rcs-blame-1.3.1/lib/mbchar.h Examining data/rcs-blame-1.3.1/lib/canonicalize.c Examining data/rcs-blame-1.3.1/lib/strnlen1.c Examining data/rcs-blame-1.3.1/lib/xsize.h Examining data/rcs-blame-1.3.1/lib/alloca.c Examining data/rcs-blame-1.3.1/lib/calloc.c Examining data/rcs-blame-1.3.1/lib/free.c Examining data/rcs-blame-1.3.1/lib/strdup.h Examining data/rcs-blame-1.3.1/lib/getline.h Examining data/rcs-blame-1.3.1/lib/strchrnul.c Examining data/rcs-blame-1.3.1/lib/xmalloc.c Examining data/rcs-blame-1.3.1/lib/argp-namefrob.h Examining data/rcs-blame-1.3.1/lib/getdelim.c Examining data/rcs-blame-1.3.1/lib/argp-fmtstream.h Examining data/rcs-blame-1.3.1/lib/argp.h Examining data/rcs-blame-1.3.1/src/parser.c Examining data/rcs-blame-1.3.1/src/data.h Examining data/rcs-blame-1.3.1/src/delta.h Examining data/rcs-blame-1.3.1/src/hash.h Examining data/rcs-blame-1.3.1/src/lines.c Examining data/rcs-blame-1.3.1/src/working.h Examining data/rcs-blame-1.3.1/src/keyword.c Examining data/rcs-blame-1.3.1/src/vector.h Examining data/rcs-blame-1.3.1/src/date.h Examining data/rcs-blame-1.3.1/src/lexer.c Examining data/rcs-blame-1.3.1/src/lines.h Examining data/rcs-blame-1.3.1/src/util.h Examining data/rcs-blame-1.3.1/src/delta.c Examining data/rcs-blame-1.3.1/src/rcs.c Examining data/rcs-blame-1.3.1/src/date.c Examining data/rcs-blame-1.3.1/src/rcs.h Examining data/rcs-blame-1.3.1/src/system.h Examining data/rcs-blame-1.3.1/src/hash.c Examining data/rcs-blame-1.3.1/src/working.c Examining data/rcs-blame-1.3.1/src/util.c Examining data/rcs-blame-1.3.1/src/blame.c Examining data/rcs-blame-1.3.1/src/vector.c Examining data/rcs-blame-1.3.1/src/parser.h Examining data/rcs-blame-1.3.1/src/keyword.h FINAL RESULTS: data/rcs-blame-1.3.1/lib/readlink.c:35:1: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. readlink (const char *path, char *buf, size_t bufsize) data/rcs-blame-1.3.1/lib/xreadlink.c:63:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ssize_t r = readlink (file, buffer, buf_size); data/rcs-blame-1.3.1/lib/ansi2knr.c:270:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, usage); data/rcs-blame-1.3.1/lib/ansi2knr.c:276: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, usage); data/rcs-blame-1.3.1/lib/ansi2knr.c:340:8: [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, more); data/rcs-blame-1.3.1/lib/argp-fmtstream.h:41:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define __printf__ printf data/rcs-blame-1.3.1/lib/argp-fmtstream.h:72:33: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define __argp_fmtstream_printf fprintf data/rcs-blame-1.3.1/lib/argp-fmtstream.h:73:31: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define argp_fmtstream_printf fprintf data/rcs-blame-1.3.1/lib/argp-fmtstream.h:133:34: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((__format__ (printf, 2, 3))); data/rcs-blame-1.3.1/lib/argp-fmtstream.h:136:34: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((__format__ (printf, 2, 3))); data/rcs-blame-1.3.1/lib/argp-help.c:1809:8: [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 (stream, fmt, ap); data/rcs-blame-1.3.1/lib/argp-help.c:1883:5: [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 (stream, fmt, ap); data/rcs-blame-1.3.1/lib/argp-namefrob.h:102:21: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define __vsnprintf vsnprintf data/rcs-blame-1.3.1/lib/argp-parse.c:610:6: [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 (parser->state.err_stream, data/rcs-blame-1.3.1/lib/argp.h:47:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define __printf__ printf data/rcs-blame-1.3.1/lib/error.c:205:5: [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, message, args); data/rcs-blame-1.3.1/lib/error.c:317: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, file_name != NULL ? "%s:%d: " : " ", data/rcs-blame-1.3.1/lib/error.h:31:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define __printf__ printf data/rcs-blame-1.3.1/lib/vasnprintf.c:88:20: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define SNPRINTF swprintf data/rcs-blame-1.3.1/lib/vasnprintf.c:99:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF _snprintf data/rcs-blame-1.3.1/lib/vasnprintf.c:102:20: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF snprintf data/rcs-blame-1.3.1/lib/vasnprintf.c:620:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, arg); \ data/rcs-blame-1.3.1/lib/vasnprintf.c:623:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], arg); \ data/rcs-blame-1.3.1/lib/vasnprintf.c:626:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ data/rcs-blame-1.3.1/lib/vasnprintf.h:36:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define __printf__ printf data/rcs-blame-1.3.1/lib/vsnprintf.c:46:1: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf (char *str, size_t size, const char *format, va_list args) data/rcs-blame-1.3.1/lib/vsnprintf.h:28:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int vsnprintf (char *str, size_t size, const char *format, va_list args); data/rcs-blame-1.3.1/src/keyword.c:74: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(output, s); data/rcs-blame-1.3.1/src/keyword.c:151: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(output, s); data/rcs-blame-1.3.1/src/keyword.c:235:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(prefix, "%-12s (%-8.8s ", data/rcs-blame-1.3.1/src/parser.c:794:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/rcs-blame-1.3.1/src/rcs.c:124:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (rcs->access) vector_free(rcs->access); data/rcs-blame-1.3.1/src/rcs.c:124:36: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (rcs->access) vector_free(rcs->access); data/rcs-blame-1.3.1/src/rcs.c:310: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(cond, date_str); data/rcs-blame-1.3.1/src/rcs.c:320: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(cond, author); data/rcs-blame-1.3.1/src/rcs.c:329: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(cond, state); data/rcs-blame-1.3.1/src/rcs.c:443: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(*rev, r); data/rcs-blame-1.3.1/src/rcs.h:44:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. vector_t *access; /* Access list; parsed but not used. */ data/rcs-blame-1.3.1/src/util.c:122:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, "RCS" SSLASH); data/rcs-blame-1.3.1/src/util.c:126:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(buffer, F_OK)) { data/rcs-blame-1.3.1/src/util.c:142:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(buffer, F_OK)) { data/rcs-blame-1.3.1/lib/argp-help.c:162:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *var = getenv ("ARGP_HELP_FMT"); data/rcs-blame-1.3.1/lib/getopt.c:109:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char *getenv (); data/rcs-blame-1.3.1/lib/getopt.c:244:47: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); data/rcs-blame-1.3.1/lib/getopt.c:1116:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (int argc, char *const *argv, const char *optstring) data/rcs-blame-1.3.1/lib/getopt.c:1138:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "abc:d:0123456789"); data/rcs-blame-1.3.1/lib/getopt1.c:41:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, data/rcs-blame-1.3.1/lib/getopt1.c:106:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, "abc:d:0123456789", data/rcs-blame-1.3.1/lib/getopt_.h:39:9: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # undef getopt data/rcs-blame-1.3.1/lib/getopt_.h:40:9: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # undef getopt_long data/rcs-blame-1.3.1/lib/getopt_.h:49:10: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt __GETOPT_ID (getopt) data/rcs-blame-1.3.1/lib/getopt_.h:49:30: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt __GETOPT_ID (getopt) data/rcs-blame-1.3.1/lib/getopt_.h:50:10: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt_long __GETOPT_ID (getopt_long) data/rcs-blame-1.3.1/lib/getopt_.h:50:35: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt_long __GETOPT_ID (getopt_long) data/rcs-blame-1.3.1/lib/getopt_.h:204:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) data/rcs-blame-1.3.1/lib/getopt_.h:208:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, data/rcs-blame-1.3.1/src/blame.c:753:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (rcsinit = getenv("RCSINIT")) ) { data/rcs-blame-1.3.1/src/date.c:1045: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. tz = getenv("TZ"); data/rcs-blame-1.3.1/lib/alloca.c:133: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 align[ALIGN_SIZE]; /* To force sizeof(header). */ data/rcs-blame-1.3.1/lib/allocsa.c:48:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; data/rcs-blame-1.3.1/lib/allocsa.c:52:29: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; data/rcs-blame-1.3.1/lib/ansi2knr.c:280: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). out = fopen(output_name, "w"); data/rcs-blame-1.3.1/lib/ansi2knr.c:288: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). in = fopen(argv[1], "r"); data/rcs-blame-1.3.1/lib/argp-fmtstream.h:210: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 (__fs->p, __str, __len); data/rcs-blame-1.3.1/lib/argp-help.c:208:11: [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). val = atoi (arg); data/rcs-blame-1.3.1/lib/argp-help.c:1891: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. char buf[200]; data/rcs-blame-1.3.1/lib/argp-parse.c:126:20: [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). _argp_hang = atoi (arg ? arg : "3600"); data/rcs-blame-1.3.1/lib/basename.c:98: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 (p + 2, base, length); data/rcs-blame-1.3.1/lib/canonicalize.c:222: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. dest = memcpy (dest, start, end - start); data/rcs-blame-1.3.1/lib/canonicalize.c:275:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. name = end = memcpy (extra_buf, buf, n); data/rcs-blame-1.3.1/lib/dirname.c:80: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 (dir, file, length); data/rcs-blame-1.3.1/lib/error.c:110:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[1024]; data/rcs-blame-1.3.1/lib/filenamecat.c:33:47: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) data/rcs-blame-1.3.1/lib/getcwd.c:126: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 dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1]; data/rcs-blame-1.3.1/lib/getcwd.c:316:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d)); data/rcs-blame-1.3.1/lib/getcwd.c:352:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. dirp = memcpy (tmp + allocated - (oldsize - dirroom), data/rcs-blame-1.3.1/lib/getcwd.c:359: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 (dirp, d->d_name, namlen); data/rcs-blame-1.3.1/lib/gettext.h:199:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_ctxt_id[msgctxt_len + msgid_len]; data/rcs-blame-1.3.1/lib/gettext.h: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 buf[1024]; data/rcs-blame-1.3.1/lib/gettext.h:209:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/rcs-blame-1.3.1/lib/gettext.h:211:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/rcs-blame-1.3.1/lib/gettext.h:245:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_ctxt_id[msgctxt_len + msgid_len]; data/rcs-blame-1.3.1/lib/gettext.h:247:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/rcs-blame-1.3.1/lib/gettext.h:255:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/rcs-blame-1.3.1/lib/gettext.h:257:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/rcs-blame-1.3.1/lib/mbchar.h:295: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[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ data/rcs-blame-1.3.1/lib/mbchar.h:392: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 (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); data/rcs-blame-1.3.1/lib/memcpy.c:28:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (void *destaddr, void const *srcaddr, size_t len) data/rcs-blame-1.3.1/lib/mempcpy.c:28: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. return (char *) memcpy (dest, src, n) + n; data/rcs-blame-1.3.1/lib/mktime.c:106:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. #define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } data/rcs-blame-1.3.1/lib/mktime.c:589:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); data/rcs-blame-1.3.1/lib/mktime.c:605:21: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t from = atol (argv[1]); data/rcs-blame-1.3.1/lib/mktime.c:606:19: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t by = atol (argv[2]); data/rcs-blame-1.3.1/lib/mktime.c:607:19: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t to = atol (argv[3]); data/rcs-blame-1.3.1/lib/obstack.h:147: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 contents[4]; /* objects begin here */ data/rcs-blame-1.3.1/lib/obstack.h:302: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 (__o->next_free, where, __len); \ data/rcs-blame-1.3.1/lib/obstack.h:312: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 (__o->next_free, where, __len); \ data/rcs-blame-1.3.1/lib/obstack.h:438: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 ((h)->next_free, where, (h)->temp.tempint), \ data/rcs-blame-1.3.1/lib/obstack.h:445: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 ((h)->next_free, where, (h)->temp.tempint), \ data/rcs-blame-1.3.1/lib/setenv.c:170: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/rcs-blame-1.3.1/lib/setenv.c:172: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/rcs-blame-1.3.1/lib/setenv.c:191: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/rcs-blame-1.3.1/lib/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], name, namelen); data/rcs-blame-1.3.1/lib/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][namelen + 1], value, vallen); data/rcs-blame-1.3.1/lib/setenv.c:208: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/rcs-blame-1.3.1/lib/setenv.c:238: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/rcs-blame-1.3.1/lib/setenv.c:240: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/rcs-blame-1.3.1/lib/setenv.c:259: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/rcs-blame-1.3.1/lib/setenv.c:261: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/rcs-blame-1.3.1/lib/setenv.c:263: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/rcs-blame-1.3.1/lib/strdup.c:48: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. return (char *) memcpy (new, s, len); data/rcs-blame-1.3.1/lib/strftime.c:97:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define MEMCPY(d, s, n) memcpy (d, s, n) data/rcs-blame-1.3.1/lib/strftime.c:104:49: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define MEMPCPY(d, s, n) ((void *) ((char *) memcpy (d, s, n) + (n))) data/rcs-blame-1.3.1/lib/strftime.c:808:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ufmt[5]; data/rcs-blame-1.3.1/lib/strftime.c:810:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ubuf[1024]; /* enough for any single format in practice */ data/rcs-blame-1.3.1/lib/strndup.c:38:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy (new, s, len); data/rcs-blame-1.3.1/lib/strstr.c:62: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 (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t)); data/rcs-blame-1.3.1/lib/vasnprintf.c:200: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 (memory, result, length * sizeof (CHAR_T)); \ data/rcs-blame-1.3.1/lib/vasnprintf.c:212:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + length, cp, n * sizeof (CHAR_T)); data/rcs-blame-1.3.1/lib/vasnprintf.c:518: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 (p, dp->width_start, n * sizeof (CHAR_T)); data/rcs-blame-1.3.1/lib/vasnprintf.c:524: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 (p, dp->precision_start, n * sizeof (CHAR_T)); data/rcs-blame-1.3.1/lib/vasnprintf.c:835: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 (result + length, tmp, count * sizeof (CHAR_T)); data/rcs-blame-1.3.1/lib/vsnprintf.c:63: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 (str, output, pruned_len); data/rcs-blame-1.3.1/lib/xmalloc.c:114:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy (xmalloc (s), p, s); data/rcs-blame-1.3.1/src/date.c:1069: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(result, "%04d.%02d.%02d.%02d.%02d.%02d", data/rcs-blame-1.3.1/src/date.c:1093: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(&tm, localtime(&date), sizeof(struct tm)); data/rcs-blame-1.3.1/src/date.c:1101: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(&tm, gmtime(&date), sizeof(struct tm)); data/rcs-blame-1.3.1/src/date.c:1107:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. len += sprintf(result + len, "+%02ld", zone / 3600); data/rcs-blame-1.3.1/src/date.c:1110:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. len += sprintf(result + len, "-%02ld", zone / 3600); data/rcs-blame-1.3.1/src/date.c:1114:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. len += sprintf(result + len, ":%02ld", zone / 60); data/rcs-blame-1.3.1/src/date.c:1118:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. len += sprintf(result + len, ":%02ld", zone); data/rcs-blame-1.3.1/src/keyword.c:104:4: [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(output, "\\t"); data/rcs-blame-1.3.1/src/keyword.c:113:4: [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(output, "\\n"); data/rcs-blame-1.3.1/src/keyword.c:122:4: [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(output, "\\040"); data/rcs-blame-1.3.1/src/keyword.c:131:4: [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(output, "\\044"); data/rcs-blame-1.3.1/src/keyword.c:140:4: [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(output, "\\\\"); data/rcs-blame-1.3.1/src/keyword.c:229:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[36]; data/rcs-blame-1.3.1/src/keyword.c:240: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(prefix, "): "); data/rcs-blame-1.3.1/src/keyword.c:403: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(t3, log_start, log_end - log_start); data/rcs-blame-1.3.1/src/lines.c:81: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(result->lines, lines->lines, result->count * sizeof(line_t *)); data/rcs-blame-1.3.1/src/lines.c:169: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(to, from + from_line, (line - from_line) * sizeof(line_t *)); data/rcs-blame-1.3.1/src/lines.c:173:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(to, cmd, count * sizeof(line_t *)); data/rcs-blame-1.3.1/src/lines.c:202: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(to, from + from_line, (line - from_line) * sizeof(line_t *)); data/rcs-blame-1.3.1/src/lines.c:219: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(to, from + from_line, (lines_count(in) - from_line) * sizeof(line_t *)); data/rcs-blame-1.3.1/src/parser.c:1105: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/rcs-blame-1.3.1/src/parser.c:1122: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 yyformat[sizeof yyunexpected data/rcs-blame-1.3.1/src/parser.c:1299:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char yymsgbuf[128]; data/rcs-blame-1.3.1/src/rcs.c:52: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). stream = fopen(rcs_filename, "r"); data/rcs-blame-1.3.1/src/rcs.c:302: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(cond, " has"); data/rcs-blame-1.3.1/src/rcs.c:309: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(cond, " a date before "); data/rcs-blame-1.3.1/src/rcs.c:318:18: [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. if (date >= 0) strcat(cond, " and"); data/rcs-blame-1.3.1/src/rcs.c:319: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(cond, " author "); data/rcs-blame-1.3.1/src/rcs.c:327:30: [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. if ((date >= 0) || author) strcat(cond, " and"); data/rcs-blame-1.3.1/src/rcs.c:328: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(cond, " state "); data/rcs-blame-1.3.1/src/vector.c:64:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result->data, vector->data, result->count * sizeof(void *)); data/rcs-blame-1.3.1/src/working.c:41: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). stream = fopen(filename, "r"); data/rcs-blame-1.3.1/lib/ansi2knr.c:162: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). extern int strlen(), strncmp(); data/rcs-blame-1.3.1/lib/ansi2knr.c:311: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). test: line += strlen(line); data/rcs-blame-1.3.1/lib/ansi2knr.c:334: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). line += strlen(line); data/rcs-blame-1.3.1/lib/ansi2knr.c:483: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). bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1); data/rcs-blame-1.3.1/lib/ansi2knr.c:516:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { if ( strlen(kp) == len && !strncmp(kp, buf, len) ) data/rcs-blame-1.3.1/lib/argp-fmtstream.h:221:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t __len = strlen (__str); data/rcs-blame-1.3.1/lib/argp-help.c:215: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 (un->name) == var_len data/rcs-blame-1.3.1/lib/argp-help.c:860: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). unsigned hol_so_len = strlen (hol->short_options); data/rcs-blame-1.3.1/lib/argp-help.c:862: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). malloc (hol_so_len + strlen (more->short_options) + 1); data/rcs-blame-1.3.1/lib/argp-help.c:1285:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). space (stream, 6 + strlen (arg)); data/rcs-blame-1.3.1/lib/argp-help.c:1332: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). char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1); data/rcs-blame-1.3.1/lib/argp-namefrob.h:132:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc_unlocked(x) getc (x) data/rcs-blame-1.3.1/lib/argp-namefrob.h:135:30: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getchar_unlocked() getchar () data/rcs-blame-1.3.1/lib/basename.c:117: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). for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) data/rcs-blame-1.3.1/lib/canonicalize.c:94: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). resolved_size = strlen (name); data/rcs-blame-1.3.1/lib/canonicalize.c:258: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 (buf); data/rcs-blame-1.3.1/lib/canonicalize.c:259:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (end); data/rcs-blame-1.3.1/lib/error.c:142:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (message) + 1; data/rcs-blame-1.3.1/lib/filenamecat.c:71:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t baselen = strlen (base); data/rcs-blame-1.3.1/lib/getcwd.c:38:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) data/rcs-blame-1.3.1/lib/getdelim.c:80:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = getc (fp); data/rcs-blame-1.3.1/lib/getopt.c:275:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = d->__nonoption_flags_max_len = strlen (orig_str); data/rcs-blame-1.3.1/lib/getopt.c:502: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). == (unsigned int) strlen (p->name)) data/rcs-blame-1.3.1/lib/getopt.c:551:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/getopt.c:624:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/getopt.c:664:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/getopt.c:669:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/getopt.c:872:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) data/rcs-blame-1.3.1/lib/getopt.c:917:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/getopt.c:961:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/getopt.c:999:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/getopt.c:1003:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/rcs-blame-1.3.1/lib/gettext.h:195:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/rcs-blame-1.3.1/lib/gettext.h:196:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/rcs-blame-1.3.1/lib/gettext.h:241:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/rcs-blame-1.3.1/lib/gettext.h:242:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/rcs-blame-1.3.1/lib/lstat.c:56: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 (file); data/rcs-blame-1.3.1/lib/mbuiter.h:154: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). iter->cur.bytes = strlen (iter->cur.ptr); data/rcs-blame-1.3.1/lib/setenv.c:112: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/rcs-blame-1.3.1/lib/setenv.c:113:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t vallen = value != NULL ? strlen (value) + 1 : 0; data/rcs-blame-1.3.1/lib/strdup.c:42:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (s) + 1; data/rcs-blame-1.3.1/lib/strftime.c:98:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define STRLEN(s) strlen (s) data/rcs-blame-1.3.1/lib/strftime.c:581:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). format_end = f + strlen (f) + 1; data/rcs-blame-1.3.1/lib/strftime.c:593:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (f + len); data/rcs-blame-1.3.1/lib/strftime.c:848:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (era->era_name); data/rcs-blame-1.3.1/lib/strftime.c:1326:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cpy (strlen (zone), zone); data/rcs-blame-1.3.1/lib/unlocked-io.h:101:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getc data/rcs-blame-1.3.1/lib/unlocked-io.h:102:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc(x) getc_unlocked (x) data/rcs-blame-1.3.1/lib/unlocked-io.h:104:28: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc_unlocked(x) getc (x) data/rcs-blame-1.3.1/lib/unlocked-io.h:108:10: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getchar data/rcs-blame-1.3.1/lib/unlocked-io.h:109:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getchar() getchar_unlocked () data/rcs-blame-1.3.1/lib/unlocked-io.h:111:30: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getchar_unlocked() getchar () data/rcs-blame-1.3.1/lib/unsetenv.c:65: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/rcs-blame-1.3.1/lib/vasnprintf.c:54:24: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define local_wcslen wcslen data/rcs-blame-1.3.1/lib/vasnprintf.c:461: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). tmp_length = strlen (a.arg[dp->arg_index].a.a_string); data/rcs-blame-1.3.1/lib/xmalloc.c:122: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). return xmemdup (string, strlen (string) + 1); data/rcs-blame-1.3.1/src/blame.c:127: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). total_length = strlen(rev); data/rcs-blame-1.3.1/src/date.c:298:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dpl = strlen(dp); data/rcs-blame-1.3.1/src/date.c:351:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncasecmp(s, tz->name, strlen(tz->name))) { data/rcs-blame-1.3.1/src/date.c:352: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). s += strlen(tz->name); data/rcs-blame-1.3.1/src/date.c:479: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). aml = strlen(am); data/rcs-blame-1.3.1/src/date.c:480: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). pml = strlen(pm); data/rcs-blame-1.3.1/src/date.c:549:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncasecmp(s, month, strlen(month))) { data/rcs-blame-1.3.1/src/date.c:550: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). s += strlen(month); data/rcs-blame-1.3.1/src/date.c:570:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncasecmp(s, month, strlen(month))) { data/rcs-blame-1.3.1/src/date.c:571: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). s += strlen(month); data/rcs-blame-1.3.1/src/date.c:647: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). if (!strncasecmp(s, day, strlen(day))) { data/rcs-blame-1.3.1/src/date.c:648: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). s += strlen(day); data/rcs-blame-1.3.1/src/date.c:668: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). if (!strncasecmp(s, day, strlen(day))) { data/rcs-blame-1.3.1/src/date.c:669: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). s += strlen(day); data/rcs-blame-1.3.1/src/keyword.c:38: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). end = s + strlen(s); data/rcs-blame-1.3.1/src/keyword.c:41: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(output, s, escape - s); data/rcs-blame-1.3.1/src/keyword.c:44:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(output, "\t"); data/rcs-blame-1.3.1/src/keyword.c:48:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(output, "\n"); data/rcs-blame-1.3.1/src/keyword.c:52:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(output, "\\"); data/rcs-blame-1.3.1/src/keyword.c:61: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(output, " "); data/rcs-blame-1.3.1/src/keyword.c:68: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(output, "$"); data/rcs-blame-1.3.1/src/keyword.c:90:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). capacity = strlen(s); data/rcs-blame-1.3.1/src/keyword.c:103:4: [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(output, s, magic - s); data/rcs-blame-1.3.1/src/keyword.c:112:4: [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(output, s, magic - s); data/rcs-blame-1.3.1/src/keyword.c:121:4: [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(output, s, magic - s); data/rcs-blame-1.3.1/src/keyword.c:130:4: [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(output, s, magic - s); data/rcs-blame-1.3.1/src/keyword.c:139:4: [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(output, s, magic - s); data/rcs-blame-1.3.1/src/keyword.c:146: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(s); data/rcs-blame-1.3.1/src/keyword.c:174:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(dollar, "$Id: %*s %255s %*s %*s %*s $", buffer) == 1) data/rcs-blame-1.3.1/src/keyword.c:176:12: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. else if (sscanf(dollar, "$Id: %*s %255s %*s %*s %*s %*s $", buffer) == 1) data/rcs-blame-1.3.1/src/keyword.c:178:12: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. else if (sscanf(dollar, "$Header: %*s %255s %*s %*s %*s $", buffer) == 1) data/rcs-blame-1.3.1/src/keyword.c:181:4: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. sscanf(dollar, "$Header: %*s %255s %*s %*s %*s %*s $", buffer) == 1 data/rcs-blame-1.3.1/src/keyword.c:184:12: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. else if (sscanf(dollar, "$Revision: %255s $", buffer) == 1) data/rcs-blame-1.3.1/src/keyword.c:186:12: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. else if (sscanf(dollar, "$Name: %255s $", buffer) == 1) data/rcs-blame-1.3.1/src/keyword.c:252:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). log_end = VOIDP_OFFSET(log_start, strlen((char *)log_start)); data/rcs-blame-1.3.1/src/lexer.c:3533:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ data/rcs-blame-1.3.1/src/parser.c:986:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define yystrlen strlen data/rcs-blame-1.3.1/src/rcs.c:307: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). len += 15 + strlen(date_str); data/rcs-blame-1.3.1/src/rcs.c:316:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += 8 + strlen(author); data/rcs-blame-1.3.1/src/rcs.c:325:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += 7 + strlen(state); data/rcs-blame-1.3.1/src/rcs.c:440:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *len += strlen(r) + ((*rev)[0] ? 1 : 0); data/rcs-blame-1.3.1/src/rcs.c:442:17: [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. if ((*rev)[0]) strcat(*rev, "."); data/rcs-blame-1.3.1/src/rcs.c:502:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(rev); data/rcs-blame-1.3.1/src/rcs.c:515: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). end = copy + strlen(copy); data/rcs-blame-1.3.1/src/util.c:85:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(from, filename + strlen(filename) - (to - from), to - from)) data/rcs-blame-1.3.1/src/util.c:118:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(working_filename) + (to - from) + 4; data/rcs-blame-1.3.1/src/util.c:121: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(buffer, working_filename, (a - working_filename)); data/rcs-blame-1.3.1/src/util.c:123: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(buffer, a, base_len(a)); data/rcs-blame-1.3.1/src/util.c:124: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(buffer, from, to - from); data/rcs-blame-1.3.1/src/util.c:138:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, working_filename, (a - working_filename)); data/rcs-blame-1.3.1/src/util.c:139:4: [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(buffer, a, base_len(a)); data/rcs-blame-1.3.1/src/util.c:140:4: [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(buffer, from, to - from); data/rcs-blame-1.3.1/src/working.c:37:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t read; data/rcs-blame-1.3.1/src/working.c:52:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (rev = keyword_extract_revision(line, read)) ) ANALYSIS SUMMARY: Hits = 266 Lines analyzed = 33435 in approximately 0.96 seconds (34820 lines/second) Physical Source Lines of Code (SLOC) = 21810 Hits@level = [0] 80 [1] 110 [2] 98 [3] 17 [4] 39 [5] 2 Hits@level+ = [0+] 346 [1+] 266 [2+] 156 [3+] 58 [4+] 41 [5+] 2 Hits/KSLOC@level+ = [0+] 15.8643 [1+] 12.1962 [2+] 7.15268 [3+] 2.65933 [4+] 1.87987 [5+] 0.0917011 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.