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/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h Examining data/libtext-bibtex-perl-0.88/btparse/pccts/ast.c Examining data/libtext-bibtex-perl-0.88/btparse/pccts/ast.h Examining data/libtext-bibtex-perl-0.88/btparse/pccts/config.h Examining data/libtext-bibtex-perl-0.88/btparse/pccts/dlgauto.h Examining data/libtext-bibtex-perl-0.88/btparse/pccts/dlgdef.h Examining data/libtext-bibtex-perl-0.88/btparse/pccts/err.h Examining data/libtext-bibtex-perl-0.88/btparse/progs/args.c Examining data/libtext-bibtex-perl-0.88/btparse/progs/args.h Examining data/libtext-bibtex-perl-0.88/btparse/progs/biblex.c Examining data/libtext-bibtex-perl-0.88/btparse/progs/bibparse.c Examining data/libtext-bibtex-perl-0.88/btparse/progs/dumpnames.c Examining data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c Examining data/libtext-bibtex-perl-0.88/btparse/progs/getopt.h Examining data/libtext-bibtex-perl-0.88/btparse/progs/getopt1.c Examining data/libtext-bibtex-perl-0.88/btparse/src/attrib.h Examining data/libtext-bibtex-perl-0.88/btparse/src/bibtex.c Examining data/libtext-bibtex-perl-0.88/btparse/src/bibtex_ast.c Examining data/libtext-bibtex-perl-0.88/btparse/src/bibtex_ast.h Examining data/libtext-bibtex-perl-0.88/btparse/src/bt_debug.h Examining data/libtext-bibtex-perl-0.88/btparse/src/btparse.h Examining data/libtext-bibtex-perl-0.88/btparse/src/err.c Examining data/libtext-bibtex-perl-0.88/btparse/src/error.c Examining data/libtext-bibtex-perl-0.88/btparse/src/error.h Examining data/libtext-bibtex-perl-0.88/btparse/src/file_header.c Examining data/libtext-bibtex-perl-0.88/btparse/src/format_name.c Examining data/libtext-bibtex-perl-0.88/btparse/src/function_header.c Examining data/libtext-bibtex-perl-0.88/btparse/src/init.c Examining data/libtext-bibtex-perl-0.88/btparse/src/input.c Examining data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c Examining data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.h Examining data/libtext-bibtex-perl-0.88/btparse/src/line_offsets.c Examining data/libtext-bibtex-perl-0.88/btparse/src/line_offsets.h Examining data/libtext-bibtex-perl-0.88/btparse/src/macros.c Examining data/libtext-bibtex-perl-0.88/btparse/src/mode.h Examining data/libtext-bibtex-perl-0.88/btparse/src/modify.c Examining data/libtext-bibtex-perl-0.88/btparse/src/my_alloca.h Examining data/libtext-bibtex-perl-0.88/btparse/src/my_dmalloc.h Examining data/libtext-bibtex-perl-0.88/btparse/src/names.c Examining data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c Examining data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.h Examining data/libtext-bibtex-perl-0.88/btparse/src/postprocess.c Examining data/libtext-bibtex-perl-0.88/btparse/src/prototypes.h Examining data/libtext-bibtex-perl-0.88/btparse/src/scan.c Examining data/libtext-bibtex-perl-0.88/btparse/src/stdpccts.h Examining data/libtext-bibtex-perl-0.88/btparse/src/string_util.c Examining data/libtext-bibtex-perl-0.88/btparse/src/sym.c Examining data/libtext-bibtex-perl-0.88/btparse/src/sym.h Examining data/libtext-bibtex-perl-0.88/btparse/src/tex_tree.c Examining data/libtext-bibtex-perl-0.88/btparse/src/tokens.h Examining data/libtext-bibtex-perl-0.88/btparse/src/traversal.c Examining data/libtext-bibtex-perl-0.88/btparse/src/util.c Examining data/libtext-bibtex-perl-0.88/btparse/src/util.h Examining data/libtext-bibtex-perl-0.88/btparse/tests/case_test.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/macro_test.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/name_test.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/namebug.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/postprocess_test.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/purify_test.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/read_test.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/simple_test.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/testlib.c Examining data/libtext-bibtex-perl-0.88/btparse/tests/testlib.h Examining data/libtext-bibtex-perl-0.88/btparse/tests/tex_test.c Examining data/libtext-bibtex-perl-0.88/xscode/btxs_support.c Examining data/libtext-bibtex-perl-0.88/xscode/btxs_support.h FINAL RESULTS: data/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h:80:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zzStackOvfMsg, __FILE__, __LINE__); \ data/libtext-bibtex-perl-0.88/btparse/pccts/ast.h:38:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zzStackOvfMsg, __FILE__, __LINE__); \ data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:231:25: [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). for (i=0; i<LL_K; i++) strcpy(buf->textLA[i], zztextLA[i]); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:236:2: [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->text, (char*) zzlextext); // hide warning! [ambs] data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:269:25: [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). for (i=0; i<LL_K; i++) strcpy(zztextLA[i], buf->textLA[i]); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:274:2: [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((char*) zzlextext, buf->text); // Hide warning [ambs] data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:527:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(NLATEXT, zzinf_text[zzinf_labase]); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:615:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&zzinf_text_buffer[zzinf_text_buffer_index], NLATEXT); data/libtext-bibtex-perl-0.88/btparse/progs/bibparse.c:65:4: [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 (stdout, format, arglist); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:520: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 (stderr, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:550: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, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:562: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, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:584:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:619: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, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:630: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, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:661: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 (stderr, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:702:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, data/libtext-bibtex-perl-0.88/btparse/src/error.c:176:4: [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 (error_buf, MAX_ERROR, fmt, arglist); data/libtext-bibtex-perl-0.88/btparse/src/error.c:178:14: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. msg_len = vsprintf (error_buf, fmt, arglist); // protected by cpp data/libtext-bibtex-perl-0.88/btparse/src/postprocess.c:363:13: [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 (new_string, tmp_string); data/libtext-bibtex-perl-0.88/btparse/src/tex_tree.c:30:27: [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 string_warning(w) fprintf (stderr, w); data/libtext-bibtex-perl-0.88/btparse/tests/postprocess_test.c:14:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (buf, string); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:175:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv (); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:305:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv ("POSIXLY_CORRECT") != NULL) data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:730: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 (argc, argv, optstring) data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:760: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/libtext-bibtex-perl-0.88/btparse/progs/getopt.h:105: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/libtext-bibtex-perl-0.88/btparse/progs/getopt.h:107: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 (); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.h:109: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 *const *argv, const char *shortopts, data/libtext-bibtex-perl-0.88/btparse/progs/getopt.h:121: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 (); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.h:122: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 (); data/libtext-bibtex-perl-0.88/btparse/progs/getopt1.c:58:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv (); data/libtext-bibtex-perl-0.88/btparse/progs/getopt1.c:66: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 (argc, argv, options, long_options, opt_index) data/libtext-bibtex-perl-0.88/btparse/progs/getopt1.c:122: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/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h:99: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 zztextLA[LL_K][ZZLEXBUFSIZE]; \ data/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h:156:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char textLA[LL_K][ZZLEXBUFSIZE]; data/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h:161:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text[ZZLEXBUFSIZE]; data/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h:335:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. {static char zztoktext[ZZLEXBUFSIZE]; \ data/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h:338: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. {static char zztoktext[ZZLEXBUFSIZE]; \ data/libtext-bibtex-perl-0.88/btparse/pccts/antlr.h:341: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. {static char zztoktext[ZZLEXBUFSIZE]; \ data/libtext-bibtex-perl-0.88/btparse/pccts/dlgauto.h:67: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 zzebuf[70]; data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:132:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char text[LL_K*ZZLEXBUFSIZE+1+1]; // allocate an extra byte for strncat() to drop a trailing NULL data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:135:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char text[ZZLEXBUFSIZE+1+1]; // allocate an extra byte for strncat() to drop a trailing NULL data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:801: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 zzmbuf[70]; data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:847: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(modeStack, zzmstk, sizeof(zzmstk)); data/libtext-bibtex-perl-0.88/btparse/progs/biblex.c:58:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infile = fopen (filename, "r"); data/libtext-bibtex-perl-0.88/btparse/progs/bibparse.c:247:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infile = fopen (filename, "r"); data/libtext-bibtex-perl-0.88/btparse/progs/dumpnames.c:115: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). infile = fopen (filename, "r"); data/libtext-bibtex-perl-0.88/btparse/src/btparse.h:140:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ** parts[BT_MAX_NAMEPARTS]; /* each elt. is list of pointers */ data/libtext-bibtex-perl-0.88/btparse/src/btparse.h:169:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * pre_part[BT_MAX_NAMEPARTS]; data/libtext-bibtex-perl-0.88/btparse/src/btparse.h:170:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * post_part[BT_MAX_NAMEPARTS]; data/libtext-bibtex-perl-0.88/btparse/src/btparse.h:171:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * pre_token[BT_MAX_NAMEPARTS]; data/libtext-bibtex-perl-0.88/btparse/src/btparse.h:172:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * post_token[BT_MAX_NAMEPARTS]; data/libtext-bibtex-perl-0.88/btparse/src/error.c:36: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 *errclass_names[NUM_ERRCLASSES] = data/libtext-bibtex-perl-0.88/btparse/src/error.c:75: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 error_buf[MAX_ERROR+1]; data/libtext-bibtex-perl-0.88/btparse/src/input.c:468:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infile = fopen (filename, "r"); data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c:295:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char head[16], tail[16]; data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c:199: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. static char msg [MAX_ERROR]; data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c:236:33: [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 (zzset_deg (eset) > 1) strcat (msg, " in"); data/libtext-bibtex-perl-0.88/btparse/src/scan.c:91:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char shift0[257] = { data/libtext-bibtex-perl-0.88/btparse/src/scan.c:213:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char shift1[257] = { data/libtext-bibtex-perl-0.88/btparse/src/scan.c:304:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char shift2[257] = { data/libtext-bibtex-perl-0.88/btparse/src/tex_tree.c:305:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/libtext-bibtex-perl-0.88/btparse/tests/case_test.c:30:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024]; data/libtext-bibtex-perl-0.88/btparse/tests/macro_test.c:30:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024]; data/libtext-bibtex-perl-0.88/btparse/tests/name_test.c:123:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024]; data/libtext-bibtex-perl-0.88/btparse/tests/namebug.c:203:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * snames[4] = { "Joe Blow", "John Smith", "Fred Rogers", "" }; data/libtext-bibtex-perl-0.88/btparse/tests/purify_test.c:9:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024]; data/libtext-bibtex-perl-0.88/btparse/tests/read_test.c:17:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[256]; data/libtext-bibtex-perl-0.88/btparse/tests/simple_test.c:544:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[256]; data/libtext-bibtex-perl-0.88/btparse/tests/testlib.c:27: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). file = fopen (filename, "r"); data/libtext-bibtex-perl-0.88/btparse/tests/tex_test.c:10:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024]; data/libtext-bibtex-perl-0.88/btparse/pccts/dlgauto.h:76:33: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define ZZGETC_STREAM {zzchar = getc(zzstream_in); zzclass = ZZSHIFT(zzchar);} data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:162:53: [1] (buffer) strlen: Does not handle 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 freeSpace = (LL_K*ZZLEXBUFSIZE+1) - strlen(text); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:164:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int freeSpace = (ZZLEXBUFSIZE+1) - strlen(text); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:166:14: [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 ( i>1 ) strcat(text, " "); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:172: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(text, (char*)LATEXT(i), freeSpace); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:327: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(egroup) > 0 ) fprintf(stderr, " in %s", egroup); data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:523:23: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. {NLA = zzEOF_TOKEN; strcpy(NLATEXT, "");} data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:601:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while ( (zzinf_text_buffer_index+strlen(NLATEXT)+1) >= zzinf_text_buffer_size ) data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:616: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). zzinf_text_buffer_index += strlen(NLATEXT)+1; data/libtext-bibtex-perl-0.88/btparse/pccts/err.h:637: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). zzinf_text_buffer_index += strlen(&zzinf_text_buffer[zzinf_text_buffer_index])+1; data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:199: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). extern int strlen (const char *); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:497: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 (nameend - nextchar == strlen (p->name)) data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:528: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). nextchar += strlen (nextchar); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:572: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). nextchar += strlen (nextchar); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:592: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). nextchar += strlen (nextchar); data/libtext-bibtex-perl-0.88/btparse/progs/getopt.c:596: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). nextchar += strlen (nextchar); data/libtext-bibtex-perl-0.88/btparse/src/format_name.c:108: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). num_parts = strlen (parts); data/libtext-bibtex-perl-0.88/btparse/src/format_name.c:625: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). #define STRLEN(s) (s == NULL) ? 0 : strlen (s) data/libtext-bibtex-perl-0.88/btparse/src/format_name.c:972: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). assert (strlen (fname) <= max_length); data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c:152: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). int len = strlen (txt); data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c:300:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (head, zzlextext, 15); head[15] = 0; data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c:301:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tail, zzlextext+ZZLEXBUFSIZE-15, 15); tail[15] = 0; data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c:434:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). JunkCount += strlen ((const char*)zzlextext); data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c:663: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). int len = strlen ((const char*)zzlextext); data/libtext-bibtex-perl-0.88/btparse/src/lex_auxiliary.c:862: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 ((const char*)zzbegexpr); data/libtext-bibtex-perl-0.88/btparse/src/macros.c:334: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 strlen (sym->text); data/libtext-bibtex-perl-0.88/btparse/src/names.c:128: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). string_len = strlen (string); data/libtext-bibtex-perl-0.88/btparse/src/names.c:129: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). delim_len = strlen (delim); data/libtext-bibtex-perl-0.88/btparse/src/names.c:420: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 (name); data/libtext-bibtex-perl-0.88/btparse/src/names.c:819: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). len = strlen (name); data/libtext-bibtex-perl-0.88/btparse/src/names.c:876: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). if (strlen (name) == 0) /* name now empty? */ data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c:94:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return(dlen + strlen(src)); data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c:214: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 (msg); data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c:237: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). len = strlen (msg); data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c:263: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 (msg); data/libtext-bibtex-perl-0.88/btparse/src/parse_auxiliary.c:264: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). if (egroup && strlen (egroup) > 0) data/libtext-bibtex-perl-0.88/btparse/src/postprocess.c:114: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 (s); data/libtext-bibtex-perl-0.88/btparse/src/postprocess.c:224:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? (strlen (simple_value->text)) : 0; data/libtext-bibtex-perl-0.88/btparse/src/postprocess.c:228:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? (strlen (simple_value->text)) : 0; data/libtext-bibtex-perl-0.88/btparse/src/postprocess.c:390: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). len = strlen (new_string); data/libtext-bibtex-perl-0.88/btparse/src/string_util.c:327: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). orig_len = strlen (string); data/libtext-bibtex-perl-0.88/btparse/src/string_util.c:382: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). assert (strlen (string) <= orig_len); data/libtext-bibtex-perl-0.88/btparse/src/string_util.c:488: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). repl_len = strlen (repl); data/libtext-bibtex-perl-0.88/btparse/src/string_util.c:493:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (string + *dst, repl, repl_len); data/libtext-bibtex-perl-0.88/btparse/src/string_util.c:502:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (string + *dst, string + *src, cs_end - *src); data/libtext-bibtex-perl-0.88/btparse/src/string_util.c:581: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 (string); data/libtext-bibtex-perl-0.88/btparse/src/tex_tree.c:171: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 (string); data/libtext-bibtex-perl-0.88/btparse/src/tex_tree.c:312:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf, node->start, node->len); data/libtext-bibtex-perl-0.88/btparse/src/tex_tree.c:369:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf + *offset, node->start, node->len); data/libtext-bibtex-perl-0.88/btparse/src/util.c:37: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(s); data/libtext-bibtex-perl-0.88/btparse/src/util.c:62: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(s); data/libtext-bibtex-perl-0.88/btparse/tests/case_test.c:39: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). len = strlen (line); data/libtext-bibtex-perl-0.88/btparse/tests/macro_test.c:59: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). text[strlen(text)-1] = (char) 0; /* wipe the newline */ data/libtext-bibtex-perl-0.88/btparse/tests/name_test.c:134: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). len = strlen (line); data/libtext-bibtex-perl-0.88/btparse/tests/namebug.c:15: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 size = strlen(name); data/libtext-bibtex-perl-0.88/btparse/tests/postprocess_test.c:13: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). buf = (char *) malloc (strlen(string) + 1); data/libtext-bibtex-perl-0.88/btparse/tests/purify_test.c:17: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). len = strlen (line); data/libtext-bibtex-perl-0.88/btparse/tests/purify_test.c:22: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). len = strlen (line); data/libtext-bibtex-perl-0.88/btparse/tests/tex_test.c:22: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). len = strlen (line); data/libtext-bibtex-perl-0.88/xscode/btxs_support.c:234: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). hv_store (values, field_name, strlen (field_name), sv_field_value, 0); data/libtext-bibtex-perl-0.88/xscode/btxs_support.c:235:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hv_store (lines, field_name, strlen (field_name), data/libtext-bibtex-perl-0.88/xscode/btxs_support.c:479:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hv_store (hash, key, strlen (key), listref, 0); data/libtext-bibtex-perl-0.88/xscode/btxs_support.c:485: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). hv_delete (hash, key, strlen (key), G_DISCARD); ANALYSIS SUMMARY: Hits = 135 Lines analyzed = 16555 in approximately 0.51 seconds (32602 lines/second) Physical Source Lines of Code (SLOC) = 10706 Hits@level = [0] 253 [1] 63 [2] 38 [3] 12 [4] 22 [5] 0 Hits@level+ = [0+] 388 [1+] 135 [2+] 72 [3+] 34 [4+] 22 [5+] 0 Hits/KSLOC@level+ = [0+] 36.2414 [1+] 12.6098 [2+] 6.7252 [3+] 3.17579 [4+] 2.05492 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.