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/glimpse-4.18.7/agrep/agrep.c Examining data/glimpse-4.18.7/agrep/agrep.h Examining data/glimpse-4.18.7/agrep/asearch1.c Examining data/glimpse-4.18.7/agrep/asplit.c Examining data/glimpse-4.18.7/agrep/checkfile.c Examining data/glimpse-4.18.7/agrep/checkfile.h Examining data/glimpse-4.18.7/agrep/checksg.c Examining data/glimpse-4.18.7/agrep/compat.c Examining data/glimpse-4.18.7/agrep/config.h Examining data/glimpse-4.18.7/agrep/defs.h Examining data/glimpse-4.18.7/agrep/delim.c Examining data/glimpse-4.18.7/agrep/dummyfilters.c Examining data/glimpse-4.18.7/agrep/dummysyscalls.c Examining data/glimpse-4.18.7/agrep/follow.c Examining data/glimpse-4.18.7/agrep/io.c Examining data/glimpse-4.18.7/agrep/main.c Examining data/glimpse-4.18.7/agrep/maskgen.c Examining data/glimpse-4.18.7/agrep/newmgrep.c Examining data/glimpse-4.18.7/agrep/parse.c Examining data/glimpse-4.18.7/agrep/preprocess.c Examining data/glimpse-4.18.7/agrep/putils.c Examining data/glimpse-4.18.7/agrep/re.h Examining data/glimpse-4.18.7/agrep/recursive.c Examining data/glimpse-4.18.7/agrep/utilities.c Examining data/glimpse-4.18.7/agrep/bitap.c Examining data/glimpse-4.18.7/agrep/asearch.c Examining data/glimpse-4.18.7/agrep/sgrep.c Examining data/glimpse-4.18.7/communicate.c Examining data/glimpse-4.18.7/compress/cast.c Examining data/glimpse-4.18.7/compress/defs.h Examining data/glimpse-4.18.7/compress/hash.c Examining data/glimpse-4.18.7/compress/main_cast.c Examining data/glimpse-4.18.7/compress/main_tbuild.c Examining data/glimpse-4.18.7/compress/main_uncast.c Examining data/glimpse-4.18.7/compress/misc.c Examining data/glimpse-4.18.7/compress/quick.c Examining data/glimpse-4.18.7/compress/string.c Examining data/glimpse-4.18.7/compress/tbuild.c Examining data/glimpse-4.18.7/compress/test.c Examining data/glimpse-4.18.7/compress/tmemlook.c Examining data/glimpse-4.18.7/compress/trecursive.c Examining data/glimpse-4.18.7/compress/tsimpletest.c Examining data/glimpse-4.18.7/compress/uncast.c Examining data/glimpse-4.18.7/defs.h Examining data/glimpse-4.18.7/dynfilters/sotest.c Examining data/glimpse-4.18.7/get_filename.c Examining data/glimpse-4.18.7/get_index.c Examining data/glimpse-4.18.7/glimpse/communicate.c Examining data/glimpse-4.18.7/glimpse/defs.h Examining data/glimpse-4.18.7/glimpse/get_filename.c Examining data/glimpse-4.18.7/glimpse/get_index.c Examining data/glimpse-4.18.7/glimpse/main.c Examining data/glimpse-4.18.7/glimpse/split.c Examining data/glimpse-4.18.7/index/build_in.c Examining data/glimpse-4.18.7/index/convert.c Examining data/glimpse-4.18.7/index/dir.c Examining data/glimpse-4.18.7/index/filetype.c Examining data/glimpse-4.18.7/index/fixname.c Examining data/glimpse-4.18.7/index/getword.c Examining data/glimpse-4.18.7/index/glimpse.c Examining data/glimpse-4.18.7/index/glimpse.h Examining data/glimpse-4.18.7/index/io.c Examining data/glimpse-4.18.7/index/lib.c Examining data/glimpse-4.18.7/index/memlook.c Examining data/glimpse-4.18.7/index/partition.c Examining data/glimpse-4.18.7/index/region.c Examining data/glimpse-4.18.7/index/region.h Examining data/glimpse-4.18.7/index/simpletest.c Examining data/glimpse-4.18.7/index/utils.c Examining data/glimpse-4.18.7/libtemplate/include/autoconf.h Examining data/glimpse-4.18.7/libtemplate/include/ccache.h Examining data/glimpse-4.18.7/libtemplate/include/ccache_list.h Examining data/glimpse-4.18.7/libtemplate/include/ccache_queue.h Examining data/glimpse-4.18.7/libtemplate/include/config.h Examining data/glimpse-4.18.7/libtemplate/include/gdbm.h Examining data/glimpse-4.18.7/libtemplate/include/paths.h Examining data/glimpse-4.18.7/libtemplate/include/template.h Examining data/glimpse-4.18.7/libtemplate/include/time_it.h Examining data/glimpse-4.18.7/libtemplate/include/url.h Examining data/glimpse-4.18.7/libtemplate/include/util.h Examining data/glimpse-4.18.7/libtemplate/template/cksoif.c Examining data/glimpse-4.18.7/libtemplate/template/iafa2soif.c Examining data/glimpse-4.18.7/libtemplate/template/lsm2soif.c Examining data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c Examining data/glimpse-4.18.7/libtemplate/template/print-attr.c Examining data/glimpse-4.18.7/libtemplate/template/print-template.c Examining data/glimpse-4.18.7/libtemplate/template/print-urlrefs.c Examining data/glimpse-4.18.7/libtemplate/template/template.c Examining data/glimpse-4.18.7/libtemplate/template/translate-urls.c Examining data/glimpse-4.18.7/libtemplate/util/buffer.c Examining data/glimpse-4.18.7/libtemplate/util/harvest.c Examining data/glimpse-4.18.7/libtemplate/util/host.c Examining data/glimpse-4.18.7/libtemplate/util/log.c Examining data/glimpse-4.18.7/libtemplate/util/strdup.c Examining data/glimpse-4.18.7/libtemplate/util/strerror.c Examining data/glimpse-4.18.7/libtemplate/util/string.c Examining data/glimpse-4.18.7/libtemplate/util/system.c Examining data/glimpse-4.18.7/libtemplate/util/xmalloc.c Examining data/glimpse-4.18.7/main.c Examining data/glimpse-4.18.7/split.c FINAL RESULTS: data/glimpse-4.18.7/agrep/agrep.c:147: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(s, ctime(&thetime)); /* of the form: Sun Sep 16 01:03:52 1973\n\0 */ data/glimpse-4.18.7/agrep/agrep.c:149:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(s, "%s%s%s%s%s", s1, s2, s3, s4, s5); data/glimpse-4.18.7/agrep/agrep.c:150:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, ": %s %s %s", s2, s3, s5); /* ditch Sun 01:03:52 */ data/glimpse-4.18.7/agrep/agrep.c:209:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(D_pattern, original_D_pattern); data/glimpse-4.18.7/agrep/agrep.c:211:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(old_D_pat, original_old_D_pat); data/glimpse-4.18.7/agrep/agrep.c:2634:6: [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(D_pattern+1, argv[0]); data/glimpse-4.18.7/agrep/agrep.c:2651:6: [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(D_pattern+1, p + 1); data/glimpse-4.18.7/agrep/agrep.c:2659:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(original_D_pattern, D_pattern); data/glimpse-4.18.7/agrep/agrep.c:2675:6: [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(COMP_DIR, argv[0]); data/glimpse-4.18.7/agrep/agrep.c:2679:6: [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(COMP_DIR, p+1); data/glimpse-4.18.7/agrep/agrep.c:2697:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(Pattern, (argv)[0]); data/glimpse-4.18.7/agrep/agrep.c:2699:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). else strcat(Pattern, argv[0]); data/glimpse-4.18.7/agrep/agrep.c:2705:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(Pattern, p+1); data/glimpse-4.18.7/agrep/agrep.c:2707:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). else strcat (Pattern, p+1); data/glimpse-4.18.7/agrep/agrep.c:2728:6: [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(Pattern, argv[0]); data/glimpse-4.18.7/agrep/agrep.c:2748:6: [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 (Pattern, p+1); data/glimpse-4.18.7/agrep/agrep.c:2800:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(PAT_FILE_NAME, argv[0]); data/glimpse-4.18.7/agrep/agrep.c:2851:6: [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(multibuf, argv[0]); data/glimpse-4.18.7/agrep/agrep.c:3019: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(FREQ_FILE, COMP_DIR); data/glimpse-4.18.7/agrep/agrep.c:3021: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(FREQ_FILE, DEF_FREQ_FILE); data/glimpse-4.18.7/agrep/agrep.c:3022: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(HASH_FILE, COMP_DIR); data/glimpse-4.18.7/agrep/agrep.c:3024: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(HASH_FILE, DEF_HASH_FILE); data/glimpse-4.18.7/agrep/agrep.c:3025: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(STRING_FILE, COMP_DIR); data/glimpse-4.18.7/agrep/agrep.c:3027: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(STRING_FILE, DEF_STRING_FILE); data/glimpse-4.18.7/agrep/agrep.c:3053: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(Pattern, *argv); data/glimpse-4.18.7/agrep/agrep.c:3095:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(Textfiles[Numfiles++], *argv++); data/glimpse-4.18.7/agrep/agrep.c:3272:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(Textfiles[Numfiles++], *((char **)input)); data/glimpse-4.18.7/agrep/agrep.c:3291: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(OldPattern, Pattern); data/glimpse-4.18.7/agrep/agrep.c:3295: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(old_D_pat, D_pattern); data/glimpse-4.18.7/agrep/agrep.c:3305:6: [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(tc_D_pattern, D_pattern); data/glimpse-4.18.7/agrep/agrep.c:3513:10: [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). else strcpy(CurrentFileName, file_list[i]); data/glimpse-4.18.7/agrep/agrep.c:3722:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(old_D_pat, D_pattern); data/glimpse-4.18.7/agrep/agrep.c:3732:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, file_list[i]); data/glimpse-4.18.7/agrep/agrep.c:3784:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, file_list[i]); data/glimpse-4.18.7/agrep/asplit.c:254: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(n->data.leaf.value, oldtokenbuf); data/glimpse-4.18.7/agrep/asplit.c:380: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(&pat_buf[*pat_ptr], aterminals[first].data.leaf.value); data/glimpse-4.18.7/agrep/delim.c:15: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(temp, src); data/glimpse-4.18.7/agrep/dummysyscalls.c:42: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(temp, name); data/glimpse-4.18.7/agrep/follow.c:30:16: [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). return strcat(strcat(strcpy(s1, ".*("), s), ")"); data/glimpse-4.18.7/agrep/preprocess.c:98:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tc_D_pattern, D_pattern); data/glimpse-4.18.7/agrep/preprocess.c:114: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(temp, D_pattern); data/glimpse-4.18.7/agrep/preprocess.c:121: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(temp, Pattern); data/glimpse-4.18.7/agrep/preprocess.c:135: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(temp, Pattern); data/glimpse-4.18.7/agrep/preprocess.c:186: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(D_pattern, old_D_pat); data/glimpse-4.18.7/agrep/preprocess.c:341: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(old_pat, Pattern); /* do real change to the Pattern to be returned */ data/glimpse-4.18.7/agrep/recursive.c:67: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(name_buf, argv[i]); data/glimpse-4.18.7/agrep/recursive.c:125: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(file_list[fdx++], name); data/glimpse-4.18.7/agrep/recursive.c:165: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(nbp, dp->d_name); data/glimpse-4.18.7/communicate.c:261: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(reqbuf+ptr, argv[i]); data/glimpse-4.18.7/communicate.c:327: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((*pargv)[i], line); data/glimpse-4.18.7/communicate.c:332: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((*pargv)[i], reqbuf+ptr); data/glimpse-4.18.7/compress/cast.c:790: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(outname, COMP_SUFFIX); data/glimpse-4.18.7/compress/cast.c:791:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(outname, R_OK)) { /* output file exists */ data/glimpse-4.18.7/compress/hash.c:94: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(e->word, (char *)word); data/glimpse-4.18.7/compress/hash.c:235: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(e->word, (char *)word); data/glimpse-4.18.7/compress/hash.c:399:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(word, dummybuf); data/glimpse-4.18.7/compress/hash.c:426:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(word, dummybuf); data/glimpse-4.18.7/compress/hash.c:540:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "%s.index", filename); data/glimpse-4.18.7/compress/hash.c:546:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "%s.%d", filename, pid); data/glimpse-4.18.7/compress/hash.c:562:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf((const char *)buf, "%d %d %s\n", &hashindex, &wordindex, word); data/glimpse-4.18.7/compress/hash.c:574: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 *)prev_word, (char *)&buf[i]); data/glimpse-4.18.7/compress/hash.c:591:4: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf((const char *)buf, "%d %d %s\n", &hashindex, &wordindex, word); data/glimpse-4.18.7/compress/hash.c:603: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). strcpy((char *)prev_word, (char *)&buf[i]); data/glimpse-4.18.7/compress/hash.c:610:4: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf((const char *)buf, "%d %d %s\n", &hashindex, &wordindex, word); data/glimpse-4.18.7/compress/hash.c:622: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). strcpy((char *)prev_word, (char *)&buf[i]); data/glimpse-4.18.7/compress/hash.c:635:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "exec %s '%s.%d' '%s'\n", SYSTEM_MV, tescapesinglequote(filename, es1), pid, tescapesinglequote(filename, es2)); data/glimpse-4.18.7/compress/hash.c:636:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system((const char *)buf); data/glimpse-4.18.7/compress/main_cast.c:104: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(comp_dir, argv[i+1]); data/glimpse-4.18.7/compress/main_cast.c:119: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(hash_file, comp_dir); data/glimpse-4.18.7/compress/main_cast.c:121: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(hash_file, DEF_HASH_FILE); data/glimpse-4.18.7/compress/main_cast.c:122: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(freq_file, comp_dir); data/glimpse-4.18.7/compress/main_cast.c:124: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(freq_file, DEF_FREQ_FILE); data/glimpse-4.18.7/compress/main_cast.c:139: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(name, filev[i]); data/glimpse-4.18.7/compress/main_tbuild.c:45:31: [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). else if (argv[i][1] == 'H') strcpy(comp_dir, argv[++i]); data/glimpse-4.18.7/compress/main_uncast.c:108: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(comp_dir, argv[i+1]); data/glimpse-4.18.7/compress/main_uncast.c:123: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(string_file, comp_dir); data/glimpse-4.18.7/compress/main_uncast.c:125: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(string_file, DEF_STRING_FILE); data/glimpse-4.18.7/compress/main_uncast.c:126: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(freq_file, comp_dir); data/glimpse-4.18.7/compress/main_uncast.c:128: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(freq_file, DEF_FREQ_FILE); data/glimpse-4.18.7/compress/main_uncast.c:150: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(name, filev[i]); data/glimpse-4.18.7/compress/misc.c:255:13: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (1 != fscanf(fp, "%s\n", e->word)) { data/glimpse-4.18.7/compress/quick.c:78:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.index", hash_file); data/glimpse-4.18.7/compress/quick.c:121: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(old_freq_file, freq_file); data/glimpse-4.18.7/compress/quick.c:122: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(old_hash_file, hash_file); data/glimpse-4.18.7/compress/quick.c:180:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.index", string_file); data/glimpse-4.18.7/compress/quick.c:218: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(old_freq_file, freq_file); data/glimpse-4.18.7/compress/quick.c:219: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(old_string_file, string_file); data/glimpse-4.18.7/compress/string.c:97:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(word, dummybuf); data/glimpse-4.18.7/compress/string.c:118:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(word, dummybuf); data/glimpse-4.18.7/compress/string.c:229:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s.index", filename); data/glimpse-4.18.7/compress/string.c:235:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s.%d", filename, pid); data/glimpse-4.18.7/compress/string.c:277:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "exec %s %s.%d %s\n", SYSTEM_MV, tescapesinglequote(filename, es1), pid, tescapesinglequote(filename, es2)); data/glimpse-4.18.7/compress/string.c:278:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(buf); data/glimpse-4.18.7/compress/tbuild.c:51:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hash_file, comp_dir); data/glimpse-4.18.7/compress/tbuild.c:53:9: [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(hash_file, DEF_HASH_FILE); data/glimpse-4.18.7/compress/tbuild.c:54:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(freq_file, comp_dir); data/glimpse-4.18.7/compress/tbuild.c:56:9: [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(freq_file, DEF_FREQ_FILE); data/glimpse-4.18.7/compress/tbuild.c:57:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(string_file, comp_dir); data/glimpse-4.18.7/compress/tbuild.c:59:9: [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(string_file, DEF_STRING_FILE); data/glimpse-4.18.7/compress/tbuild.c:60:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(index_file, comp_dir); data/glimpse-4.18.7/compress/tbuild.c:62:9: [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(index_file, DEF_INDEX_FILE); data/glimpse-4.18.7/compress/tbuild.c:152:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -n -r /tmp/temp%d > /tmp/sort%d\n", SYSTEM_SORT, pid, pid); data/glimpse-4.18.7/compress/tbuild.c:153:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:154:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s /tmp/temp%d\n", SYSTEM_RM, pid); data/glimpse-4.18.7/compress/tbuild.c:155:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:156:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -%d /tmp/sort%d > /tmp/temp%d\n", SYSTEM_HEAD, MAX_WORDS, pid, pid); data/glimpse-4.18.7/compress/tbuild.c:157:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:169:12: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (3 != fscanf(tempfp, "%d %d %s\n", &dummy, &offset, s)) data/glimpse-4.18.7/compress/tbuild.c:175: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(e->word, (char *)s); data/glimpse-4.18.7/compress/tbuild.c:193:12: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (3 != fscanf(tempfp, "%d %d %s", &dummy, &offset, s)) break; data/glimpse-4.18.7/compress/tbuild.c:210: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((char *)rands, (char *)s); data/glimpse-4.18.7/compress/tbuild.c:248:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:254:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f /tmp/sort%d.a < '%s' > /tmp/sort%d\n", SYSTEM_AWK, pid, tescapesinglequote(hash_file, es1), pid); data/glimpse-4.18.7/compress/tbuild.c:255:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:256:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -d -f /tmp/sort%d > /tmp/temp%d\n", SYSTEM_SORT, pid, pid); data/glimpse-4.18.7/compress/tbuild.c:257:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:264:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", "BEGIN {}\n{print $3 \" \" NR-1 \" \" $1}\nEND {}\n"); data/glimpse-4.18.7/compress/tbuild.c:269:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f /tmp/sort%d.a < /tmp/temp%d > '%s'\n", SYSTEM_AWK, pid, pid, tescapesinglequote(hash_file, es1)); /* reorder and put in new word numbers */ data/glimpse-4.18.7/compress/tbuild.c:270:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:282:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", "BEGIN {}\n{print $3}\nEND {}\n"); data/glimpse-4.18.7/compress/tbuild.c:288:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/tbuild.c:290:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f /tmp/sort%d.a < '%s' > '%s'\n", SYSTEM_AWK, pid, tescapesinglequote(hash_file, es1), tescapesinglequote(string_file, es2)); data/glimpse-4.18.7/compress/tbuild.c:291:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/compress/trecursive.c:58: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(buf, *++argv); data/glimpse-4.18.7/compress/trecursive.c:108: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(nbp, dp->d_name); data/glimpse-4.18.7/compress/uncast.c:585:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(outname, R_OK)) { data/glimpse-4.18.7/get_filename.c:307: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(tempfile, INDEX_DIR); data/glimpse-4.18.7/get_filename.c:309: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(tempfile, NAME_LIST); data/glimpse-4.18.7/get_filename.c:349: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(tempfile, INDEX_DIR); data/glimpse-4.18.7/get_filename.c:351: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(tempfile, NAME_LIST_INDEX); data/glimpse-4.18.7/get_index.c:1062:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char*)s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/get_index.c:1141: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(index_argv[patindex], pat_list[i]); /* i-th pattern in its right position */ data/glimpse-4.18.7/glimpse/communicate.c:261: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(reqbuf+ptr, argv[i]); data/glimpse-4.18.7/glimpse/communicate.c:327: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((*pargv)[i], line); data/glimpse-4.18.7/glimpse/communicate.c:332: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((*pargv)[i], reqbuf+ptr); data/glimpse-4.18.7/glimpse/get_filename.c:307: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(tempfile, INDEX_DIR); data/glimpse-4.18.7/glimpse/get_filename.c:309: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(tempfile, NAME_LIST); data/glimpse-4.18.7/glimpse/get_filename.c:349: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(tempfile, INDEX_DIR); data/glimpse-4.18.7/glimpse/get_filename.c:351: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(tempfile, NAME_LIST_INDEX); data/glimpse-4.18.7/glimpse/get_index.c:1062:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char*)s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/glimpse/get_index.c:1141: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(index_argv[patindex], pat_list[i]); /* i-th pattern in its right position */ data/glimpse-4.18.7/glimpse/main.c:481:44: [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). if (getcwd(INDEX_DIR, MAXNAME-1) == NULL) strcpy(INDEX_DIR, indexdir); data/glimpse-4.18.7/glimpse/main.c:486:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", INDEX_FILE); data/glimpse-4.18.7/glimpse/main.c:499:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", P_TABLE); data/glimpse-4.18.7/glimpse/main.c:508:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", DEF_TIME_FILE); data/glimpse-4.18.7/glimpse/main.c:511:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.index", DEF_TIME_FILE); data/glimpse-4.18.7/glimpse/main.c:538:2: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(indexfp, "%%%d%s\n", &StructuredIndex, old_rdelim); data/glimpse-4.18.7/glimpse/main.c:544: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(rdelim, old_rdelim); data/glimpse-4.18.7/glimpse/main.c:559:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", MINI_FILE); data/glimpse-4.18.7/glimpse/main.c:751: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(&GProgname[0], argv[0]); data/glimpse-4.18.7/glimpse/main.c:803:6: [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(indexdir, argv[0]); data/glimpse-4.18.7/glimpse/main.c:807:6: [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(indexdir, p+1); data/glimpse-4.18.7/glimpse/main.c:824:6: [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(SERV_HOST, argv[0]); data/glimpse-4.18.7/glimpse/main.c:828:6: [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(SERV_HOST, p+1); data/glimpse-4.18.7/glimpse/main.c:1012: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(TMP_FILE_NAME,TEMP_DIR) ; data/glimpse-4.18.7/glimpse/main.c:1017: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(serv_addr.sun_path, TMP_FILE_NAME); /* < 108 ! */ data/glimpse-4.18.7/glimpse/main.c:1199: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(TMP_FILE_NAME,TEMP_DIR) ; data/glimpse-4.18.7/glimpse/main.c:1201: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(serv_addr.sun_path, TMP_FILE_NAME); /* < 108 ! */ data/glimpse-4.18.7/glimpse/main.c:1225:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errbuf, "glimpse: Cannot contact glimpseserver: %s, port %d:", SERV_HOST, SERV_PORT); data/glimpse-4.18.7/glimpse/main.c:1351:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempfile, "%s/.glimpse_tmp.%d", TEMP_DIR, getpid());\ data/glimpse-4.18.7/glimpse/main.c:1353:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname[0], "%s/.glimpse_apply.%d", TEMP_DIR, getpid());\ data/glimpse-4.18.7/glimpse/main.c:1387: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(&GProgname[0], argv[0]); data/glimpse-4.18.7/glimpse/main.c:1452:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempfile, "%s/.glimpse_tmp.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/main.c:1476: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(agrep_argv[agrep_argc], argv[0]); /* copy the name of the program anyway */ data/glimpse-4.18.7/glimpse/main.c:1572:6: [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(FileOpt, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1579:6: [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(FileOpt, p+1); data/glimpse-4.18.7/glimpse/main.c:1611:6: [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(indexdir, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1617:6: [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(indexdir, p+1); data/glimpse-4.18.7/glimpse/main.c:1623:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc], indexdir); data/glimpse-4.18.7/glimpse/main.c:1632:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(TEMP_FILE, INDEX_DIR); data/glimpse-4.18.7/glimpse/main.c:1641:6: [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(TEMP_FILE, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1642:6: [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(temp_file, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1646:6: [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(TEMP_FILE, p+1); data/glimpse-4.18.7/glimpse/main.c:1647:6: [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(temp_file, p+1); data/glimpse-4.18.7/glimpse/main.c:1674:6: [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(TEMP_DIR, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1678:6: [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(TEMP_DIR, p+1); data/glimpse-4.18.7/glimpse/main.c:1680:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempfile, "%s/.glimpse_tmp.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/main.c:1735:6: [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(SERV_HOST, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1741:6: [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(SERV_HOST, p+1); data/glimpse-4.18.7/glimpse/main.c:1782:6: [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(bitfield_file, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1786:6: [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(bitfield_file, p+1); data/glimpse-4.18.7/glimpse/main.c:1801:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&bitfield_file[iiii-1], &bitfield_file[iiii]); data/glimpse-4.18.7/glimpse/main.c:1824:6: [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(temp_bitfield_file, bitfield_file); data/glimpse-4.18.7/glimpse/main.c:1825:6: [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(bitfield_file, temp_bitfield_file); data/glimpse-4.18.7/glimpse/main.c:1839:6: [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(filenames_file, argv[0]); data/glimpse-4.18.7/glimpse/main.c:1843:6: [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(filenames_file, p+1); data/glimpse-4.18.7/glimpse/main.c:1848:6: [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(temp_filenames_file, filenames_file); data/glimpse-4.18.7/glimpse/main.c:1849:6: [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(filenames_file, temp_filenames_file); data/glimpse-4.18.7/glimpse/main.c:1895:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc] + 1, p); data/glimpse-4.18.7/glimpse/main.c:1959:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc], argv[0]); data/glimpse-4.18.7/glimpse/main.c:1982:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc], p+1); data/glimpse-4.18.7/glimpse/main.c:2028: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(agrep_argv[agrep_argc], argv[0]); data/glimpse-4.18.7/glimpse/main.c:2119: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(APattern, GPattern); data/glimpse-4.18.7/glimpse/main.c:2127: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(terminals[0].data.leaf.value, GPattern); data/glimpse-4.18.7/glimpse/main.c:2152: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(agrep_argv[patindex], APattern); data/glimpse-4.18.7/glimpse/main.c:2244:6: [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(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/glimpse/main.c:2246:6: [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(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/glimpse/main.c:2251:6: [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(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/glimpse/main.c:2258:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/glimpse/main.c:2262:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(index_argv[index_argc], "%s", INDEX_FILE); data/glimpse-4.18.7/glimpse/main.c:2532: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(index_argv[0], GProgname); data/glimpse-4.18.7/glimpse/main.c:2693:12: [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). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/glimpse/main.c:2722:12: [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). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/glimpse/main.c:2761:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname[0], "%s/.glimpse_apply.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/main.c:2768:12: [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). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/glimpse/main.c:2813:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/glimpse/main.c:2884:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/glimpse/main.c:2948:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname[0], "%s/.glimpse_apply.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/main.c:2971:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/glimpse/main.c:3177:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec cat %s\n", outfile); data/glimpse-4.18.7/glimpse/main.c:3178:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/glimpse/main.c:3187:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_storeoutput.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/main.c:3447:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec cat %s/.glimpse_storeoutput.%d\n", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/main.c:3448:4: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/glimpse/main.c:3450:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_storeoutput.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/main.c:3463:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_storeoutput.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/glimpse/split.c:311: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(&apattern[*apatptr], n->data.leaf.value); data/glimpse-4.18.7/glimpse/split.c:387: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(&apattern[*apatptr], n->data.leaf.value); data/glimpse-4.18.7/glimpse/split.c:586: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). strcpy(pat_list[num_pat], word); data/glimpse-4.18.7/glimpse/split.c:600: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(&pat_buf[pat_ptr], pat_list[i]); data/glimpse-4.18.7/index/build_in.c:180:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I2); data/glimpse-4.18.7/index/build_in.c:624:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -z %d '%s/%s' > '%s/%s'\n", SYSTEM_SORT, maxsortlinelen, escapesinglequote(INDEX_DIR, es1), I2, escapesinglequote(INDEX_DIR, es2), O2); data/glimpse-4.18.7/index/build_in.c:626:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -T '%s' -z %d '%s/%s' > '%s/%s'\n", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), maxsortlinelen, escapesinglequote(INDEX_DIR, es2), I2, escapesinglequote(INDEX_DIR, es3), O2); data/glimpse-4.18.7/index/build_in.c:630:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' > '%s/%s'\n", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), I2, escapesinglequote(INDEX_DIR, es2), O2); data/glimpse-4.18.7/index/build_in.c:632:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -T '%s' '%s/%s' > '%s/%s'\n", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), I2, escapesinglequote(INDEX_DIR, es3), O2); data/glimpse-4.18.7/index/build_in.c:639:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if((ret=system(s)) != 0) { data/glimpse-4.18.7/index/build_in.c:640:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "system('%s') failed at:\n\t File=%s, Line=%d, Errno=%d", s, __FILE__, __LINE__, errno); data/glimpse-4.18.7/index/build_in.c:650:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, O2); data/glimpse-4.18.7/index/build_in.c:651:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, I2); data/glimpse-4.18.7/index/build_in.c:654:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' '%s/%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), O2, escapesinglequote(INDEX_DIR, es2), I2); data/glimpse-4.18.7/index/build_in.c:655:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:657:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(sync_path); /* sync() has a bug */ data/glimpse-4.18.7/index/build_in.c:660:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -10 '%s/%s'\n", SYSTEM_HEAD, escapesinglequote(INDEX_DIR, es1), I2); data/glimpse-4.18.7/index/build_in.c:661:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:669:18: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if(IndexNumber) sprintf(s, "exec %s %%1234567890 > '%s/%s'\n", SYSTEM_ECHO, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:670:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(s, "exec %s %% > '%s/%s'\n", SYSTEM_ECHO, escapesinglequote(INDEX_DIR,es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:671:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:675:23: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if (ByteLevelIndex) sprintf(s, "exec %s %%-%d >> '%s/%s'\n", SYSTEM_ECHO, file_num, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:676:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(s, "exec %s %%%d >> '%s/%s'\n", SYSTEM_ECHO, file_num, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:678:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(s, "exec %s %%0 >> '%s/%s'\n", SYSTEM_ECHO, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:679:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:682:23: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if (StructuredIndex) sprintf(s, "exec %s %%%d >> '%s/%s'\n", SYSTEM_ECHO, attr_num, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:683:29: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else if (RecordLevelIndex) sprintf(s, "exec %s %%-2 %s >> '%s/%s'\n", SYSTEM_ECHO, old_rdelim, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:684:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(s, "exec %s %%0 >> '%s/%s'\n", SYSTEM_ECHO, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:685:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:688:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -l %s/.glimpse*\n", SYSTEM_LS, escapesinglequote(INDEX_DIR, es1)); data/glimpse-4.18.7/index/build_in.c:689:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:691:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' >> '%s/%s'\n", SYSTEM_CAT, escapesinglequote(INDEX_DIR, es1), I2, escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:692:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:695:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I2); data/glimpse-4.18.7/index/build_in.c:698:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s'\n", SYSTEM_RM, escapesinglequote(INDEX_DIR, es1), I2); data/glimpse-4.18.7/index/build_in.c:699:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:703:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -l %s/.glimpse*\n", SYSTEM_LS, escapesinglequote(INDEX_DIR, es1)); data/glimpse-4.18.7/index/build_in.c:704:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:708:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -10 '%s/%s'\n", SYSTEM_HEAD, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:709:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:712:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(sync_path); /* sync() has a bug */ data/glimpse-4.18.7/index/build_in.c:717:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:722:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I2); data/glimpse-4.18.7/index/build_in.c:727:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I3); data/glimpse-4.18.7/index/build_in.c:754:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(sync_path); /* sync() has a bug */ data/glimpse-4.18.7/index/build_in.c:759:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I3); data/glimpse-4.18.7/index/build_in.c:760:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:763:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' '%s/%s'", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), I3, escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:764:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:769:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -l %s/.glimpse*", SYSTEM_LS, escapesinglequote(INDEX_DIR, es1)); data/glimpse-4.18.7/index/build_in.c:770:20: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. printf("%d\n", system(s)); data/glimpse-4.18.7/index/build_in.c:774:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -10 '%s/%s'\n", SYSTEM_HEAD, escapesinglequote(INDEX_DIR, es1), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:775:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/build_in.c:849:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname, "%s/.glimpse_apply.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/build_in.c:1053:46: [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). if (BuildDictionary && CompressAfterBuild) strcpy(LIST_GET(name_list, i), outname); /* name of clear file will be smaller, so enough space */ data/glimpse-4.18.7/index/build_in.c:1059:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname, "%s/.glimpse_apply.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/build_in.c:1309:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tp->word, word); data/glimpse-4.18.7/index/build_in.c:1557: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(merge_index_buf, src_index_buf); /* save the word itself */ data/glimpse-4.18.7/index/build_in.c:1611: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(merge_index_buf, dest_index_buf); /* save the word itself */ data/glimpse-4.18.7/index/build_in.c:1787:21: [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(merge_index_buf, src_index_buf); data/glimpse-4.18.7/index/build_in.c:2011:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:2016:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_merge.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/build_in.c:2029:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(i_in, "%%%d%s\n", &structuredindex, temp_rdelim); data/glimpse-4.18.7/index/build_in.c:2227:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_merge.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/build_in.c:2228:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:2231:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/.glimpse_merge.%d' '%s/%s'", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), getpid(), escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/build_in.c:2232:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/convert.c:578:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", glimpseindex_dir, INDEX_FILE); data/glimpse-4.18.7/index/convert.c:606:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s/%s", glimpseindex_dir, NAME_LIST); data/glimpse-4.18.7/index/convert.c:624:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s/%s", glimpseindex_dir, NAME_LIST_INDEX); data/glimpse-4.18.7/index/convert.c:649:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s/%s", glimpseindex_dir, NAME_HASH); data/glimpse-4.18.7/index/convert.c:678:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s/%s", glimpseindex_dir, NAME_HASH_INDEX); data/glimpse-4.18.7/index/convert.c:762:4: [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(realname, filename_prefix); data/glimpse-4.18.7/index/convert.c:763:4: [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(realname, &name[lastslash+1]); data/glimpse-4.18.7/index/convert.c:794:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "mv -f %s %s", outname, realname); data/glimpse-4.18.7/index/convert.c:795:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(s) == -1) fprintf(stderr, "Errno=%d -- could not execute: %s\n", errno, s); data/glimpse-4.18.7/index/dir.c:356: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(t1, outname); data/glimpse-4.18.7/index/dir.c:389: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(t1, name); data/glimpse-4.18.7/index/dir.c:391:8: [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(t1, xinfo); data/glimpse-4.18.7/index/dir.c:415: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(t1, name); data/glimpse-4.18.7/index/dir.c:417:4: [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(t1, xinfo); data/glimpse-4.18.7/index/dir.c:421: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(t1, name); data/glimpse-4.18.7/index/dir.c:471:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(t1, name); data/glimpse-4.18.7/index/dir.c:473:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(t1, xinfo); data/glimpse-4.18.7/index/dir.c:477:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(t1, name); data/glimpse-4.18.7/index/glimpse.c:118:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "exec whereis sync > %s/zz.%d", TEMP_DIR,getpid()); data/glimpse-4.18.7/index/glimpse.c:120:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(S); data/glimpse-4.18.7/index/glimpse.c:121:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "%s/zz.%d", TEMP_DIR,getpid()); data/glimpse-4.18.7/index/glimpse.c:127:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "%s/zz.%d", TEMP_DIR,getpid()); data/glimpse-4.18.7/index/glimpse.c:134:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/zz.%d", TEMP_DIR,getpid()); data/glimpse-4.18.7/index/glimpse.c:139:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(S, "%s%s", s1, s2); data/glimpse-4.18.7/index/glimpse.c:153: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(sync_path, s2); data/glimpse-4.18.7/index/glimpse.c:243: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(old_rdelim, rdelim); data/glimpse-4.18.7/index/glimpse.c:454:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s/%s", INDEX_DIR, NAME_LIST); data/glimpse-4.18.7/index/glimpse.c:459:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s/%s.tmp", INDEX_DIR, NAME_LIST_INDEX); data/glimpse-4.18.7/index/glimpse.c:478:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s.tmp", INDEX_DIR, NAME_LIST_INDEX); data/glimpse-4.18.7/index/glimpse.c:479:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, NAME_LIST_INDEX); data/glimpse-4.18.7/index/glimpse.c:482:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "mv %s/%s.tmp %s/%s", INDEX_DIR, NAME_LIST_INDEX, INDEX_DIR, NAME_LIST_INDEX); data/glimpse-4.18.7/index/glimpse.c:483:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return system(buffer); data/glimpse-4.18.7/index/glimpse.c:576:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(freq_file, INDEX_DIR); data/glimpse-4.18.7/index/glimpse.c:578:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(freq_file, DEF_FREQ_FILE); data/glimpse-4.18.7/index/glimpse.c:579:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hash_file, INDEX_DIR); data/glimpse-4.18.7/index/glimpse.c:581:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(hash_file, DEF_HASH_FILE); data/glimpse-4.18.7/index/glimpse.c:582:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(string_file, INDEX_DIR); data/glimpse-4.18.7/index/glimpse.c:584:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(string_file, DEF_STRING_FILE); data/glimpse-4.18.7/index/glimpse.c:587:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, DEF_TIME_FILE); data/glimpse-4.18.7/index/glimpse.c:594:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, DEF_LOG_FILE); data/glimpse-4.18.7/index/glimpse.c:601:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, DEF_MESSAGE_FILE); data/glimpse-4.18.7/index/glimpse.c:607:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, DEF_STAT_FILE); data/glimpse-4.18.7/index/glimpse.c:636:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_index", INDEX_DIR); data/glimpse-4.18.7/index/glimpse.c:637:10: [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(s, R_OK)) { data/glimpse-4.18.7/index/glimpse.c:638:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:644:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/glimpse.c:645:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:648:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), INDEX_FILE, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:649:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:652:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, P_TABLE); data/glimpse-4.18.7/index/glimpse.c:653:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:656:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), P_TABLE, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:657:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:660:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_LIST); data/glimpse-4.18.7/index/glimpse.c:661:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:664:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), NAME_LIST, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:665:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:668:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_LIST_INDEX); data/glimpse-4.18.7/index/glimpse.c:669:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:672:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), NAME_LIST_INDEX, escapesinglequote(INDEX_DIR, es1), pid); data/glimpse-4.18.7/index/glimpse.c:673:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:676:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_HASH); data/glimpse-4.18.7/index/glimpse.c:677:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:680:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), NAME_HASH, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:681:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:684:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_HASH_INDEX); data/glimpse-4.18.7/index/glimpse.c:685:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:688:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), NAME_HASH_INDEX, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:689:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:692:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/glimpse.c:693:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:696:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), MINI_FILE, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:697:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:700:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, DEF_STAT_FILE); data/glimpse-4.18.7/index/glimpse.c:701:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:704:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), DEF_STAT_FILE, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:705:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:708:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_attributes", INDEX_DIR); data/glimpse-4.18.7/index/glimpse.c:709:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(s, R_OK)) { data/glimpse-4.18.7/index/glimpse.c:711:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, ATTRIBUTE_FILE); data/glimpse-4.18.7/index/glimpse.c:712:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:715:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/%s' '%s/.glimpse_tempdir.%d'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), ATTRIBUTE_FILE, escapesinglequote(INDEX_DIR, es2), pid); data/glimpse-4.18.7/index/glimpse.c:716:6: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:722:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_quick", INDEX_DIR); data/glimpse-4.18.7/index/glimpse.c:723:10: [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(s, R_OK)) { /* there are previous cast dictionaries */ data/glimpse-4.18.7/index/glimpse.c:725:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_backup.%x", INDEX_DIR, backup); data/glimpse-4.18.7/index/glimpse.c:730:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_quick' '%s/.glimpse_backup.%x'\n", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), backup); data/glimpse-4.18.7/index/glimpse.c:731:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:732:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_compress' '%s/.glimpse_backup.%x'\n", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), backup); data/glimpse-4.18.7/index/glimpse.c:733:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:734:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_compress.index' '%s/.glimpse_backup.%x'\n", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), backup); data/glimpse-4.18.7/index/glimpse.c:735:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:736:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_uncompress' '%s/.glimpse_backup.%x'\n", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), backup); data/glimpse-4.18.7/index/glimpse.c:737:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:738:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_uncompress.index' '%s/.glimpse_backup.%x'\n", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), backup); data/glimpse-4.18.7/index/glimpse.c:739:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:764:6: [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(name, LIST_GET(name_list, i)); data/glimpse-4.18.7/index/glimpse.c:771:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/.glimpse_index", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:772:10: [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(s, R_OK)) { data/glimpse-4.18.7/index/glimpse.c:774:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/glimpse.c:775:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, INDEX_FILE); data/glimpse-4.18.7/index/glimpse.c:777:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, P_TABLE); data/glimpse-4.18.7/index/glimpse.c:778:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, P_TABLE); data/glimpse-4.18.7/index/glimpse.c:780:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, NAME_LIST); data/glimpse-4.18.7/index/glimpse.c:781:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, NAME_LIST); data/glimpse-4.18.7/index/glimpse.c:783:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, NAME_LIST_INDEX); data/glimpse-4.18.7/index/glimpse.c:784:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, NAME_LIST_INDEX); data/glimpse-4.18.7/index/glimpse.c:786:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, NAME_HASH); data/glimpse-4.18.7/index/glimpse.c:787:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, NAME_HASH); data/glimpse-4.18.7/index/glimpse.c:789:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, NAME_HASH_INDEX); data/glimpse-4.18.7/index/glimpse.c:790:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, NAME_HASH_INDEX); data/glimpse-4.18.7/index/glimpse.c:792:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/glimpse.c:793:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, MINI_FILE); data/glimpse-4.18.7/index/glimpse.c:795:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, DEF_STAT_FILE); data/glimpse-4.18.7/index/glimpse.c:796:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, DEF_STAT_FILE); data/glimpse-4.18.7/index/glimpse.c:798:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, ATTRIBUTE_FILE); data/glimpse-4.18.7/index/glimpse.c:799:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d/%s", INDEX_DIR, pid, ATTRIBUTE_FILE); data/glimpse-4.18.7/index/glimpse.c:803:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, escapesinglequote(INDEX_FILE, es2), INDEX_DIR); data/glimpse-4.18.7/index/glimpse.c:804:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:805:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, P_TABLE, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:806:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:807:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, NAME_LIST, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:808:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:809:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, NAME_LIST_INDEX, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:810:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:811:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, NAME_HASH, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:812:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:813:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, NAME_HASH_INDEX, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:814:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:815:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, MINI_FILE, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:816:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:817:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, DEF_STAT_FILE, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:818:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:819:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -f '%s/.glimpse_tempdir.%d/%s' '%s'\n", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), pid, ATTRIBUTE_FILE, escapesinglequote(INDEX_DIR, es2)); data/glimpse-4.18.7/index/glimpse.c:820:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:822:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_tempdir.%d", INDEX_DIR, pid); data/glimpse-4.18.7/index/glimpse.c:834:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/glimpse.c:864:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_LIST); data/glimpse-4.18.7/index/glimpse.c:870:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, P_TABLE); data/glimpse-4.18.7/index/glimpse.c:917:6: [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(old_rdelim, temp_rdelim); data/glimpse-4.18.7/index/glimpse.c:918:6: [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(rdelim, old_rdelim); data/glimpse-4.18.7/index/glimpse.c:1012:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, P_TABLE); data/glimpse-4.18.7/index/glimpse.c:1046:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -l .glimpse_* > %s/%d\n", SYSTEM_LS, TEMP_DIR,pid); data/glimpse-4.18.7/index/glimpse.c:1047:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/glimpse.c:1048:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%d", TEMP_DIR,pid); data/glimpse-4.18.7/index/glimpse.c:1067:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I1); data/glimpse-4.18.7/index/glimpse.c:1069:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I2); data/glimpse-4.18.7/index/glimpse.c:1071:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, I3); data/glimpse-4.18.7/index/glimpse.c:1073:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, O1); data/glimpse-4.18.7/index/glimpse.c:1075:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, O2); data/glimpse-4.18.7/index/glimpse.c:1077:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, O3); data/glimpse-4.18.7/index/glimpse.c:1079:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_apply.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/io.c:107: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(np, buffer); data/glimpse-4.18.7/index/io.c:180:2: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(fp, "%s\n%%%d\n%%%d%s\n", buf, num, attr, delim); data/glimpse-4.18.7/index/io.c:328:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command, "exec %s '%s' > '%s'", filter_command[filter_number], data/glimpse-4.18.7/index/io.c:334:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system(command); data/glimpse-4.18.7/index/io.c:388:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", index_dir, FILTER_FILE); data/glimpse-4.18.7/index/io.c:472: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(name+1, tempinname); data/glimpse-4.18.7/index/io.c:473: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(prevoutname, tempinname); data/glimpse-4.18.7/index/io.c:474: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(newoutname, outname); data/glimpse-4.18.7/index/io.c:497:6: [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(tempoutname, prevoutname); data/glimpse-4.18.7/index/io.c:498:6: [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(prevoutname, newoutname); data/glimpse-4.18.7/index/io.c:499:6: [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(newoutname, tempoutname); data/glimpse-4.18.7/index/io.c:502:6: [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(prevoutname, newoutname); data/glimpse-4.18.7/index/io.c:503:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newoutname, "%s.o", prevoutname); data/glimpse-4.18.7/index/io.c:542:6: [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(tempoutname, prevoutname); data/glimpse-4.18.7/index/io.c:543:6: [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(prevoutname, newoutname); data/glimpse-4.18.7/index/io.c:544:6: [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(newoutname, tempoutname); data/glimpse-4.18.7/index/io.c:547:6: [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(prevoutname, newoutname); data/glimpse-4.18.7/index/io.c:548:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newoutname, "%s.o", prevoutname); data/glimpse-4.18.7/index/io.c:556:16: [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). if (ret == 1) strcpy(outname, prevoutname); data/glimpse-4.18.7/index/io.c:890:40: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while ((wordnum < mini_array_len) && (fscanf(minifp, "%s %ld\n", word, &offset) != EOF)) { data/glimpse-4.18.7/index/io.c:893: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((char *)mini_array[wordnum].word, (char *)word); data/glimpse-4.18.7/index/io.c:918:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s.tmp", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/io.c:927:2: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(indexfp, "%%%d%s\n", &attr_num, temp_delim); /* structured index */ data/glimpse-4.18.7/index/io.c:941: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((char *)word, (char *)s); data/glimpse-4.18.7/index/io.c:959:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/io.c:964:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s.tmp", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/io.c:978:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s.tmp", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/io.c:1073:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.tmp", indexfile); data/glimpse-4.18.7/index/io.c:1083:8: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if ( !fscanf(indexfp, "%%%d%s\n", &attr_num, temp_rdelim)) data/glimpse-4.18.7/index/io.c:1110:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s'", SYSTEM_RM, escapesinglequote(indexfile, es1)); data/glimpse-4.18.7/index/io.c:1111:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/io.c:1115:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -n '%s.tmp' > '%s'\n", SYSTEM_SORT, escapesinglequote(indexfile, es1), escapesinglequote(indexfile, es2)); data/glimpse-4.18.7/index/io.c:1117:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -n -T '%s' '%s.tmp' > '%s'\n", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), escapesinglequote(indexfile, es2), escapesinglequote(indexfile, es3)); data/glimpse-4.18.7/index/io.c:1119:7: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. rc = system(s); data/glimpse-4.18.7/index/io.c:1127:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.tmp", indexfile); data/glimpse-4.18.7/index/io.c:1130:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s.tmp'", SYSTEM_RM, escapesinglequote(indexfile, es1)); data/glimpse-4.18.7/index/io.c:1131:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/io.c:1133:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(sync_path); /* sync() has a BUG */ data/glimpse-4.18.7/index/io.c:1144:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.tmp", indexfile); data/glimpse-4.18.7/index/io.c:1151:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/io.c:1210:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s'", SYSTEM_RM, escapesinglequote(indexfile, es1)); data/glimpse-4.18.7/index/io.c:1211:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/io.c:1214:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.tmp", indexfile); data/glimpse-4.18.7/index/io.c:1217:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s.tmp' '%s'\n", SYSTEM_MV, escapesinglequote(indexfile, es1), escapesinglequote(indexfile, es2)); data/glimpse-4.18.7/index/io.c:1218:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/io.c:1220:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(sync_path); /* sync() has a BUG */ data/glimpse-4.18.7/index/io.c:1507: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((*pe)->name, name); data/glimpse-4.18.7/index/partition.c:118:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, PROHIBIT_LIST); data/glimpse-4.18.7/index/partition.c:139:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INCLUDE_LIST); data/glimpse-4.18.7/index/partition.c:185:6: [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(current_dir, dir_name[i]); data/glimpse-4.18.7/index/partition.c:219:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "exec %s -n -r -z %d '%s/%s' > '%s/%s.tmp'\n", SYSTEM_SORT, maxsortlinelen, escapesinglequote(INDEX_DIR, es1), DEF_TIME_FILE, escapesinglequote(INDEX_DIR, es2), DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:221:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "exec %s -n -r -T '%s' -z %d '%s/%s' > '%s/%s.tmp'\n", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), maxsortlinelen, escapesinglequote(INDEX_DIR, es2), DEF_TIME_FILE, escapesinglequote(INDEX_DIR, es3), DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:225:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "exec %s -n -r '%s/%s' > '%s/%s.tmp'\n", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), DEF_TIME_FILE, escapesinglequote(INDEX_DIR, es2), DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:227:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "exec %s -n -r -T '%s' '%s/%s' > '%s/%s.tmp'\n", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), DEF_TIME_FILE, escapesinglequote(INDEX_DIR, es3), DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:234:10: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if((ret=system(S)) != 0) { data/glimpse-4.18.7/index/partition.c:235:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S1, "system('%s') failed at:\n\t File=%s, Line=%d, Errno=%d", S, __FILE__, __LINE__, errno); data/glimpse-4.18.7/index/partition.c:238:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "%s/%s", INDEX_DIR, DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:243:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "%s/%s.tmp", INDEX_DIR, DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:250:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "%s/%s", INDEX_DIR, DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:257:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "%s/%s.index", INDEX_DIR, DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:314:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S, "%s/%s.tmp", INDEX_DIR, DEF_TIME_FILE); data/glimpse-4.18.7/index/partition.c:451:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, PROHIBIT_LIST); data/glimpse-4.18.7/index/partition.c:472:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INCLUDE_LIST); data/glimpse-4.18.7/index/partition.c:536:6: [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(current_dir, dir_name[i]); data/glimpse-4.18.7/index/partition.c:622:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -lg .glimpse_*", SYSTEM_LS); data/glimpse-4.18.7/index/partition.c:623:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:624:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s .glimpse_index", SYSTEM_HEAD); data/glimpse-4.18.7/index/partition.c:625:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:633:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, ATTRIBUTE_FILE); data/glimpse-4.18.7/index/partition.c:641:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, P_TABLE); data/glimpse-4.18.7/index/partition.c:669:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_split.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/partition.c:674:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:686:18: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(i_in, "%%%d%s\n", &structuredindex, temp_rdelim); data/glimpse-4.18.7/index/partition.c:719:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_split.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/partition.c:720:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:723:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/.glimpse_split.%d' '%s/%s'", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), getpid(), escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/partition.c:724:6: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:730:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_split.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/partition.c:735:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:748:16: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(i_in, "%%%d%s\n", &structuredindex, temp_rdelim); data/glimpse-4.18.7/index/partition.c:809:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_split.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/partition.c:810:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:813:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/.glimpse_split.%d' '%s/%s'", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), getpid(), escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/partition.c:814:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:816:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(sync_path); /* sync() has a BUG */ data/glimpse-4.18.7/index/partition.c:817:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:825:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' '%s/%s.prev'", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), NAME_LIST, escapesinglequote(INDEX_DIR, es2), NAME_LIST); data/glimpse-4.18.7/index/partition.c:826:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:827:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' '%s/%s.prev'", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), NAME_LIST_INDEX, escapesinglequote(INDEX_DIR, es2), NAME_LIST_INDEX); data/glimpse-4.18.7/index/partition.c:828:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:830:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_LIST); data/glimpse-4.18.7/index/partition.c:835:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_LIST_INDEX); data/glimpse-4.18.7/index/partition.c:875:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' '%s/%s.prev'", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), NAME_HASH, escapesinglequote(INDEX_DIR, es2), NAME_HASH); data/glimpse-4.18.7/index/partition.c:876:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:877:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' '%s/%s.prev'", SYSTEM_CP, escapesinglequote(INDEX_DIR, es1), NAME_HASH_INDEX, escapesinglequote(INDEX_DIR, es2), NAME_HASH_INDEX); data/glimpse-4.18.7/index/partition.c:878:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:880:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_HASH); data/glimpse-4.18.7/index/partition.c:885:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, NAME_HASH_INDEX); data/glimpse-4.18.7/index/partition.c:923:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -lg .glimpse_*", SYSTEM_LS); data/glimpse-4.18.7/index/partition.c:924:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:925:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s .glimpse_index", SYSTEM_WC); data/glimpse-4.18.7/index/partition.c:926:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:948:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -lg .glimpse_*", SYSTEM_LS); data/glimpse-4.18.7/index/partition.c:949:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:950:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s .glimpse_index", SYSTEM_HEAD); data/glimpse-4.18.7/index/partition.c:951:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:957:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, P_TABLE); data/glimpse-4.18.7/index/partition.c:964:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:969:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_merge.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/partition.c:981:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(i_in, "%%%d%s\n", &structuredindex, temp_rdelim); data/glimpse-4.18.7/index/partition.c:991:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, MINI_FILE); data/glimpse-4.18.7/index/partition.c:994:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s' > '%s/%s.tmp'", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), INDEX_FILE, escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/partition.c:996:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -T '%s' '%s/%s' > '%s/%s.tmp'", SYSTEM_SORT, escapesinglequote(INDEX_DIR, es1), escapesinglequote(INDEX_DIR, es2), INDEX_FILE, escapesinglequote(INDEX_DIR, es3), INDEX_FILE); data/glimpse-4.18.7/index/partition.c:998:4: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:1000:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s.tmp", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:1001:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:1004:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/%s.tmp' '%s/%s'", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), INDEX_FILE, escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/partition.c:1005:4: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:1007:4: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(sync_path); /* sync() has a BUG */ data/glimpse-4.18.7/index/partition.c:1010:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:1070:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_merge.%d", INDEX_DIR, getpid()); data/glimpse-4.18.7/index/partition.c:1071:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s1, "%s/%s", INDEX_DIR, INDEX_FILE); data/glimpse-4.18.7/index/partition.c:1074:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s '%s/.glimpse_merge.%d' '%s/%s'", SYSTEM_MV, escapesinglequote(INDEX_DIR, es1), getpid(), escapesinglequote(INDEX_DIR, es2), INDEX_FILE); data/glimpse-4.18.7/index/partition.c:1075:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:1081:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec %s -lg .glimpse_*", SYSTEM_LS); data/glimpse-4.18.7/index/partition.c:1082:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/partition.c:1083:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(s, "exec %s .glimpse_index"SYSTEM_HEAD); data/glimpse-4.18.7/index/partition.c:1084:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/index/region.c:181: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(dest, oldsrc); data/glimpse-4.18.7/index/region.c:188: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(dest, src); data/glimpse-4.18.7/index/region.c:271: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(e->attribute, temp); data/glimpse-4.18.7/index/utils.c:237: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, tbuf); data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:77: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(value, s); data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:92: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(value, s); data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:116:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "ftp://%s%s%s", sv, pv, fv); data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:118:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "ftp://%s%s/%s", sv, pv, fv); data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:120:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "ftp://%s/%s%s", sv, pv, fv); data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:122:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "ftp://%s/%s/%s", sv, pv, fv); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:52: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(s, *buf); /* copy */ data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:78: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(s, *buf); /* copy */ data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:132: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(url, rootup->url); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:146:4: [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(url, p); data/glimpse-4.18.7/libtemplate/template/print-urlrefs.c:51: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). strcpy(url, s); data/glimpse-4.18.7/libtemplate/template/print-urlrefs.c:58:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(url, "http:/%s%s", thishost, s); data/glimpse-4.18.7/libtemplate/template/print-urlrefs.c:65:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(url, "%s/%s", z, s); data/glimpse-4.18.7/libtemplate/template/template.c:358:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "@%s { %s\n", template->template_type, template->url); data/glimpse-4.18.7/libtemplate/template/template.c:372:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s{%u}:\t", walker->data->attribute, data/glimpse-4.18.7/libtemplate/template/template.c:737:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "Embed<%d>-%s", nembed, walker->data->attribute); data/glimpse-4.18.7/libtemplate/util/harvest.c:35:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(bindir, "%s/bin", s); data/glimpse-4.18.7/libtemplate/util/harvest.c:37:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(bindir, "%s/bin", DEFAULT_HARVEST_HOME); data/glimpse-4.18.7/libtemplate/util/harvest.c:51:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(libdir, "%s/lib", s); data/glimpse-4.18.7/libtemplate/util/harvest.c:53:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(libdir, "%s/lib", DEFAULT_HARVEST_HOME); data/glimpse-4.18.7/libtemplate/util/harvest.c:67:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(topdir, "%s", s); data/glimpse-4.18.7/libtemplate/util/harvest.c:69:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(topdir, "%s", DEFAULT_HARVEST_HOME); data/glimpse-4.18.7/libtemplate/util/harvest.c:89:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newpath, "PATH=%s", s); data/glimpse-4.18.7/libtemplate/util/harvest.c:90:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newpath + strlen(newpath), ":%s", harvest_bindir()); data/glimpse-4.18.7/libtemplate/util/harvest.c:95:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newpath + strlen(newpath), ":%s/%s", data/glimpse-4.18.7/libtemplate/util/log.c:97:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fp_log, fmt, ap); data/glimpse-4.18.7/libtemplate/util/log.c:121:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fp_errs, fmt, ap); data/glimpse-4.18.7/libtemplate/util/log.c:145:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fp_errs, fmt, ap); data/glimpse-4.18.7/libtemplate/util/system.c:39:10: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return (system(cmd)); data/glimpse-4.18.7/libtemplate/util/system.c:79:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/glimpse-4.18.7/libtemplate/util/system.c:80:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "execvp: %s", argv[0]); data/glimpse-4.18.7/libtemplate/util/system.c:164:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/glimpse-4.18.7/libtemplate/util/system.c:165:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "execvp: %s", argv[0]); data/glimpse-4.18.7/main.c:481:44: [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). if (getcwd(INDEX_DIR, MAXNAME-1) == NULL) strcpy(INDEX_DIR, indexdir); data/glimpse-4.18.7/main.c:486:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", INDEX_FILE); data/glimpse-4.18.7/main.c:499:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", P_TABLE); data/glimpse-4.18.7/main.c:508:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", DEF_TIME_FILE); data/glimpse-4.18.7/main.c:511:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s.index", DEF_TIME_FILE); data/glimpse-4.18.7/main.c:538:2: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(indexfp, "%%%d%s\n", &StructuredIndex, old_rdelim); data/glimpse-4.18.7/main.c:544: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(rdelim, old_rdelim); data/glimpse-4.18.7/main.c:559:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", MINI_FILE); data/glimpse-4.18.7/main.c:751: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(&GProgname[0], argv[0]); data/glimpse-4.18.7/main.c:803:6: [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(indexdir, argv[0]); data/glimpse-4.18.7/main.c:807:6: [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(indexdir, p+1); data/glimpse-4.18.7/main.c:824:6: [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(SERV_HOST, argv[0]); data/glimpse-4.18.7/main.c:828:6: [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(SERV_HOST, p+1); data/glimpse-4.18.7/main.c:1012: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(TMP_FILE_NAME,TEMP_DIR) ; data/glimpse-4.18.7/main.c:1017: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(serv_addr.sun_path, TMP_FILE_NAME); /* < 108 ! */ data/glimpse-4.18.7/main.c:1199: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(TMP_FILE_NAME,TEMP_DIR) ; data/glimpse-4.18.7/main.c:1201: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(serv_addr.sun_path, TMP_FILE_NAME); /* < 108 ! */ data/glimpse-4.18.7/main.c:1225:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errbuf, "glimpse: Cannot contact glimpseserver: %s, port %d:", SERV_HOST, SERV_PORT); data/glimpse-4.18.7/main.c:1351:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempfile, "%s/.glimpse_tmp.%d", TEMP_DIR, getpid());\ data/glimpse-4.18.7/main.c:1353:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname[0], "%s/.glimpse_apply.%d", TEMP_DIR, getpid());\ data/glimpse-4.18.7/main.c:1387: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(&GProgname[0], argv[0]); data/glimpse-4.18.7/main.c:1452:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempfile, "%s/.glimpse_tmp.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/main.c:1476: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(agrep_argv[agrep_argc], argv[0]); /* copy the name of the program anyway */ data/glimpse-4.18.7/main.c:1572:6: [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(FileOpt, argv[0]); data/glimpse-4.18.7/main.c:1579:6: [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(FileOpt, p+1); data/glimpse-4.18.7/main.c:1611:6: [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(indexdir, argv[0]); data/glimpse-4.18.7/main.c:1617:6: [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(indexdir, p+1); data/glimpse-4.18.7/main.c:1623:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc], indexdir); data/glimpse-4.18.7/main.c:1632:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(TEMP_FILE, INDEX_DIR); data/glimpse-4.18.7/main.c:1641:6: [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(TEMP_FILE, argv[0]); data/glimpse-4.18.7/main.c:1642:6: [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(temp_file, argv[0]); data/glimpse-4.18.7/main.c:1646:6: [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(TEMP_FILE, p+1); data/glimpse-4.18.7/main.c:1647:6: [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(temp_file, p+1); data/glimpse-4.18.7/main.c:1674:6: [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(TEMP_DIR, argv[0]); data/glimpse-4.18.7/main.c:1678:6: [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(TEMP_DIR, p+1); data/glimpse-4.18.7/main.c:1680:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tempfile, "%s/.glimpse_tmp.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/main.c:1735:6: [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(SERV_HOST, argv[0]); data/glimpse-4.18.7/main.c:1741:6: [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(SERV_HOST, p+1); data/glimpse-4.18.7/main.c:1782:6: [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(bitfield_file, argv[0]); data/glimpse-4.18.7/main.c:1786:6: [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(bitfield_file, p+1); data/glimpse-4.18.7/main.c:1801:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&bitfield_file[iiii-1], &bitfield_file[iiii]); data/glimpse-4.18.7/main.c:1824:6: [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(temp_bitfield_file, bitfield_file); data/glimpse-4.18.7/main.c:1825:6: [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(bitfield_file, temp_bitfield_file); data/glimpse-4.18.7/main.c:1839:6: [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(filenames_file, argv[0]); data/glimpse-4.18.7/main.c:1843:6: [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(filenames_file, p+1); data/glimpse-4.18.7/main.c:1848:6: [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(temp_filenames_file, filenames_file); data/glimpse-4.18.7/main.c:1849:6: [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(filenames_file, temp_filenames_file); data/glimpse-4.18.7/main.c:1895:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc] + 1, p); data/glimpse-4.18.7/main.c:1959:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc], argv[0]); data/glimpse-4.18.7/main.c:1982:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(agrep_argv[agrep_argc], p+1); data/glimpse-4.18.7/main.c:2028: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(agrep_argv[agrep_argc], argv[0]); data/glimpse-4.18.7/main.c:2119: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(APattern, GPattern); data/glimpse-4.18.7/main.c:2127: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(terminals[0].data.leaf.value, GPattern); data/glimpse-4.18.7/main.c:2152: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(agrep_argv[patindex], APattern); data/glimpse-4.18.7/main.c:2244:6: [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(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/main.c:2246:6: [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(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/main.c:2251:6: [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(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/main.c:2258:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(index_argv[index_argc], agrep_argv[j]); data/glimpse-4.18.7/main.c:2262:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(index_argv[index_argc], "%s", INDEX_FILE); data/glimpse-4.18.7/main.c:2532: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(index_argv[0], GProgname); data/glimpse-4.18.7/main.c:2693:12: [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). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/main.c:2722:12: [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). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/main.c:2761:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname[0], "%s/.glimpse_apply.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/main.c:2768:12: [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). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/main.c:2813:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/main.c:2884:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/main.c:2948:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outname[0], "%s/.glimpse_apply.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/main.c:2971:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(CurrentFileName, GTextfiles[i]); data/glimpse-4.18.7/main.c:3177:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec cat %s\n", outfile); data/glimpse-4.18.7/main.c:3178:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/main.c:3187:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_storeoutput.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/main.c:3447:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "exec cat %s/.glimpse_storeoutput.%d\n", TEMP_DIR, getpid()); data/glimpse-4.18.7/main.c:3448:4: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(s); data/glimpse-4.18.7/main.c:3450:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_storeoutput.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/main.c:3463:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s/.glimpse_storeoutput.%d", TEMP_DIR, getpid()); data/glimpse-4.18.7/split.c:311: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(&apattern[*apatptr], n->data.leaf.value); data/glimpse-4.18.7/split.c:387: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(&apattern[*apatptr], n->data.leaf.value); data/glimpse-4.18.7/split.c:586: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). strcpy(pat_list[num_pat], word); data/glimpse-4.18.7/split.c:600: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(&pat_buf[pat_ptr], pat_list[i]); data/glimpse-4.18.7/agrep/agrep.c:3012:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = (char *)getenv("HOME")) == NULL) { data/glimpse-4.18.7/agrep/config.h:9:26: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. #define getcwd(buf,size) getwd(buf) /* NB: unchecked target size--could overflow; BG: Ok since buffers are usually >= 256B */ data/glimpse-4.18.7/compress/main_cast.c:113:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = (char *)getenv("HOME")) == NULL) { data/glimpse-4.18.7/compress/main_tbuild.c:55:37: [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 ((home = (char *)getenv("HOME")) == NULL) { data/glimpse-4.18.7/compress/main_uncast.c:117:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = (char *)getenv("HOME")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:206:2: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(getpid()); data/glimpse-4.18.7/glimpse/main.c:474:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = (char *)getenv("HOME")) == NULL) { data/glimpse-4.18.7/glimpse/main.c:749:2: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(getpid()); data/glimpse-4.18.7/index/glimpse.c:183:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(pid); data/glimpse-4.18.7/index/glimpse.c:520: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 ((indexdir = getenv("HOME")) == NULL) { data/glimpse-4.18.7/libtemplate/util/harvest.c:34:11: [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 ((s = getenv("HARVEST_HOME")) != NULL) data/glimpse-4.18.7/libtemplate/util/harvest.c:50:11: [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 ((s = getenv("HARVEST_HOME")) != NULL) data/glimpse-4.18.7/libtemplate/util/harvest.c:66:11: [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 ((s = getenv("HARVEST_HOME")) != NULL) data/glimpse-4.18.7/libtemplate/util/harvest.c:83: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. char *s = getenv("PATH"), *newpath, *oldpath, *q; data/glimpse-4.18.7/main.c:474:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = (char *)getenv("HOME")) == NULL) { data/glimpse-4.18.7/main.c:749:2: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(getpid()); data/glimpse-4.18.7/agrep/agrep.c:65:1: [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 PAT_FILE_NAME[MAX_LINE_LEN]; data/glimpse-4.18.7/agrep/agrep.c:88:1: [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 amatched_terminals[MAXNUM_PAT]; data/glimpse-4.18.7/agrep/agrep.c:89:1: [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 aduplicates[MAXNUM_PAT][MAXNUM_PAT]; /* tells what other patterns are exactly equal to the i-th one */ data/glimpse-4.18.7/agrep/agrep.c:90:1: [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 tc_aduplicates[MAXNUM_PAT][MAXNUM_PAT]; /* tells what other patterns are exactly equal to the i-th one */ data/glimpse-4.18.7/agrep/agrep.c:115:1: [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 COMP_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/agrep/agrep.c:116:1: [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 FREQ_FILE[MAX_LINE_LEN], HASH_FILE[MAX_LINE_LEN], STRING_FILE[MAX_LINE_LEN]; /* interfacing with tcompress */ data/glimpse-4.18.7/agrep/agrep.c:144: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 s[256], s1[16], s2[16], s3[16], s4[16], s5[16]; data/glimpse-4.18.7/agrep/agrep.c:145: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 buffer[256]; data/glimpse-4.18.7/agrep/agrep.c:152: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 buffer[256]; data/glimpse-4.18.7/agrep/agrep.c:2355: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:2358:4: [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(s, "%d: ", j-1); data/glimpse-4.18.7/agrep/agrep.c:2376: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:2378:4: [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(s, "%d= ", CurrentByteOffset); data/glimpse-4.18.7/agrep/agrep.c:2399: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:2401:4: [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(s, "@%d{%d} ", CurrentByteOffset - (i-bp), i-bp); data/glimpse-4.18.7/agrep/agrep.c:2655:5: [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(D_pattern, ">; "); data/glimpse-4.18.7/agrep/agrep.c:2789:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((multifd = open(argv[0], O_RDONLY)) < 0) { data/glimpse-4.18.7/agrep/agrep.c:2949:9: [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). I = atoi(p + 1); /* Insertion Cost */ data/glimpse-4.18.7/agrep/agrep.c:2955:9: [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). S = atoi(p + 1); /* Substitution Cost */ data/glimpse-4.18.7/agrep/agrep.c:2961:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). DD = atoi(p + 1); /* Deletion Cost */ data/glimpse-4.18.7/agrep/agrep.c:2988:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). D = atoi(p); data/glimpse-4.18.7/agrep/agrep.c:3105:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (( ((unsigned char *)Pattern)[i] > USERRANGE_MIN) && ( ((unsigned char *)Pattern)[i] <= USERRANGE_MAX)) { data/glimpse-4.18.7/agrep/agrep.c:3105:72: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (( ((unsigned char *)Pattern)[i] > USERRANGE_MIN) && ( ((unsigned char *)Pattern)[i] <= USERRANGE_MAX)) { data/glimpse-4.18.7/agrep/agrep.c:3196: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(agrep_saved_pattern, pattern_buffer, pattern_len); data/glimpse-4.18.7/agrep/agrep.c:3439: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 c[8]; data/glimpse-4.18.7/agrep/agrep.c:3467: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:3470:6: [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(s, "%d\n", total_line-(num_of_matched - prev_num_of_matched)); data/glimpse-4.18.7/agrep/agrep.c:3487: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:3490:6: [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(s, "%d\n", (num_of_matched - prev_num_of_matched)); data/glimpse-4.18.7/agrep/agrep.c:3512:26: [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. if (PRINTFILENUMBER) sprintf(CurrentFileName, "%d", i); data/glimpse-4.18.7/agrep/agrep.c:3580:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/agrep.c:3582:9: [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(s, ": %d\n", total_line - (num_of_matched - prev_num_of_matched)); data/glimpse-4.18.7/agrep/agrep.c:3601:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/agrep.c:3604:9: [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(s, "%d\n", total_line - (num_of_matched - prev_num_of_matched)); data/glimpse-4.18.7/agrep/agrep.c:3659:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/agrep.c:3661:9: [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(s, ": %d\n", (num_of_matched - prev_num_of_matched)); data/glimpse-4.18.7/agrep/agrep.c:3680:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/agrep.c:3683:9: [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(s, "%d\n", (num_of_matched - prev_num_of_matched)); data/glimpse-4.18.7/agrep/agrep.c:3731:27: [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. if (PRINTFILENUMBER) sprintf(CurrentFileName, "%d", i); data/glimpse-4.18.7/agrep/agrep.c:3783:27: [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. if (PRINTFILENUMBER) sprintf(CurrentFileName, "%d", i); data/glimpse-4.18.7/agrep/agrep.c:3986: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:3989:4: [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(s, "%d: ", j-1); data/glimpse-4.18.7/agrep/agrep.c:4006: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:4008:4: [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(s, "%d= ", CurrentByteOffset-1); data/glimpse-4.18.7/agrep/agrep.c:4029: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 s[32]; data/glimpse-4.18.7/agrep/agrep.c:4031:4: [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(s, "@%d{%d}\n", CurrentByteOffset - (i2-i1), i2-i1); data/glimpse-4.18.7/agrep/asplit.c:98: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(terminals[*pnum_terminals].data.leaf.value, buffer, buffer_pat - buffer); /* without distinguishing delimiter */ data/glimpse-4.18.7/agrep/asplit.c:182: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(n->data.leaf.value, tokenbuf, tokenlen); data/glimpse-4.18.7/agrep/asplit.c:233: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(oldtokenbuf, tokenbuf, tokenlen); data/glimpse-4.18.7/agrep/bitap.c:553:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, agrep_inbuffer + agrep_inpointer, total_read); data/glimpse-4.18.7/agrep/checkfile.c:29:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ibuf[MAXLINE]; data/glimpse-4.18.7/agrep/compat.c:16: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. extern char Progname[MAXNAME]; data/glimpse-4.18.7/agrep/dummysyscalls.c:9:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(name, flags, mode); data/glimpse-4.18.7/agrep/dummysyscalls.c:17:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fopen(name, flags); data/glimpse-4.18.7/agrep/follow.c:30:23: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. return strcat(strcat(strcpy(s1, ".*("), s), ")"); data/glimpse-4.18.7/agrep/io.c:32:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, agrep_inbuffer + agrep_inpointer, total_read); data/glimpse-4.18.7/agrep/main.c:12: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. extern char Pattern[MAXPAT]; data/glimpse-4.18.7/agrep/maskgen.c:20:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char class[WORD]; data/glimpse-4.18.7/agrep/newmgrep.c:40: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. extern char aduplicates[MAXNUM_PAT][MAXNUM_PAT]; /* tells what other patterns are exactly equal to the i-th one */ data/glimpse-4.18.7/agrep/newmgrep.c:41: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. extern char tc_aduplicates[MAXNUM_PAT][MAXNUM_PAT]; /* tells what other patterns are exactly equal to the i-th one */ data/glimpse-4.18.7/agrep/newmgrep.c:77: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. extern char FREQ_FILE[MAX_LINE_LEN], HASH_FILE[MAX_LINE_LEN], STRING_FILE[MAX_LINE_LEN]; data/glimpse-4.18.7/agrep/newmgrep.c:78: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. extern char PAT_FILE_NAME[MAX_LINE_LEN]; data/glimpse-4.18.7/agrep/newmgrep.c:97: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. extern char amatched_terminals[MAXNUM_PAT]; /* which patterns have been matched in the current line? Used only with AParse != 0, so max_num is not needed */ data/glimpse-4.18.7/agrep/newmgrep.c:358:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char tc_buf[MAXPAT * 2]; /* maximum length of the compressed pattern */ data/glimpse-4.18.7/agrep/newmgrep.c:378: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(tc_patt[p], tc_buf, tc_length); data/glimpse-4.18.7/agrep/newmgrep.c:472: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(text+start-D_length, D_pattern, D_length); data/glimpse-4.18.7/agrep/newmgrep.c:556: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. if (start > D_length) memcpy(text+start-D_length, D_pattern, D_length); data/glimpse-4.18.7/agrep/newmgrep.c:557: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(text+start+residue, D_pattern, D_length); data/glimpse-4.18.7/agrep/newmgrep.c:807: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 s[32]; data/glimpse-4.18.7/agrep/newmgrep.c:809:4: [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(s, "%d- ", pat_index); data/glimpse-4.18.7/agrep/newmgrep.c:827: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 s[32]; data/glimpse-4.18.7/agrep/newmgrep.c:829:4: [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(s, "%d= ", CurrentByteOffset); data/glimpse-4.18.7/agrep/newmgrep.c:847: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 s[32]; data/glimpse-4.18.7/agrep/newmgrep.c:849:4: [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(s, "@%d{%d} ", CurrentByteOffset - (text -curtextbegin), curtextend-curtextbegin); data/glimpse-4.18.7/agrep/newmgrep.c:998: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. memcpy(agrep_outbuffer + agrep_outpointer, curtextbegin, curtextend-curtextbegin);\ data/glimpse-4.18.7/agrep/newmgrep.c:1028:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(agrep_outbuffer+agrep_outpointer, lastout, curtextbegin-lastout);\ data/glimpse-4.18.7/agrep/newmgrep.c:1107:25: [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(agrep_outbuffer+agrep_outpointer, lastout, textend-lastout+1); data/glimpse-4.18.7/agrep/newmgrep.c:1496:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(agrep_outbuffer + agrep_outpointer, curtextbegin, curtextend-curtextbegin);\ data/glimpse-4.18.7/agrep/newmgrep.c:1526: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(agrep_outbuffer+agrep_outpointer, lastout, curtextbegin-lastout);\ data/glimpse-4.18.7/agrep/newmgrep.c:1590:25: [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(agrep_outbuffer+agrep_outpointer, lastout, text-lastout+1); data/glimpse-4.18.7/agrep/newmgrep.c:1992: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 aduplicates[MAXNUM_PAT][MAXNUM_PAT]; data/glimpse-4.18.7/agrep/newmgrep.c:1995: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 tr[256]; data/glimpse-4.18.7/agrep/preprocess.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. extern char FREQ_FILE[MAX_LINE_LEN], HASH_FILE[MAX_LINE_LEN], STRING_FILE[MAX_LINE_LEN]; /* interfacing with tcompress */ data/glimpse-4.18.7/agrep/recursive.c:49:1: [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 *file_list[max_list*2]; data/glimpse-4.18.7/agrep/recursive.c:52:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name_buf[BUFSIZE]; data/glimpse-4.18.7/agrep/sgrep.c:43: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. extern unsigned char D_pattern[MaxDelimit *2], tc_D_pattern[MaxDelimit *2]; data/glimpse-4.18.7/agrep/sgrep.c:71: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. extern char FREQ_FILE[MAX_LINE_LEN], HASH_FILE[MAX_LINE_LEN], STRING_FILE[MAX_LINE_LEN]; data/glimpse-4.18.7/agrep/sgrep.c:81:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char char_map[MAXSYM]; data/glimpse-4.18.7/agrep/sgrep.c:89:1: [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 MEMBER_1[MAXMEMBER_1]; data/glimpse-4.18.7/agrep/sgrep.c:144:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char temp[MAXPATT]; data/glimpse-4.18.7/agrep/sgrep.c:162: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(temp, pat, *m); data/glimpse-4.18.7/agrep/sgrep.c:164: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(pat+1, temp, *m); data/glimpse-4.18.7/agrep/sgrep.c:286:33: [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(text+start-D_length, D_pattern, D_length); data/glimpse-4.18.7/agrep/sgrep.c:384: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(text+start, text+end, residue); data/glimpse-4.18.7/agrep/sgrep.c:397: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. if (start > D_length) memcpy(text+start-D_length, D_pattern, D_length); data/glimpse-4.18.7/agrep/sgrep.c:398:25: [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(text+start+residue, D_pattern, D_length); data/glimpse-4.18.7/agrep/sgrep.c:531: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(tempbuf, text+end+1, m); /* save portion being overwritten */ data/glimpse-4.18.7/agrep/sgrep.c:551: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(text+end+1, tempbuf, m); /* restore */ data/glimpse-4.18.7/agrep/sgrep.c:559: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(text+end+1, tempbuf, m); /* restore */ data/glimpse-4.18.7/agrep/sgrep.c:569: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(text+end+1, tempbuf, m); /* restore */ data/glimpse-4.18.7/agrep/sgrep.c:578: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(text+end+1, tempbuf, m); /* restore */ data/glimpse-4.18.7/agrep/sgrep.c:586: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(text+end+1, tempbuf, m); /* restore */ data/glimpse-4.18.7/agrep/sgrep.c:642: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(text+end+1, tempbuf, m); /* restore */ data/glimpse-4.18.7/agrep/sgrep.c:817: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 s[32]; data/glimpse-4.18.7/agrep/sgrep.c:819:8: [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(s, "%d=", CurrentByteOffset); data/glimpse-4.18.7/agrep/sgrep.c:837: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 s[32]; data/glimpse-4.18.7/agrep/sgrep.c:839:8: [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(s, "@%d{%d} ", CurrentByteOffset - (text -curtextbegin), curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:887: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(agrep_outbuffer+agrep_outpointer, curtextbegin, curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:924: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(agrep_outbuffer+agrep_outpointer, lastout, curtextbegin-lastout); data/glimpse-4.18.7/agrep/sgrep.c:970: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(agrep_outbuffer+agrep_outpointer, lastout, textend-lastout + 1); data/glimpse-4.18.7/agrep/sgrep.c:1225: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(agrep_outbuffer+agrep_outpointer, lastout, textend-lastout + 1); data/glimpse-4.18.7/agrep/sgrep.c:1322: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(agrep_outbuffer+agrep_outpointer, *lastout, curtextbegin-*lastout); data/glimpse-4.18.7/agrep/sgrep.c:1395: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 s[32]; data/glimpse-4.18.7/agrep/sgrep.c:1397:4: [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(s, "%d= ", CurrentByteOffset); data/glimpse-4.18.7/agrep/sgrep.c:1415: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 s[32]; data/glimpse-4.18.7/agrep/sgrep.c:1417:4: [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(s, "@%d{%d} ", CurrentByteOffset - (text + oldi-curtextbegin), curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:1462: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(agrep_outbuffer + agrep_outpointer, curtextbegin, curtextend - curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:1676: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 s[32]; data/glimpse-4.18.7/agrep/sgrep.c:1678:8: [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(s, "%d= ", CurrentByteOffset); data/glimpse-4.18.7/agrep/sgrep.c:1696: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 s[32]; data/glimpse-4.18.7/agrep/sgrep.c:1698:8: [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(s, "@%d{%d} ", CurrentByteOffset - (text -curtextbegin), curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:1745: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(agrep_outbuffer+agrep_outpointer, curtextbegin, curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:1782: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(agrep_outbuffer+agrep_outpointer, lastout, curtextbegin-lastout); data/glimpse-4.18.7/agrep/sgrep.c:1830: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(agrep_outbuffer+agrep_outpointer, lastout, textend-lastout + 1); data/glimpse-4.18.7/agrep/sgrep.c:1970:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/sgrep.c:1972:9: [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(s, "%d= ", CurrentByteOffset); data/glimpse-4.18.7/agrep/sgrep.c:1990:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/sgrep.c:1992:9: [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(s, "@%d{%d} ", CurrentByteOffset - (text -curtextbegin), curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:2039:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(agrep_outbuffer+agrep_outpointer, curtextbegin, curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:2076:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(agrep_outbuffer+agrep_outpointer, lastout, curtextbegin-lastout); data/glimpse-4.18.7/agrep/sgrep.c:2123: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(agrep_outbuffer+agrep_outpointer, lastout, textend-lastout + 1); data/glimpse-4.18.7/agrep/sgrep.c:2378:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/sgrep.c:2380:9: [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(s, "%d= ", CurrentByteOffset); data/glimpse-4.18.7/agrep/sgrep.c:2398:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[32]; data/glimpse-4.18.7/agrep/sgrep.c:2400:9: [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(s, "@%d{%d} ", CurrentByteOffset - (text -curtextbegin), curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:2447:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(agrep_outbuffer+agrep_outpointer, curtextbegin, curtextend-curtextbegin); data/glimpse-4.18.7/agrep/sgrep.c:2484:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(agrep_outbuffer+agrep_outpointer, lastout, curtextbegin-lastout); data/glimpse-4.18.7/agrep/sgrep.c:2528: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(agrep_outbuffer+agrep_outpointer, lastout, textend-lastout + 1); data/glimpse-4.18.7/communicate.c:223:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char array[4]; data/glimpse-4.18.7/communicate.c:236: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(reqbuf+ptr, array, 4); data/glimpse-4.18.7/communicate.c:249: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(reqbuf+ptr, array, 4); data/glimpse-4.18.7/communicate.c:280: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 line[MAXLINE]; data/glimpse-4.18.7/communicate.c:283:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char array[4]; data/glimpse-4.18.7/communicate.c:293: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(array, reqbuf+ptr, 4); data/glimpse-4.18.7/communicate.c:302: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(array, reqbuf+ptr, 4); data/glimpse-4.18.7/communicate.c:345:1: [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 reqbuf[MAX_ARGS*MAX_NAME_LEN], *clargv[]; data/glimpse-4.18.7/communicate.c:393:1: [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 reqbuf[MAX_ARGS*MAX_NAME_LEN], **pclargv[]; data/glimpse-4.18.7/compress/cast.c:34: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. extern char freq_words_strings[256][MAX_WORD_LEN+2]; data/glimpse-4.18.7/compress/cast.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. extern char comp_signature[SIGNATURE_LEN]; data/glimpse-4.18.7/compress/cast.c:54: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). if ((hashfp = fopen(hash_file, "r")) == NULL) { data/glimpse-4.18.7/compress/cast.c:144:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[SAMPLE_SIZE + 2]; data/glimpse-4.18.7/compress/cast.c:164:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[SAMPLE_SIZE + 2]; data/glimpse-4.18.7/compress/cast.c:449: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 word[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/cast.c:473:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char curword[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/cast.c:706:23: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (outbuf != NULL) memcpy(outbuf+outlen, curword, curlen); data/glimpse-4.18.7/compress/cast.c:745: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 tempname[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/cast.c:766:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(tempname, "r")) == NULL) { data/glimpse-4.18.7/compress/cast.c:797: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 s[8]; data/glimpse-4.18.7/compress/cast.c:806:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outfp = fopen(outname, "w")) == NULL) { data/glimpse-4.18.7/compress/hash.c:140: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). if ((hashfp = fopen((char *)HASHFILE, "w")) == NULL) { data/glimpse-4.18.7/compress/hash.c:270: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). if ((hashfp = fopen((char *)HASHFILE, "w")) == NULL) { data/glimpse-4.18.7/compress/hash.c:307: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). if ((hashfp = fopen((char *)HASHFILE, "w")) == NULL) { data/glimpse-4.18.7/compress/hash.c:381: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 dummybuf[MAX_WORD_BUF]; data/glimpse-4.18.7/compress/hash.c:460: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 loaded_hash_table[HASH_FILE_BLOCKS]; data/glimpse-4.18.7/compress/hash.c:463:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char *srcinit, *srcend, dest[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/hash.c:466:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char *strings[MAX_NAME_LEN]; /* maximum pattern length */ data/glimpse-4.18.7/compress/hash.c:504: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. if ((strcmp((char *)strings[i], (char *)srcinit) >= 0) && (strcmp((char *)strings[i], (char *)srcend) <= 0)) goto include_page; data/glimpse-4.18.7/compress/hash.c:504:71: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if ((strcmp((char *)strings[i], (char *)srcinit) >= 0) && (strcmp((char *)strings[i], (char *)srcend) <= 0)) goto include_page; data/glimpse-4.18.7/compress/hash.c:528:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/hash.c:531:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char word[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/hash.c:532:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char prev_word[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/hash.c:534: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 es1[MAX_LINE_LEN], es2[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/hash.c:536:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((infp = fopen((char *)filename, "r")) == NULL) { data/glimpse-4.18.7/compress/hash.c:541:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen((const char *)buf, "w")) == NULL) { data/glimpse-4.18.7/compress/hash.c:547:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outfp = fopen((const char *)buf, "w")) == NULL) { data/glimpse-4.18.7/compress/main_cast.c:41: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 hash_file[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_cast.c:42: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 freq_file[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_cast.c:43: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 comp_dir[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_cast.c:44: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 name[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_cast.c:45: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 outname[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_tbuild.c:30: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 comp_dir[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_tbuild.c:46:43: [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). else if (argv[i][1] == 't') threshold = atoi(argv[++i]); data/glimpse-4.18.7/compress/main_tbuild.c:47:46: [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). else if (argv[i][1] == 'l') specialwords = atoi(argv[++i]); data/glimpse-4.18.7/compress/main_uncast.c:41: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 freq_file[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_uncast.c:42: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 string_file[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_uncast.c:43: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 comp_dir[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_uncast.c:44: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 name[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_uncast.c:45: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 outname[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/main_uncast.c:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[SIGNATURE_LEN]; data/glimpse-4.18.7/compress/misc.c:31:1: [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 freq_words_strings[256][MAX_WORD_LEN+2]; data/glimpse-4.18.7/compress/misc.c:200:1: [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 comp_signature[SIGNATURE_LEN]; /* SIGNATURE_LEN - 1 hex-chars terminated by '\0' */ data/glimpse-4.18.7/compress/misc.c:205: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 freq_words_strings[256][MAX_WORD_LEN+2]; data/glimpse-4.18.7/compress/misc.c:209: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). FILE *fp = fopen(freq_file, "r"); data/glimpse-4.18.7/compress/quick.c:37:1: [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 loaded_hash_table[HASH_FILE_BLOCKS]; /* bit mask of loaded pages in hash-table: store chars since just 4K: speed is most imp. */ data/glimpse-4.18.7/compress/quick.c:53: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 old_freq_file[MAX_LINE_LEN] = "", old_hash_file[MAX_LINE_LEN] = ""; data/glimpse-4.18.7/compress/quick.c:59: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 s[256]; data/glimpse-4.18.7/compress/quick.c:70:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((hashfp = fopen(hash_file, "r")) == NULL) { data/glimpse-4.18.7/compress/quick.c:79:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((hashindexfp = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/compress/quick.c:137:1: [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 *compress_string_table[DEF_MAX_WORDS]; /*[MAX_WORD_LEN+2]; */ data/glimpse-4.18.7/compress/quick.c:138:1: [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 loaded_string_table[STRING_FILE_BLOCKS]; /* bit mask of loaded pages in string-table: store chars since just 4K: speed is most imp. */ data/glimpse-4.18.7/compress/quick.c:154: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 old_freq_file[MAX_LINE_LEN] = "", old_string_file[MAX_LINE_LEN] = ""; data/glimpse-4.18.7/compress/quick.c:161: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 s[256]; data/glimpse-4.18.7/compress/quick.c:172:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((stringfp = fopen(string_file, "r")) == NULL) { data/glimpse-4.18.7/compress/quick.c:181:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((stringindexfp = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/compress/string.c:28:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((stringfp = fopen(string_file, "w")) == NULL) { data/glimpse-4.18.7/compress/string.c:32:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen(index_file, "r")) == NULL) { data/glimpse-4.18.7/compress/string.c:74: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 *string_table[DEF_MAX_WORDS]; /*[MAX_WORD_LEN+2]; */ data/glimpse-4.18.7/compress/string.c:82: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 dummybuf[MAX_WORD_BUF]; data/glimpse-4.18.7/compress/string.c:139: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 *string_table[DEF_MAX_WORDS]; /* [MAX_WORD_LEN+2]; */ data/glimpse-4.18.7/compress/string.c:146: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 loaded_string_table[STRING_FILE_BLOCKS]; data/glimpse-4.18.7/compress/string.c:219:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/string.c:223: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 es1[MAX_LINE_LEN], es2[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/string.c:225:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((infp = fopen(filename, "r")) == NULL) { data/glimpse-4.18.7/compress/string.c:230:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen(buf, "w")) == NULL) { data/glimpse-4.18.7/compress/string.c:236:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outfp = fopen(buf, "w")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:35:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char curline[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/tbuild.c:37:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char curword[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/tbuild.c:47:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char s[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/tbuild.c:48:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rands[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/tbuild.c:49: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 index_file[MAX_LINE_LEN], string_file[MAX_LINE_LEN], hash_file[MAX_LINE_LEN], freq_file[MAX_LINE_LEN], es1[MAX_LINE_LEN], es2[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/tbuild.c:83:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(index_file, "r")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:88: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(s, "/tmp/temp%d", pid); data/glimpse-4.18.7/compress/tbuild.c:89: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). if ((tempfp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:119:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char tempbuf[MAX_NAME_LEN]; data/glimpse-4.18.7/compress/tbuild.c:124:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). curfreq += atoi(tempbuf); data/glimpse-4.18.7/compress/tbuild.c:163: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(s, "/tmp/temp%d", pid); data/glimpse-4.18.7/compress/tbuild.c:164: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). if ((tempfp = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:201: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). if ((freqfp = fopen(freq_file, "w")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:209:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(s, "%x", rand()); data/glimpse-4.18.7/compress/tbuild.c:237: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(s, "/tmp/sort%d.a", pid); data/glimpse-4.18.7/compress/tbuild.c:238:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((awkfp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:242: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(s, "BEGIN {}\n{print $3 \" \" $2 \" \" $1}\nEND {}\n"); data/glimpse-4.18.7/compress/tbuild.c:247: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(s, "cat /tmp/sort%d.a\n", pid); data/glimpse-4.18.7/compress/tbuild.c:259: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(s, "/tmp/sort%d.a", pid); data/glimpse-4.18.7/compress/tbuild.c:260:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((awkfp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:277: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(s, "/tmp/sort%d.a", pid); data/glimpse-4.18.7/compress/tbuild.c:278:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((awkfp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/compress/tbuild.c:287: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(s, "cat /tmp/sort%d.a\n", pid); data/glimpse-4.18.7/compress/test.c:11:1: [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 src[256] = " industrial production because of energy and input shortages and labor\n"; data/glimpse-4.18.7/compress/test.c:13:1: [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 dest[256]; data/glimpse-4.18.7/compress/test.c:14:1: [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 srcsrc[256]; data/glimpse-4.18.7/compress/trecursive.c:46:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/trecursive.c:47: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 outbuf[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/uncast.c:31: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. extern char comp_signature[SIGNATURE_LEN]; data/glimpse-4.18.7/compress/uncast.c:33: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. extern char freq_words_strings[256][MAX_WORD_LEN+2]; data/glimpse-4.18.7/compress/uncast.c:35: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. extern char *compress_string_table[DEF_MAX_WORDS]; /*[MAX_WORD_LEN+2]; */ data/glimpse-4.18.7/compress/uncast.c:51:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((stringfp = fopen(string_file, "r")) == NULL) { data/glimpse-4.18.7/compress/uncast.c:104: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 tempname[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/uncast.c:116:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[SIGNATURE_LEN + 2]; data/glimpse-4.18.7/compress/uncast.c:131:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[SIGNATURE_LEN + 2]; data/glimpse-4.18.7/compress/uncast.c:248: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(outbuf+outlen, freq_words_strings[c - BEGIN_SPECIAL_WORDS], freq_words_lens[c - BEGIN_SPECIAL_WORDS]);\ data/glimpse-4.18.7/compress/uncast.c:537: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 tempname[MAX_LINE_LEN]; data/glimpse-4.18.7/compress/uncast.c:565:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(tempname, "r")) == NULL) { data/glimpse-4.18.7/compress/uncast.c:591: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 s[8]; data/glimpse-4.18.7/compress/uncast.c:600:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outfp = fopen(outname, "w")) == NULL) { data/glimpse-4.18.7/get_filename.c:33: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/get_filename.c:46:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[MAX_NAME_SIZE]; data/glimpse-4.18.7/get_filename.c:52:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(NAME_LIST, "r"); data/glimpse-4.18.7/get_filename.c:117:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[8]; data/glimpse-4.18.7/get_filename.c:130:71: [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. else temp_bigbuffer_len += &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i]; data/glimpse-4.18.7/get_filename.c:152: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(&temp_bigbuffer[curr_temp_bigbuffer], GTextfilenames[i], GTextfilenames[i+1] - GTextfilenames[i] /* including '\n' */); data/glimpse-4.18.7/get_filename.c:156: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(&temp_bigbuffer[curr_temp_bigbuffer], GTextfilenames[i], &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i]); data/glimpse-4.18.7/get_filename.c:156:109: [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. memcpy(&temp_bigbuffer[curr_temp_bigbuffer], GTextfilenames[i], &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i]); data/glimpse-4.18.7/get_filename.c:157:69: [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. curr_temp_bigbuffer += &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i] /* including '\n' */; data/glimpse-4.18.7/get_filename.c:207:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). offset = atoi(&outputbuffer[j]); data/glimpse-4.18.7/get_filename.c:210:55: [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. while ((k<agrep_outpointer) && (!isalnum(((unsigned char *)outputbuffer)[k]))) k++; data/glimpse-4.18.7/get_filename.c:299:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[8], tempfile[MAX_NAME_LEN], *name_list_buffer; data/glimpse-4.18.7/get_filename.c:352:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(tempfile, "r")) == NULL) { data/glimpse-4.18.7/get_filename.c:378:54: [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. while ((k<agrep_outpointer) && (isalnum(((unsigned char *)outputbuffer)[k]))) k++; data/glimpse-4.18.7/get_filename.c:382:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). offset = atoi(&outputbuffer[j]) + first_line_len - 1; /* I have \n part of it included in name_list_buffer */ data/glimpse-4.18.7/get_filename.c:385:55: [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. while ((k<agrep_outpointer) && (!isalnum(((unsigned char *)outputbuffer)[k]))) k++; data/glimpse-4.18.7/get_filename.c:496: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 tempbuf[MAX_PAT * 3]; data/glimpse-4.18.7/get_filename.c:599: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(tempbuf, bigbuffer, bigbuffer_size >= MAX_PAT ? MAX_PAT*3 : MAX_PAT*2 + bigbuffer_size); data/glimpse-4.18.7/get_filename.c:601: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(bigbuffer, tempbuf, bigbuffer_size >= MAX_PAT ? MAX_PAT*3 : MAX_PAT*2 + bigbuffer_size); data/glimpse-4.18.7/get_index.c:9: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/get_index.c:22: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. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/get_index.c:23: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. extern char old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/get_index.c:31: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. extern char *index_argv[MAX_ARGS]; data/glimpse-4.18.7/get_index.c:510: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). if((f_in = fopen(infile, "r")) == NULL) { data/glimpse-4.18.7/get_index.c:723: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 allindexmark[MAXNUM_PAT]; data/glimpse-4.18.7/get_index.c:729:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f_in = fopen(infile, "w")) == NULL) { data/glimpse-4.18.7/get_index.c:752: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). if((f_in = fopen(infile, "r")) == NULL) { data/glimpse-4.18.7/get_index.c:1056:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char s[MAX_LINE_LEN], word[MAX_NAME_LEN]; data/glimpse-4.18.7/get_index.c:1076:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (isupper(*(unsigned char *)inword)) word[j] = tolower(*(unsigned char *)inword); data/glimpse-4.18.7/get_index.c:1128: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 dummypat[MAX_PAT]; data/glimpse-4.18.7/get_index.c:1145: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). if ((tmpfp = fopen(tempfile, "w")) == NULL) { data/glimpse-4.18.7/get_index.c:1193:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(index_argv[patindex], "-z"); /* no-op: patterns are in patbufpos; also avoid shift-left of index_argv */ data/glimpse-4.18.7/get_index.c:1256: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(curr_index_set, src_index_set, sizeof(int)*REAL_PARTITION); data/glimpse-4.18.7/get_index.c:1262:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. else memcpy(curr_index_set, src_index_set, MAX_PARTITION * sizeof(int)); data/glimpse-4.18.7/get_index.c:1269: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(curr_offset_table, src_offset_table, OneFilePerBlock * sizeof(struct offsets *)); data/glimpse-4.18.7/glimpse/communicate.c:223:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char array[4]; data/glimpse-4.18.7/glimpse/communicate.c:236: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(reqbuf+ptr, array, 4); data/glimpse-4.18.7/glimpse/communicate.c:249: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(reqbuf+ptr, array, 4); data/glimpse-4.18.7/glimpse/communicate.c:280: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 line[MAXLINE]; data/glimpse-4.18.7/glimpse/communicate.c:283:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char array[4]; data/glimpse-4.18.7/glimpse/communicate.c:293: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(array, reqbuf+ptr, 4); data/glimpse-4.18.7/glimpse/communicate.c:302: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(array, reqbuf+ptr, 4); data/glimpse-4.18.7/glimpse/communicate.c:345:1: [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 reqbuf[MAX_ARGS*MAX_NAME_LEN], *clargv[]; data/glimpse-4.18.7/glimpse/communicate.c:393:1: [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 reqbuf[MAX_ARGS*MAX_NAME_LEN], **pclargv[]; data/glimpse-4.18.7/glimpse/get_filename.c:33: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/get_filename.c:46:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[MAX_NAME_SIZE]; data/glimpse-4.18.7/glimpse/get_filename.c:52:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(NAME_LIST, "r"); data/glimpse-4.18.7/glimpse/get_filename.c:117:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[8]; data/glimpse-4.18.7/glimpse/get_filename.c:130:71: [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. else temp_bigbuffer_len += &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i]; data/glimpse-4.18.7/glimpse/get_filename.c:152: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(&temp_bigbuffer[curr_temp_bigbuffer], GTextfilenames[i], GTextfilenames[i+1] - GTextfilenames[i] /* including '\n' */); data/glimpse-4.18.7/glimpse/get_filename.c:156: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(&temp_bigbuffer[curr_temp_bigbuffer], GTextfilenames[i], &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i]); data/glimpse-4.18.7/glimpse/get_filename.c:156:109: [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. memcpy(&temp_bigbuffer[curr_temp_bigbuffer], GTextfilenames[i], &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i]); data/glimpse-4.18.7/glimpse/get_filename.c:157:69: [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. curr_temp_bigbuffer += &bigbuffer[bigbuffer_size + MAX_PAT] - (char *)GTextfilenames[i] /* including '\n' */; data/glimpse-4.18.7/glimpse/get_filename.c:207:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). offset = atoi(&outputbuffer[j]); data/glimpse-4.18.7/glimpse/get_filename.c:210:55: [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. while ((k<agrep_outpointer) && (!isalnum(((unsigned char *)outputbuffer)[k]))) k++; data/glimpse-4.18.7/glimpse/get_filename.c:299:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[8], tempfile[MAX_NAME_LEN], *name_list_buffer; data/glimpse-4.18.7/glimpse/get_filename.c:352:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(tempfile, "r")) == NULL) { data/glimpse-4.18.7/glimpse/get_filename.c:378:54: [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. while ((k<agrep_outpointer) && (isalnum(((unsigned char *)outputbuffer)[k]))) k++; data/glimpse-4.18.7/glimpse/get_filename.c:382:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). offset = atoi(&outputbuffer[j]) + first_line_len - 1; /* I have \n part of it included in name_list_buffer */ data/glimpse-4.18.7/glimpse/get_filename.c:385:55: [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. while ((k<agrep_outpointer) && (!isalnum(((unsigned char *)outputbuffer)[k]))) k++; data/glimpse-4.18.7/glimpse/get_filename.c:496: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 tempbuf[MAX_PAT * 3]; data/glimpse-4.18.7/glimpse/get_filename.c:599: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(tempbuf, bigbuffer, bigbuffer_size >= MAX_PAT ? MAX_PAT*3 : MAX_PAT*2 + bigbuffer_size); data/glimpse-4.18.7/glimpse/get_filename.c:601: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(bigbuffer, tempbuf, bigbuffer_size >= MAX_PAT ? MAX_PAT*3 : MAX_PAT*2 + bigbuffer_size); data/glimpse-4.18.7/glimpse/get_index.c:9: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/get_index.c:22: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. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/get_index.c:23: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. extern char old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/get_index.c:31: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. extern char *index_argv[MAX_ARGS]; data/glimpse-4.18.7/glimpse/get_index.c:510: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). if((f_in = fopen(infile, "r")) == NULL) { data/glimpse-4.18.7/glimpse/get_index.c:723: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 allindexmark[MAXNUM_PAT]; data/glimpse-4.18.7/glimpse/get_index.c:729:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f_in = fopen(infile, "w")) == NULL) { data/glimpse-4.18.7/glimpse/get_index.c:752: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). if((f_in = fopen(infile, "r")) == NULL) { data/glimpse-4.18.7/glimpse/get_index.c:1056:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char s[MAX_LINE_LEN], word[MAX_NAME_LEN]; data/glimpse-4.18.7/glimpse/get_index.c:1076:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (isupper(*(unsigned char *)inword)) word[j] = tolower(*(unsigned char *)inword); data/glimpse-4.18.7/glimpse/get_index.c:1128: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 dummypat[MAX_PAT]; data/glimpse-4.18.7/glimpse/get_index.c:1145: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). if ((tmpfp = fopen(tempfile, "w")) == NULL) { data/glimpse-4.18.7/glimpse/get_index.c:1193:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(index_argv[patindex], "-z"); /* no-op: patterns are in patbufpos; also avoid shift-left of index_argv */ data/glimpse-4.18.7/glimpse/get_index.c:1256: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(curr_index_set, src_index_set, sizeof(int)*REAL_PARTITION); data/glimpse-4.18.7/glimpse/get_index.c:1262:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. else memcpy(curr_index_set, src_index_set, MAX_PARTITION * sizeof(int)); data/glimpse-4.18.7/glimpse/get_index.c:1269: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(curr_offset_table, src_offset_table, OneFilePerBlock * sizeof(struct offsets *)); data/glimpse-4.18.7/glimpse/main.c:39:1: [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 glimpse_reqbuf[MAX_ARGS*MAX_NAME_LEN]; data/glimpse-4.18.7/glimpse/main.c:90: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. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:91: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. extern char old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:144:1: [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 matched_terminals[MAXNUM_PAT]; /* ...[i] is 1 if i'th terminal matched: used in filter_output and eval_tree */ data/glimpse-4.18.7/glimpse/main.c:157: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:159:1: [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 indexnumberbuf[256]; /* to read in first few lines of the index */ data/glimpse-4.18.7/glimpse/main.c:160:1: [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 *index_argv[MAX_ARGS]; data/glimpse-4.18.7/glimpse/main.c:165:1: [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 tempfile[MAX_NAME_LEN]; data/glimpse-4.18.7/glimpse/main.c:170:1: [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 *agrep_argv[MAX_ARGS]; data/glimpse-4.18.7/glimpse/main.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 sig[SIGNATURE_LEN]; data/glimpse-4.18.7/glimpse/main.c:257: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(matched_region, GD_pattern, GD_length); data/glimpse-4.18.7/glimpse/main.c:258: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(matched_region+MAXPATT+2*MAX_REGION_LIMIT, GD_pattern, GD_length); data/glimpse-4.18.7/glimpse/main.c:375: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(curtextbegin - GD_length, GD_pattern, GD_length); data/glimpse-4.18.7/glimpse/main.c:467:1: [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 indexdir[MAXNAME]; data/glimpse-4.18.7/glimpse/main.c:470: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 s[MAXNAME]; data/glimpse-4.18.7/glimpse/main.c:487:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). indexfp = fopen(s, "r"); data/glimpse-4.18.7/glimpse/main.c:500: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). partfp = fopen(s, "r"); data/glimpse-4.18.7/glimpse/main.c:509:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). timesfp = fopen(s, "r"); data/glimpse-4.18.7/glimpse/main.c:512:17: [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). timesindexfp = fopen(s, "r"); data/glimpse-4.18.7/glimpse/main.c:521:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). debug = fopen(DEBUG_FILE, "w+"); data/glimpse-4.18.7/glimpse/main.c:560: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). minifp = fopen(s, "r"); data/glimpse-4.18.7/glimpse/main.c:610: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). if ((nullfp = fopen("/dev/null", "w")) == NULL) { data/glimpse-4.18.7/glimpse/main.c:620:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(INDEX_DIR, O_RDONLY)) == -1) return -1; data/glimpse-4.18.7/glimpse/main.c:698: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 indexdir[MAXNAME]; data/glimpse-4.18.7/glimpse/main.c:715: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 array[4]; data/glimpse-4.18.7/glimpse/main.c:756: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). if ((nullfp = fopen("/dev/null", "w")) == NULL) { data/glimpse-4.18.7/glimpse/main.c:845:18: [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). SERV_PORT = atoi(argv[0]); data/glimpse-4.18.7/glimpse/main.c:849:18: [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). SERV_PORT = atoi(p+1); data/glimpse-4.18.7/glimpse/main.c:1011: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 TMP_FILE_NAME[256]; data/glimpse-4.18.7/glimpse/main.c:1013: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(TMP_FILE_NAME,"/.glimpse_server"); data/glimpse-4.18.7/glimpse/main.c:1039: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((caddr_t)&serv_addr.sin_addr, hp->h_addr, hp->h_length); data/glimpse-4.18.7/glimpse/main.c:1153:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). clout = open("/dev/null", O_WRONLY); data/glimpse-4.18.7/glimpse/main.c:1198: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 TMP_FILE_NAME[256]; data/glimpse-4.18.7/glimpse/main.c:1200: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(TMP_FILE_NAME,"/.glimpse_server"); data/glimpse-4.18.7/glimpse/main.c:1218: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((caddr_t)&serv_addr.sin_addr, hp->h_addr, hp->h_length); data/glimpse-4.18.7/glimpse/main.c:1224: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. char errbuf[4096]; data/glimpse-4.18.7/glimpse/main.c:1263: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 tmpbuf[1024]; data/glimpse-4.18.7/glimpse/main.c:1305: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 indexdir[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:1306: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 temp_filenames_file[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:1307: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 temp_bitfield_file[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:1308: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 TEMP_FILE[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:1309: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 temp_file[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:1392:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(TEMP_DIR, "/tmp"); data/glimpse-4.18.7/glimpse/main.c:1475:28: [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. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:1620:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(agrep_argv[agrep_argc], "-H"); data/glimpse-4.18.7/glimpse/main.c:1634:5: [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(TEMP_FILE, "/."); data/glimpse-4.18.7/glimpse/main.c:1656:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ret = open(TEMP_FILE, O_RDONLY, 0)) <= 0) RETURN(ret); data/glimpse-4.18.7/glimpse/main.c:1692:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). GNumDays = atoi(argv[0]); data/glimpse-4.18.7/glimpse/main.c:1696:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). GNumDays = atoi(p+1); data/glimpse-4.18.7/glimpse/main.c:1712: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). RegionLimit = atoi(argv[0]); data/glimpse-4.18.7/glimpse/main.c:1716: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). RegionLimit = atoi(p+1); data/glimpse-4.18.7/glimpse/main.c:1756:18: [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). SERV_PORT = atoi(argv[0]); data/glimpse-4.18.7/glimpse/main.c:1762:18: [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). SERV_PORT = atoi(p+1); data/glimpse-4.18.7/glimpse/main.c:1893:31: [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. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:1958:33: [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. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:2027:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:2156: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 temp[MAX_NAME_SIZE+2]; data/glimpse-4.18.7/glimpse/main.c:2177:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). x = atoi(temp); data/glimpse-4.18.7/glimpse/main.c:2199:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). y = atoi(temp); data/glimpse-4.18.7/glimpse/main.c:2330: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). fp = fopen(bitfield_file, "r"); data/glimpse-4.18.7/glimpse/main.c:2462: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 cc[8]; data/glimpse-4.18.7/glimpse/main.c:2521:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cc[8]; data/glimpse-4.18.7/glimpse/main.c:2590: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 cc[8]; data/glimpse-4.18.7/glimpse/main.c:2649:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cc[8]; data/glimpse-4.18.7/glimpse/main.c:2664:4: [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(&agrep_argv[my_B_index][1], "%d", bestmatcherrors); data/glimpse-4.18.7/glimpse/main.c:2692:29: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/glimpse/main.c:2721:29: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/glimpse/main.c:2767:29: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/glimpse/main.c:2812:30: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/glimpse/main.c:2878:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tmpfp = fopen(tempfile, "w")) == NULL) { data/glimpse-4.18.7/glimpse/main.c:2883:28: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/glimpse/main.c:2964:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tmpfp = fopen(tempfile, "w")) == NULL) { data/glimpse-4.18.7/glimpse/main.c:2970:28: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/glimpse/main.c:3128:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *pbyteoff = atoi(temp); data/glimpse-4.18.7/glimpse/main.c:3166: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 s[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/main.c:3181:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outfp = fopen(outfile, "r")) == NULL) return 0; data/glimpse-4.18.7/glimpse/main.c:3188:30: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((displayfp = storefp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/glimpse/main.c:3390: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(filter_buf, final_end, residue); data/glimpse-4.18.7/glimpse/main.c:3391: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(filter_buf+residue, GD_pattern, GD_length); data/glimpse-4.18.7/glimpse/main.c:3451:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((storefp = fopen(s, "r")) != NULL) { data/glimpse-4.18.7/glimpse/split.c:92: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 tempbuf[MAX_LINE_LEN]; data/glimpse-4.18.7/glimpse/split.c:115: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(tempbuf, buffer, buffer_pat - buffer); data/glimpse-4.18.7/glimpse/split.c:145: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(terminals[*pnum_terminals].data.leaf.value, buffer, buffer_pat - buffer); /* without distinguishing delimiter */ data/glimpse-4.18.7/glimpse/split.c:148: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(&APattern[j], buffer, buffer_pat - buffer); data/glimpse-4.18.7/glimpse/split.c:156: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(&APattern[j], buffer, buffer_pat + 1 - buffer); data/glimpse-4.18.7/glimpse/split.c:208: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(*pval, &tokenbuf[i], tokenlen - i); data/glimpse-4.18.7/glimpse/split.c:220: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(*pval, tempbuf, j); data/glimpse-4.18.7/glimpse/split.c:365: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(oldtokenbuf, tokenbuf, tokenlen); data/glimpse-4.18.7/index/build_in.c:42: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:43: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. extern char sync_path[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:76: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. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:77: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. extern char old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:102:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char **name_list[MAXNUM_INDIRECT]; data/glimpse-4.18.7/index/build_in.c:121: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. extern unsigned char word[MAX_WORD_BUF]; data/glimpse-4.18.7/index/build_in.c:168:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char onechar[4]; data/glimpse-4.18.7/index/build_in.c:169:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char onestring[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:172:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:182:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/build_in.c:184:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f_out = open(s, O_WRONLY|O_CREAT|O_TRUNC, 0600)) == -1) { data/glimpse-4.18.7/index/build_in.c:292:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(onestring, "%d", ip->offset[0]); data/glimpse-4.18.7/index/build_in.c:606:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN], es1[MAX_LINE_LEN], es2[MAX_LINE_LEN], es3[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:607:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s1[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:718:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i1 = fopen(s, "r")) == NULL) { /* new stuff */ data/glimpse-4.18.7/index/build_in.c:723:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i2 = fopen(s, "r")) == NULL) { /* old stuff */ data/glimpse-4.18.7/index/build_in.c:728:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i3 = fopen(s, "w")) == NULL) { /* result */ data/glimpse-4.18.7/index/build_in.c:789:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char word[256]; data/glimpse-4.18.7/index/build_in.c:803:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:1335:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (!isalpha(((unsigned char *)word)[i])) break; data/glimpse-4.18.7/index/build_in.c:1493:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char word1[MAX_WORD_SIZE+6]; /* used only for strcmp() */ data/glimpse-4.18.7/index/build_in.c:1494:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char word2[MAX_WORD_SIZE+6]; /* used only for strcmp() */ data/glimpse-4.18.7/index/build_in.c:1985: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 s[MAX_LINE_LEN], es1[MAX_LINE_LEN], es2[MAX_LINE_LEN], temp_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:1986: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 s1[MAX_LINE_LEN]; data/glimpse-4.18.7/index/build_in.c:1992: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 indexnumberbuf[256]; data/glimpse-4.18.7/index/build_in.c:2012: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). if((i_in = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/index/build_in.c:2017:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((i_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/build_in.c:2196: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(&dest_index_buf[i], &src_index_buf[oldj], j - oldj); data/glimpse-4.18.7/index/convert.c:58:1: [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 glimpseindex_dir[MAX_LINE_LEN]; data/glimpse-4.18.7/index/convert.c:59:1: [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_prefix[MAX_LINE_LEN]; data/glimpse-4.18.7/index/convert.c:65:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char usualbuffer[USUALBUFFER_SIZE]; data/glimpse-4.18.7/index/convert.c:143:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char array[4]; data/glimpse-4.18.7/index/convert.c:210: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(file, &filenames_buffer[offset], lastoffset-offset); data/glimpse-4.18.7/index/convert.c:231:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char *buffer, array[4]; data/glimpse-4.18.7/index/convert.c:413: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 s[MAX_LINE_LEN]; data/glimpse-4.18.7/index/convert.c:414: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 name[MAX_LINE_LEN]; data/glimpse-4.18.7/index/convert.c:415: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 outname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/convert.c:564: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 outname[MAX_LINE_LEN]; /* place where converted output is stored */ data/glimpse-4.18.7/index/convert.c:565: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 s[MAX_LINE_LEN]; /* temp buffer */ data/glimpse-4.18.7/index/convert.c:566: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 realname[MAX_LINE_LEN]; /* name after prefix of neighbourhood file is added to it */ data/glimpse-4.18.7/index/convert.c:567: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 name[MAX_LINE_LEN]; /* name of file gotten from stdin: only if (InputFilenames) */ data/glimpse-4.18.7/index/convert.c:571: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 temp_rdelim[MAX_LINE_LEN]; /*indextype*/ data/glimpse-4.18.7/index/convert.c:607:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fdname = open(name, O_RDONLY, 0)) == -1) { data/glimpse-4.18.7/index/convert.c:625:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fdname_index = open(name, O_RDONLY, 0)) == -1) { data/glimpse-4.18.7/index/convert.c:650:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fdhash = open(name, O_RDONLY, 0)) == -1) { data/glimpse-4.18.7/index/convert.c:679:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fdhash_index = open(name, O_RDONLY, 0)) == -1) { data/glimpse-4.18.7/index/convert.c:738:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outname, "./.wgconvert.%d", getpid()); /* place where converted neighbourhoods are gonna be (./ => same file system as input :-) */ data/glimpse-4.18.7/index/convert.c:758: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(realname, name, lastslash+1); data/glimpse-4.18.7/index/convert.c:766:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((inputfile = fopen(realname, "r")) == NULL) { data/glimpse-4.18.7/index/convert.c:776:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outputfile = fopen(outname, "w")) == NULL) { data/glimpse-4.18.7/index/dir.c:53:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char **name_list[MAXNUM_INDIRECT]; /* store the file names */ data/glimpse-4.18.7/index/dir.c:58: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/dir.c:80: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. extern char exin_argv[8]; data/glimpse-4.18.7/index/dir.c:82: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. extern char current_dir_buf[2*MAX_LINE_LEN + 4]; /* must have space to store pattern after directory name */ data/glimpse-4.18.7/index/dir.c:83: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. extern unsigned char dummypat[MAX_PAT]; data/glimpse-4.18.7/index/dir.c:114:1: [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 outname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/dir.c:115:1: [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 inname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/dir.c:134: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 xinfo[MAX_LINE_LEN], temp[MAX_LINE_LEN]; data/glimpse-4.18.7/index/dir.c:179:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (strstr(name, (const char *)pat[i]) != NULL) {\ data/glimpse-4.18.7/index/dir.c:213:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (strstr(name, (const char *)inc[i]) != NULL) {\ data/glimpse-4.18.7/index/dir.c:243:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (strstr(name, (const char *)filter[i]) != NULL) {\ data/glimpse-4.18.7/index/filetype.c:27:1: [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 *member[MAX_4K_HASH]; data/glimpse-4.18.7/index/filetype.c:31: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/filetype.c:47:1: [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 xinfo[MAX_LINE_LEN]; /* atmost 1K info can be extracted */ data/glimpse-4.18.7/index/filetype.c:49:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[SAMPLE_SIZE+1]; data/glimpse-4.18.7/index/filetype.c:56: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 name_buffer[MAX_LINE_LEN]; data/glimpse-4.18.7/index/filetype.c:174: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 notitle[16]; data/glimpse-4.18.7/index/filetype.c:177: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 tr[256]; data/glimpse-4.18.7/index/filetype.c:191: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(notitle,"No Title"); data/glimpse-4.18.7/index/filetype.c:285: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 word[256]; data/glimpse-4.18.7/index/fixname.c:6:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/glimpse-4.18.7/index/getword.c:11: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. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:19: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:56: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. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:57: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. extern char old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:77: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. extern char **name_list[MAXNUM_INDIRECT]; data/glimpse-4.18.7/index/glimpse.c:86: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. extern char sync_path[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:91:1: [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 IProgname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:113: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 S[1024], s1[256], s2[256]; data/glimpse-4.18.7/index/glimpse.c:117:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(sync_path, "sync"); data/glimpse-4.18.7/index/glimpse.c:122:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(S, "r")) == NULL) { data/glimpse-4.18.7/index/glimpse.c:164:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *indexdir, es1[MAX_LINE_LEN], es2[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:165:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN], s1[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:166:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char working_dir[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:168:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hash_file[MAX_LINE_LEN], string_file[MAX_LINE_LEN], freq_file[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:169:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpbuf[1024]; data/glimpse-4.18.7/index/glimpse.c:171:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:172:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:301:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). threshold = atoi(argv[2]); data/glimpse-4.18.7/index/glimpse.c:310:18: [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). specialwords = atoi(argv[2]); data/glimpse-4.18.7/index/glimpse.c:320:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). m = atoi(argv[2]); data/glimpse-4.18.7/index/glimpse.c:343:24: [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). MAXWORDSPERFILE = atoi(argv[2]); data/glimpse-4.18.7/index/glimpse.c:351:39: [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). MAX_PER_MB = MAX_INDEX_PERCENT = atoi(argv[2]); data/glimpse-4.18.7/index/glimpse.c:360:24: [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). NUMERICWORDPERCENT = atoi(argv[2]); data/glimpse-4.18.7/index/glimpse.c:451:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/glimpse-4.18.7/index/glimpse.c:455: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). if ((filefp = fopen(buffer, "r")) == NULL) { data/glimpse-4.18.7/index/glimpse.c:460:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen(buffer, "w")) == NULL) { data/glimpse-4.18.7/index/glimpse.c:588:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((TIMEFILE = fopen(s, "w")) == 0) { data/glimpse-4.18.7/index/glimpse.c:595:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((LOGFILE = fopen(s, "w")) == 0) { data/glimpse-4.18.7/index/glimpse.c:602:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((MESSAGEFILE = fopen(s, "w")) == 0) { data/glimpse-4.18.7/index/glimpse.c:608:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((STATFILE = fopen(s, "a")) == 0) { data/glimpse-4.18.7/index/glimpse.c:832: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 temp_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/glimpse.c:1049:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tmpfp = fopen(s, "r")) != NULL) { data/glimpse-4.18.7/index/glimpse.c:1065:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:9: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:56:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[MAX_NAME_BUF]; data/glimpse-4.18.7/index/io.c:61: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). if((file_in = fopen(inputfile, "r")) == NULL) { data/glimpse-4.18.7/index/io.c:142: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). if((file_in = fopen(inputfile, "r")) == NULL) { data/glimpse-4.18.7/index/io.c:174: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). FILE *fp = fopen(s, "r"); data/glimpse-4.18.7/index/io.c:175:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:269:16: [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. so_pos = (char *)(filter_command[i] + len - 3); data/glimpse-4.18.7/index/io.c:314:7: [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(in_name, "r"); data/glimpse-4.18.7/index/io.c:315:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (in != NULL) out = fopen(out_name, "w"); data/glimpse-4.18.7/index/io.c:324: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 escaped_in[MAX_LINE_LEN], escaped_out[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:325: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 command[2 * MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:350: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). src = fopen(source, "r"); data/glimpse-4.18.7/index/io.c:351:29: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (src != NULL) dest = fopen(destination, "w"); data/glimpse-4.18.7/index/io.c:378:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filterbuf[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:379:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tempbuf[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:380:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:389:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filterfile = fopen(s, "r"); data/glimpse-4.18.7/index/io.c:434: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(tempbuf, &filterbuf[patpos], patlen); data/glimpse-4.18.7/index/io.c:453: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 name[MAX_LINE_LEN], es1[MAX_LINE_LEN], es2[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:455: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 s[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:458: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 dummybuf[4]; data/glimpse-4.18.7/index/io.c:459: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 prevoutname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:460: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 newoutname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:461: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 tempoutname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:462: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 tempinname[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:467:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((dummyout = fopen("/dev/null", "w")) == NULL) return 0; data/glimpse-4.18.7/index/io.c:581:1: [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 INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:582:1: [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 sync_path[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:615:1: [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 rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:616:1: [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 old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:678:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char word[MAX_WORD_BUF]; data/glimpse-4.18.7/index/io.c:869:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char s[MAX_LINE_LEN], word[MAX_NAME_LEN]; data/glimpse-4.18.7/index/io.c:893: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. strcpy((char *)mini_array[wordnum].word, (char *)word); data/glimpse-4.18.7/index/io.c:904:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char s[MAX_LINE_LEN], word[MAX_NAME_LEN]; data/glimpse-4.18.7/index/io.c:909: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 temp_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:913:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen(indexfile, "r")) == NULL) { data/glimpse-4.18.7/index/io.c:919: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). if ((minifp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/io.c:960: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). if ((minifp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/io.c:965:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/index/io.c:992:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char array[sizeof(int)]; data/glimpse-4.18.7/index/io.c:1018:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char s[MAX_LINE_LEN], array[sizeof(int)]; data/glimpse-4.18.7/index/io.c:1052:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char s[MAX_LINE_LEN], *t, word[MAX_NAME_LEN], c; data/glimpse-4.18.7/index/io.c:1053:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char indexnumber[MAX_LINE_LEN], onefileperblock[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:1061: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 es1[MAX_LINE_LEN], es2[MAX_LINE_LEN], es3[MAX_LINE_LEN], temp_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:1068:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen(indexfile, "r")) == NULL) { data/glimpse-4.18.7/index/io.c:1074:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((newindexfp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/io.c:1139:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((indexfp = fopen(indexfile, "r")) == NULL) { data/glimpse-4.18.7/index/io.c:1145:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((newindexfp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/io.c:1152: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). if ((minifp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/io.c:1345: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(temp, name, begin-1); data/glimpse-4.18.7/index/io.c:1349: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(temp, name, len); data/glimpse-4.18.7/index/io.c:1362: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 temp[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:1367:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fopen(temp, flag); data/glimpse-4.18.7/index/io.c:1376: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 temp[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:1381:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(temp, flag, mode); data/glimpse-4.18.7/index/io.c:1390: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 temp[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:1404: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 temp[MAX_LINE_LEN]; data/glimpse-4.18.7/index/io.c:1522: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 temp[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:12: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:13: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. extern char sync_path[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:16: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. extern char **name_list[MAXNUM_INDIRECT]; /* to store the file names */ data/glimpse-4.18.7/index/partition.c:33:1: [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 patbuf[MAX_PAT]; data/glimpse-4.18.7/index/partition.c:53:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:54: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. extern char old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:57: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:63:1: [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 *exin_argv[8]; data/glimpse-4.18.7/index/partition.c:65:1: [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 current_dir_buf[2*MAX_LINE_LEN + 4]; /* must have space to store pattern after directory name */ data/glimpse-4.18.7/index/partition.c:66:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char dummypat[MAX_PAT]; data/glimpse-4.18.7/index/partition.c:89:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char S[MAX_LINE_LEN], S1[MAX_LINE_LEN], es1[MAX_LINE_LEN], es2[MAX_LINE_LEN], es3[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:103:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:104:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char working_dir[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:112:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((dummyout = fopen("/dev/null", "w")) == NULL) return -1; data/glimpse-4.18.7/index/partition.c:119:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). patfile = fopen(s, "r"); data/glimpse-4.18.7/index/partition.c:140:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). incfile = fopen(s, "r"); data/glimpse-4.18.7/index/partition.c:244:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tmp_TIMEFILE = fopen(S, "r")) == NULL) { data/glimpse-4.18.7/index/partition.c:251:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((TIMEFILE = fopen(S, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:258:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((index_TIMEFILE = fopen(S, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:437:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:438:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char working_dir[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:445:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((dummyout = fopen("/dev/null", "w")) == NULL) return -1; data/glimpse-4.18.7/index/partition.c:452:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). patfile = fopen(s, "r"); data/glimpse-4.18.7/index/partition.c:473:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). incfile = fopen(s, "r"); data/glimpse-4.18.7/index/partition.c:605:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_LINE_LEN], s1[MAX_LINE_LEN], es1[MAX_LINE_LEN], es2[MAX_LINE_LEN], es3[MAX_LINE_LEN], temp_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:613:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char indexnumberbuf[256]; data/glimpse-4.18.7/index/partition.c:642:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((p_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:670:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:675:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i_in = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/index/partition.c:731:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:736:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i_in = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/index/partition.c:831:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((f_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:836:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:881:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((f_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:886:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((i_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:939: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 s[MAX_LINE_LEN], s1[MAX_LINE_LEN], es1[MAX_LINE_LEN], es2[MAX_LINE_LEN], es3[MAX_LINE_LEN], temp_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/index/partition.c:942: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 indexnumberbuf[256]; data/glimpse-4.18.7/index/partition.c:958:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((p_in = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/index/partition.c:965:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((i_in = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/index/partition.c:970:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((i_out = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/index/partition.c:992:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((i_in = fopen(s, "r")) != NULL) { /* minifile exists */ data/glimpse-4.18.7/index/partition.c:1011:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((i_in = fopen(s, "r")) == NULL) { data/glimpse-4.18.7/index/region.c:204: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). FILE *fp = fopen(filename, "w"); data/glimpse-4.18.7/index/region.c:237: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). FILE *fp = fopen(filename, "r"); data/glimpse-4.18.7/index/region.c:240: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 temp[1024]; /* max attr name */ data/glimpse-4.18.7/index/region.c:241:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024+32];/* max attr id pair */ data/glimpse-4.18.7/index/region.c:323: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 temp[1024]; data/glimpse-4.18.7/index/simpletest.c:100:1: [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 *suffixlist[NUM_SUFFIXES] = IGNORED_SUFFIXES; data/glimpse-4.18.7/index/utils.c:169: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 tbuf[MAX_PAT+2]; data/glimpse-4.18.7/libtemplate/include/ccache.h:132: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 fileName[MAX_FILENAME_LENGTH]; /* save if not in memory */ data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:36:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ], *s, *p; data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:37: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 attr[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:38: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 value[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:53:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(filename, "r")) == NULL) { data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:40:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ], attr[BUFSIZ], value[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:57:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(filename, "r")) == NULL) { data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:77:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(attr, "Description"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:45: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 s[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:71: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 s[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:93:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ], url[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:96: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 archive_site[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:99:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(archive_site, "Unknown"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:117:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(archive_site, "CICA DOS"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:119:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(archive_site, "Garbo DOS (Finland)"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:121:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(archive_site, "Hobbes OS/2"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:123:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(archive_site, "U. Lowell DOS Games"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:125:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(archive_site, "Oakland U. DOS"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:127:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(archive_site, "U. Michigan DOS"); data/glimpse-4.18.7/libtemplate/template/print-template.c:26:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/print-template.c:28: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(buf, "%u", (unsigned int) time(NULL)); data/glimpse-4.18.7/libtemplate/template/print-urlrefs.c:31: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 *s, url[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/template.c:44: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(l->data->value, value, l->data->vsize); data/glimpse-4.18.7/libtemplate/template/template.c:149: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(walker->data->value, value, vsize); data/glimpse-4.18.7/libtemplate/template/template.c:199: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(avp->value, walker->data->value, data/glimpse-4.18.7/libtemplate/template/template.c:233:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, avp->value, avp->vsize); data/glimpse-4.18.7/libtemplate/template/template.c:235:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + avp->vsize + 1, value, vsize); data/glimpse-4.18.7/libtemplate/template/template.c:356:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/template.c:365:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/template.c:533:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ], *p, *attribute, *value; data/glimpse-4.18.7/libtemplate/template/template.c:574: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). vsize = atoi(buf); data/glimpse-4.18.7/libtemplate/template/template.c:641:8: [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). an = atoi(p + 1); data/glimpse-4.18.7/libtemplate/template/template.c:649:8: [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). bn = atoi(p + 1); data/glimpse-4.18.7/libtemplate/template/template.c:716: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 *p, *q, buf[BUFSIZ]; data/glimpse-4.18.7/libtemplate/template/template.c:727:22: [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). nembed = (nembed < atoi(p)) ? atoi(p) : nembed; data/glimpse-4.18.7/libtemplate/template/template.c:727:33: [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). nembed = (nembed < atoi(p)) ? atoi(p) : nembed; data/glimpse-4.18.7/libtemplate/util/buffer.c:112: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(&b->data[b->length], s, sz); data/glimpse-4.18.7/libtemplate/util/harvest.c:31: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 bindir[MAXPATHLEN + 1]; data/glimpse-4.18.7/libtemplate/util/harvest.c:47: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 libdir[MAXPATHLEN + 1]; data/glimpse-4.18.7/libtemplate/util/harvest.c:63: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 topdir[MAXPATHLEN + 1]; data/glimpse-4.18.7/libtemplate/util/host.c:43:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXHOSTNAMELEN + 1]; data/glimpse-4.18.7/libtemplate/util/log.c:185: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[BUFSIZ]; data/glimpse-4.18.7/libtemplate/util/strdup.c:36: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(p, s, sz); /* copy string */ data/glimpse-4.18.7/libtemplate/util/system.c:67: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 *argv[64], buf[BUFSIZ]; data/glimpse-4.18.7/libtemplate/util/system.c:96:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0644)) < 0) { data/glimpse-4.18.7/libtemplate/util/system.c:144: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 *argv[64]; data/glimpse-4.18.7/libtemplate/util/system.c:145: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[BUFSIZ], i; data/glimpse-4.18.7/main.c:39:1: [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 glimpse_reqbuf[MAX_ARGS*MAX_NAME_LEN]; data/glimpse-4.18.7/main.c:90: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. extern char rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:91: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. extern char old_rdelim[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:144:1: [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 matched_terminals[MAXNUM_PAT]; /* ...[i] is 1 if i'th terminal matched: used in filter_output and eval_tree */ data/glimpse-4.18.7/main.c:157: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. extern char INDEX_DIR[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:159:1: [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 indexnumberbuf[256]; /* to read in first few lines of the index */ data/glimpse-4.18.7/main.c:160:1: [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 *index_argv[MAX_ARGS]; data/glimpse-4.18.7/main.c:165:1: [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 tempfile[MAX_NAME_LEN]; data/glimpse-4.18.7/main.c:170:1: [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 *agrep_argv[MAX_ARGS]; data/glimpse-4.18.7/main.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 sig[SIGNATURE_LEN]; data/glimpse-4.18.7/main.c:257: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(matched_region, GD_pattern, GD_length); data/glimpse-4.18.7/main.c:258: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(matched_region+MAXPATT+2*MAX_REGION_LIMIT, GD_pattern, GD_length); data/glimpse-4.18.7/main.c:375: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(curtextbegin - GD_length, GD_pattern, GD_length); data/glimpse-4.18.7/main.c:467:1: [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 indexdir[MAXNAME]; data/glimpse-4.18.7/main.c:470: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 s[MAXNAME]; data/glimpse-4.18.7/main.c:487:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). indexfp = fopen(s, "r"); data/glimpse-4.18.7/main.c:500: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). partfp = fopen(s, "r"); data/glimpse-4.18.7/main.c:509:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). timesfp = fopen(s, "r"); data/glimpse-4.18.7/main.c:512:17: [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). timesindexfp = fopen(s, "r"); data/glimpse-4.18.7/main.c:521:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). debug = fopen(DEBUG_FILE, "w+"); data/glimpse-4.18.7/main.c:560: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). minifp = fopen(s, "r"); data/glimpse-4.18.7/main.c:610: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). if ((nullfp = fopen("/dev/null", "w")) == NULL) { data/glimpse-4.18.7/main.c:620:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(INDEX_DIR, O_RDONLY)) == -1) return -1; data/glimpse-4.18.7/main.c:698: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 indexdir[MAXNAME]; data/glimpse-4.18.7/main.c:715: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 array[4]; data/glimpse-4.18.7/main.c:756: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). if ((nullfp = fopen("/dev/null", "w")) == NULL) { data/glimpse-4.18.7/main.c:845:18: [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). SERV_PORT = atoi(argv[0]); data/glimpse-4.18.7/main.c:849:18: [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). SERV_PORT = atoi(p+1); data/glimpse-4.18.7/main.c:1011: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 TMP_FILE_NAME[256]; data/glimpse-4.18.7/main.c:1013: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(TMP_FILE_NAME,"/.glimpse_server"); data/glimpse-4.18.7/main.c:1039: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((caddr_t)&serv_addr.sin_addr, hp->h_addr, hp->h_length); data/glimpse-4.18.7/main.c:1153:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). clout = open("/dev/null", O_WRONLY); data/glimpse-4.18.7/main.c:1198: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 TMP_FILE_NAME[256]; data/glimpse-4.18.7/main.c:1200: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(TMP_FILE_NAME,"/.glimpse_server"); data/glimpse-4.18.7/main.c:1218: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((caddr_t)&serv_addr.sin_addr, hp->h_addr, hp->h_length); data/glimpse-4.18.7/main.c:1224: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. char errbuf[4096]; data/glimpse-4.18.7/main.c:1263: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 tmpbuf[1024]; data/glimpse-4.18.7/main.c:1305: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 indexdir[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:1306: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 temp_filenames_file[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:1307: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 temp_bitfield_file[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:1308: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 TEMP_FILE[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:1309: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 temp_file[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:1392:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(TEMP_DIR, "/tmp"); data/glimpse-4.18.7/main.c:1475:28: [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. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:1620:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(agrep_argv[agrep_argc], "-H"); data/glimpse-4.18.7/main.c:1634:5: [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(TEMP_FILE, "/."); data/glimpse-4.18.7/main.c:1656:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ret = open(TEMP_FILE, O_RDONLY, 0)) <= 0) RETURN(ret); data/glimpse-4.18.7/main.c:1692:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). GNumDays = atoi(argv[0]); data/glimpse-4.18.7/main.c:1696:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). GNumDays = atoi(p+1); data/glimpse-4.18.7/main.c:1712: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). RegionLimit = atoi(argv[0]); data/glimpse-4.18.7/main.c:1716: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). RegionLimit = atoi(p+1); data/glimpse-4.18.7/main.c:1756:18: [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). SERV_PORT = atoi(argv[0]); data/glimpse-4.18.7/main.c:1762:18: [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). SERV_PORT = atoi(p+1); data/glimpse-4.18.7/main.c:1893:31: [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. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:1958:33: [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. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:2027:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:2156: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 temp[MAX_NAME_SIZE+2]; data/glimpse-4.18.7/main.c:2177:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). x = atoi(temp); data/glimpse-4.18.7/main.c:2199:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). y = atoi(temp); data/glimpse-4.18.7/main.c:2330: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). fp = fopen(bitfield_file, "r"); data/glimpse-4.18.7/main.c:2462: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 cc[8]; data/glimpse-4.18.7/main.c:2521:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cc[8]; data/glimpse-4.18.7/main.c:2590: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 cc[8]; data/glimpse-4.18.7/main.c:2649:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cc[8]; data/glimpse-4.18.7/main.c:2664:4: [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(&agrep_argv[my_B_index][1], "%d", bestmatcherrors); data/glimpse-4.18.7/main.c:2692:29: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/main.c:2721:29: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/main.c:2767:29: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/main.c:2812:30: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/main.c:2878:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tmpfp = fopen(tempfile, "w")) == NULL) { data/glimpse-4.18.7/main.c:2883:28: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/main.c:2964:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tmpfp = fopen(tempfile, "w")) == NULL) { data/glimpse-4.18.7/main.c:2970:28: [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. if (GPRINTFILENUMBER) sprintf(CurrentFileName, "%d", GFileIndex[i]); data/glimpse-4.18.7/main.c:3128:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *pbyteoff = atoi(temp); data/glimpse-4.18.7/main.c:3166: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 s[MAX_LINE_LEN]; data/glimpse-4.18.7/main.c:3181:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outfp = fopen(outfile, "r")) == NULL) return 0; data/glimpse-4.18.7/main.c:3188:30: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((displayfp = storefp = fopen(s, "w")) == NULL) { data/glimpse-4.18.7/main.c:3390: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(filter_buf, final_end, residue); data/glimpse-4.18.7/main.c:3391: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(filter_buf+residue, GD_pattern, GD_length); data/glimpse-4.18.7/main.c:3451:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((storefp = fopen(s, "r")) != NULL) { data/glimpse-4.18.7/split.c:92: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 tempbuf[MAX_LINE_LEN]; data/glimpse-4.18.7/split.c:115: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(tempbuf, buffer, buffer_pat - buffer); data/glimpse-4.18.7/split.c:145: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(terminals[*pnum_terminals].data.leaf.value, buffer, buffer_pat - buffer); /* without distinguishing delimiter */ data/glimpse-4.18.7/split.c:148: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(&APattern[j], buffer, buffer_pat - buffer); data/glimpse-4.18.7/split.c:156: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(&APattern[j], buffer, buffer_pat + 1 - buffer); data/glimpse-4.18.7/split.c:208: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(*pval, &tokenbuf[i], tokenlen - i); data/glimpse-4.18.7/split.c:220: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(*pval, tempbuf, j); data/glimpse-4.18.7/split.c:365: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(oldtokenbuf, tokenbuf, tokenlen); data/glimpse-4.18.7/agrep/agrep.c:148:4: [1] (buffer) strlen: Does not handle 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(s) - 1] = '\0'; data/glimpse-4.18.7/agrep/agrep.c:264:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(tc_D_pattern, "\n"); data/glimpse-4.18.7/agrep/agrep.c:615:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, buffer+num_read, Maxline); data/glimpse-4.18.7/agrep/agrep.c:1106:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, buffer+num_read, Maxline); data/glimpse-4.18.7/agrep/agrep.c:1624:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer+Maxline-ResidueSize, buffer+lasti, ResidueSize); data/glimpse-4.18.7/agrep/agrep.c:2045:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, buffer+num_read, Maxline); data/glimpse-4.18.7/agrep/agrep.c:2464:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Progname, argv[0], MAXNAME); data/glimpse-4.18.7/agrep/agrep.c:2625: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). if ((D_length = strlen(argv[0])) > MaxDelimit) { data/glimpse-4.18.7/agrep/agrep.c:2642: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). if ((D_length = strlen(p + 1)) > MaxDelimit) { data/glimpse-4.18.7/agrep/agrep.c:2842:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[0] == NULL) || ((multilen = strlen(argv[0])) <= 0)) { data/glimpse-4.18.7/agrep/agrep.c:3016:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(COMP_DIR, home, MAX_LINE_LEN); data/glimpse-4.18.7/agrep/agrep.c:3020:2: [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(FREQ_FILE, "/"); data/glimpse-4.18.7/agrep/agrep.c:3023:2: [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(HASH_FILE, "/"); data/glimpse-4.18.7/agrep/agrep.c:3026:2: [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(STRING_FILE, "/"); data/glimpse-4.18.7/agrep/agrep.c:3087: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). if (!(Textfiles[Numfiles] = (CHAR *)malloc((strlen(*argv)+2)))) { data/glimpse-4.18.7/agrep/agrep.c:3102:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). M = strlen(Pattern); data/glimpse-4.18.7/agrep/agrep.c:3127:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pattern_buffer, Pattern, M+1); /* copy \0 */ data/glimpse-4.18.7/agrep/agrep.c:3206:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Pattern, pattern_buffer, pattern_len+1); /* copy \0 */ data/glimpse-4.18.7/agrep/agrep.c:3207: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). M = strlen(Pattern); data/glimpse-4.18.7/agrep/agrep.c:3264: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). if (!(Textfiles[Numfiles] = (CHAR *)malloc((strlen(*(char **)input)+2)))) { data/glimpse-4.18.7/agrep/agrep.c:3310: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). M = strlen(OldPattern); data/glimpse-4.18.7/agrep/agrep.c:3458:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(SGREP) ret = sgrep(OldPattern, strlen(OldPattern), fd, D, 0); data/glimpse-4.18.7/agrep/agrep.c:3519: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). if (!tuncompressible_filename(file_list[i], strlen(file_list[i]))) TCOMPRESSED = OFF; data/glimpse-4.18.7/agrep/agrep.c:3528:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(SGREP) ret = sgrep(OldPattern, strlen(OldPattern), fd, D, i); data/glimpse-4.18.7/agrep/agrep.c:3738: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). if(SGREP) ret = sgrep(OldPattern,strlen(OldPattern),fd,D, i); data/glimpse-4.18.7/agrep/agrep.c:3790: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). if(SGREP) ret = sgrep(OldPattern,strlen(OldPattern),fd,D, i); data/glimpse-4.18.7/agrep/agrep.c:3842: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(fname); data/glimpse-4.18.7/agrep/asearch.c:50: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). D_length = strlen((const char *)old_D_pat); data/glimpse-4.18.7/agrep/asearch.c:84:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)(buffer+end), (const char *)old_D_pat, D_length); data/glimpse-4.18.7/agrep/asearch.c:360:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)(buffer+Max_record-ResidueSize), (const char *)(buffer+lasti), ResidueSize); data/glimpse-4.18.7/agrep/asearch.c:679: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). D_length = strlen((const char *)old_D_pat); data/glimpse-4.18.7/agrep/asearch.c:705:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)(buffer+end), (const char *)old_D_pat, D_length); data/glimpse-4.18.7/agrep/asearch.c:924:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)(buffer+Max_record-ResidueSize), (const char *)(buffer+lasti), ResidueSize); data/glimpse-4.18.7/agrep/asearch1.c:42: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). D_length = strlen(old_D_pat); data/glimpse-4.18.7/agrep/asearch1.c:77:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer+Max_record+num_read, old_D_pat, D_length); data/glimpse-4.18.7/agrep/asearch1.c:287:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer+Max_record-ResidueSize, buffer+lasti, ResidueSize); data/glimpse-4.18.7/agrep/asplit.c:376: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). word_length = strlen(aterminals[first].data.leaf.value); data/glimpse-4.18.7/agrep/bitap.c:57: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). D_length = strlen(old_D_pat); data/glimpse-4.18.7/agrep/bitap.c:122:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer+Max_record+num_read, old_D_pat, D_length); data/glimpse-4.18.7/agrep/bitap.c:297:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer+Max_record-ResidueSize, buffer+lasti, ResidueSize); data/glimpse-4.18.7/agrep/bitap.c:520:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). num_read = read(fd, buf+total_read, record_size - total_read); data/glimpse-4.18.7/agrep/checksg.c:24:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). m = strlen(Pattern); data/glimpse-4.18.7/agrep/delim.c:27: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). *pdestlen = strlen(dest); data/glimpse-4.18.7/agrep/follow.c:29: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). s1 = malloc((unsigned) strlen(s)+4+1); data/glimpse-4.18.7/agrep/follow.c:30:9: [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. return strcat(strcat(strcpy(s1, ".*("), s), ")"); data/glimpse-4.18.7/agrep/io.c:18:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). num_read = read(fd, buf+total_read, record_size - total_read); data/glimpse-4.18.7/agrep/maskgen.c:28: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). fprintf(stderr, "maskgen: len=%d, pat=%s, D=%d\n", strlen(Pattern), Pattern, D); data/glimpse-4.18.7/agrep/maskgen.c:34:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((M = strlen(Pattern)) <= 0) return 0; data/glimpse-4.18.7/agrep/newmgrep.c:287: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). p = strlen(patt[i]); data/glimpse-4.18.7/agrep/newmgrep.c:377:70: [1] (buffer) strlen: Does not handle 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 ((tc_length = quick_tcompress(FREQ_FILE, HASH_FILE, tc_patt[p], strlen(tc_patt[p]), tc_buf, MAXPAT * 2 - 8, TC_EASYSEARCH)) > 0) { data/glimpse-4.18.7/agrep/newmgrep.c:393: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). p = strlen(tc_patt[i]); data/glimpse-4.18.7/agrep/newmgrep.c:543:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(text+start, text+end, residue); data/glimpse-4.18.7/agrep/newmgrep.c:2001: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). leni = strlen(aterminals[i].data.leaf.value); data/glimpse-4.18.7/agrep/newmgrep.c:2007: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). lenj = strlen(aterminals[j].data.leaf.value); data/glimpse-4.18.7/agrep/preprocess.c:51:76: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fprintf(stderr, "preprocess: m=%d, pat=%s, PAT_FILE=%d, PAT_BUFFER=%d\n", strlen(Pattern), Pattern, PAT_FILE, PAT_BUFFER); data/glimpse-4.18.7/agrep/preprocess.c:53:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((m = strlen(Pattern)) <= 0) return 0; data/glimpse-4.18.7/agrep/preprocess.c:80: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). m = strlen(Pattern); data/glimpse-4.18.7/agrep/preprocess.c:113: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). r_pat = (CHAR *) malloc(strlen(Pattern)+2*strlen(D_pattern) + 8); /* bug-report, From: Chris Dalton <crd@hplb.hpl.hp.com> */ data/glimpse-4.18.7/agrep/preprocess.c:113:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r_pat = (CHAR *) malloc(strlen(Pattern)+2*strlen(D_pattern) + 8); /* bug-report, From: Chris Dalton <crd@hplb.hpl.hp.com> */ data/glimpse-4.18.7/agrep/preprocess.c:115: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). d_end = t = strlen(temp); /* size of D_pattern, including '; ' */ data/glimpse-4.18.7/agrep/preprocess.c:122: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). m = strlen(temp); data/glimpse-4.18.7/agrep/preprocess.c:136: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). m = strlen(temp); data/glimpse-4.18.7/agrep/recursive.c:20: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). # define NAMLEN(dirent) strlen((dirent)->d_name) data/glimpse-4.18.7/agrep/recursive.c:147: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). nbp = name + strlen(name); data/glimpse-4.18.7/agrep/sgrep.c:193:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pat, in_pat, MAXLINE); data/glimpse-4.18.7/agrep/sgrep.c:2137:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). m = strlen(Pattern); data/glimpse-4.18.7/agrep/sgrep.c:2219:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). m = strlen(Pattern); data/glimpse-4.18.7/communicate.c:59:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, ptr, nleft); data/glimpse-4.18.7/communicate.c:254: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(argv[i]); data/glimpse-4.18.7/compress/cast.c:749: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). inlen = strlen(tempname); data/glimpse-4.18.7/compress/cast.c:785:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(outname, tempname, MAX_LINE_LEN); data/glimpse-4.18.7/compress/cast.c:786:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (inlen + strlen(COMP_SUFFIX) + 1 >= MAX_LINE_LEN) { data/glimpse-4.18.7/compress/cast.c:787: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). outname[MAX_LINE_LEN - strlen(COMP_SUFFIX)] = '\0'; data/glimpse-4.18.7/compress/hash.c:184: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). len = strlen(word); data/glimpse-4.18.7/compress/hash.c:280:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fprintf(hashfp, "%d %d %s\n", thash64k(e->word, strlen(e->word)), wordindex, e->word); /* must look like I used 64K table */ data/glimpse-4.18.7/compress/hash.c:342:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((int1 = getc(fp)) == '\n') return 0; /* padded area */ data/glimpse-4.18.7/compress/hash.c:344:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((int1 = getc(fp)) == EOF) return -1; data/glimpse-4.18.7/compress/hash.c:345:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((int2 = getc(fp)) == EOF) return -1; data/glimpse-4.18.7/compress/hash.c:347:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((int1 = getc(fp)) == EOF) return -1; data/glimpse-4.18.7/compress/hash.c:348:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((int2 = getc(fp)) == EOF) return -1; data/glimpse-4.18.7/compress/hash.c:353:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = getc(fp)) != EOF) { data/glimpse-4.18.7/compress/hash.c:491:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/compress/hash.c:497: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). initlen = strlen((char *)srcinit); data/glimpse-4.18.7/compress/hash.c:499: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). endlen = strlen((char *)srcend); data/glimpse-4.18.7/compress/hash.c:560: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). len = strlen((char *)buf); data/glimpse-4.18.7/compress/hash.c:578: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). offset += strlen((char *)word)+5; data/glimpse-4.18.7/compress/hash.c:581: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((char *)buf); data/glimpse-4.18.7/compress/hash.c:624: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). offset += strlen((char *)word)+5; data/glimpse-4.18.7/compress/main_cast.c:117:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(comp_dir, home, MAXNAME); data/glimpse-4.18.7/compress/main_cast.c:120:2: [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(hash_file, "/"); data/glimpse-4.18.7/compress/main_cast.c:123:2: [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(freq_file, "/"); data/glimpse-4.18.7/compress/main_tbuild.c:59:22: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(comp_dir, home, MAX_LINE_LEN); data/glimpse-4.18.7/compress/main_uncast.c:121:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(comp_dir, home, MAXNAME); data/glimpse-4.18.7/compress/main_uncast.c:124:2: [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(string_file, "/"); data/glimpse-4.18.7/compress/main_uncast.c:127:2: [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(freq_file, "/"); data/glimpse-4.18.7/compress/misc.c:52:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fp != NULL) c = getc(fp); data/glimpse-4.18.7/compress/string.c:58:43: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((numread <= MAX_WORD_LEN) && ((c = getc(fp)) != EOF)) { data/glimpse-4.18.7/compress/string.c:182:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/compress/string.c:250: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). len = strlen((char *)buf); data/glimpse-4.18.7/compress/string.c:257: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((char *)buf); data/glimpse-4.18.7/compress/tbuild.c:52:9: [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(hash_file, "/"); data/glimpse-4.18.7/compress/tbuild.c:55:9: [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(freq_file, "/"); data/glimpse-4.18.7/compress/tbuild.c:58:9: [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(string_file, "/"); data/glimpse-4.18.7/compress/tbuild.c:61:9: [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(index_file, "/"); data/glimpse-4.18.7/compress/tbuild.c:95:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = getc(fp)) != EOF) { data/glimpse-4.18.7/compress/tbuild.c:98:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = getc(fp) != '\n') && (c != EOF)); data/glimpse-4.18.7/compress/tbuild.c:115: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). curlen = strlen((char *)curword); data/glimpse-4.18.7/compress/tbuild.c:171: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((char *)s); data/glimpse-4.18.7/compress/tbuild.c:194: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). insert_small_hash(dict_hash_table, s, strlen((char *)s), -1, offset); /* dummy doesn't matter now: its is just a computed-value for sort */ data/glimpse-4.18.7/compress/tbuild.c:208: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). while (strlen((char*)rands) < SIGNATURE_LEN - 1) { data/glimpse-4.18.7/compress/tbuild.c:243: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). fwrite(s, 1, strlen((char *)s), awkfp); data/glimpse-4.18.7/compress/tbuild.c:252:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/compress/tbuild.c:265: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). fwrite(s, 1, strlen((char *)s), awkfp); data/glimpse-4.18.7/compress/tbuild.c:274:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/compress/tbuild.c:283: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). fwrite(s, 1, strlen((char *)s), awkfp); data/glimpse-4.18.7/compress/tbuild.c:294:21: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf("stage3:"); getchar(); data/glimpse-4.18.7/compress/test.c:21:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int srclen = strlen(src); data/glimpse-4.18.7/compress/tmemlook.c:23:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp((char *)pattern+1, text, strlen((char *)pattern) -1) == 0) { data/glimpse-4.18.7/compress/trecursive.c:12: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). # define NAMLEN(dirent) strlen((dirent)->d_name) data/glimpse-4.18.7/compress/trecursive.c:54:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(buf, "."); data/glimpse-4.18.7/compress/trecursive.c:94: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). nbp = name + strlen(name); data/glimpse-4.18.7/compress/uncast.c:107: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). len = strlen(tempname); data/glimpse-4.18.7/compress/uncast.c:108: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 ((len < strlen(COMP_SUFFIX) + 1) || (strcmp(&tempname[len-strlen(COMP_SUFFIX)], COMP_SUFFIX))) return 0; data/glimpse-4.18.7/compress/uncast.c:108:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len < strlen(COMP_SUFFIX) + 1) || (strcmp(&tempname[len-strlen(COMP_SUFFIX)], COMP_SUFFIX))) return 0; data/glimpse-4.18.7/compress/uncast.c:121:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!tuncompressible_filename(name, strlen(name))) return 0; data/glimpse-4.18.7/compress/uncast.c:559: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). inlen = strlen(tempname); data/glimpse-4.18.7/compress/uncast.c:583:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(outname, tempname, MAX_LINE_LEN); data/glimpse-4.18.7/compress/uncast.c:584: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). outname[inlen - strlen(COMP_SUFFIX)] = '\0'; data/glimpse-4.18.7/get_filename.c:64: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). first_line_len = strlen(buffer); data/glimpse-4.18.7/get_filename.c:308:2: [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(tempfile, "/"); data/glimpse-4.18.7/get_filename.c:350:2: [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(tempfile, "/"); data/glimpse-4.18.7/glimpse/communicate.c:59:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, ptr, nleft); data/glimpse-4.18.7/glimpse/communicate.c:254: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(argv[i]); data/glimpse-4.18.7/glimpse/get_filename.c:64: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). first_line_len = strlen(buffer); data/glimpse-4.18.7/glimpse/get_filename.c:308:2: [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(tempfile, "/"); data/glimpse-4.18.7/glimpse/get_filename.c:350:2: [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(tempfile, "/"); data/glimpse-4.18.7/glimpse/main.c:266:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!tuncompressible_filename(file_list[i], strlen(file_list[i]))) TCOMPRESSED = OFF; data/glimpse-4.18.7/glimpse/main.c:478:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(indexdir, home, MAXNAME); data/glimpse-4.18.7/glimpse/main.c:545: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). rdelim_len = strlen(rdelim); data/glimpse-4.18.7/glimpse/main.c:678:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write(svstderr, QUITREQUESTMSG, strlen(QUITREQUESTMSG)); data/glimpse-4.18.7/glimpse/main.c:750:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(077); data/glimpse-4.18.7/glimpse/main.c:1018: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). len = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family); data/glimpse-4.18.7/glimpse/main.c:1202: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). len = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family); data/glimpse-4.18.7/glimpse/main.c:1266:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(sockfd, tmpbuf, 1024)) > 0) { data/glimpse-4.18.7/glimpse/main.c:1434:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(GD_pattern, "\n"); data/glimpse-4.18.7/glimpse/main.c:1435: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). GD_length = strlen(GD_pattern); data/glimpse-4.18.7/glimpse/main.c:1475:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:1568: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). if ((dummylen = strlen(argv[0])) > MAXFILEOPT) { data/glimpse-4.18.7/glimpse/main.c:1575: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). if ((dummylen = strlen(p+1)) > MAXFILEOPT) { data/glimpse-4.18.7/glimpse/main.c:1622: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). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(indexdir) + 2); data/glimpse-4.18.7/glimpse/main.c:1633:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(temp_file, "."); data/glimpse-4.18.7/glimpse/main.c:1657:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((num_read = read(ret, matched_region, MAX_REGION_LIMIT*2)) > 0) { data/glimpse-4.18.7/glimpse/main.c:1823:6: [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(temp_bitfield_file, "/"); data/glimpse-4.18.7/glimpse/main.c:1847:6: [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(temp_filenames_file, "/"); data/glimpse-4.18.7/glimpse/main.c:1893: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). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:1945:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (c == 'd') && ((D_length = strlen(argv[0])) > MAX_NAME_SIZE) ) { data/glimpse-4.18.7/glimpse/main.c:1958:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:1968:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (c == 'd') && ((D_length = strlen(p+1)) > MAX_NAME_SIZE) ) { data/glimpse-4.18.7/glimpse/main.c:1981:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(p+1) + 2); data/glimpse-4.18.7/glimpse/main.c:2027:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/glimpse/main.c:2150:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). AM=strlen(APattern); data/glimpse-4.18.7/glimpse/main.c:2165:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(dest_index_buf, "BEGIN", strlen("BEGIN"))) break; data/glimpse-4.18.7/glimpse/main.c:2167: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). sscanf(&dest_index_buf[strlen("BEGIN")], "%d%d%d", &bestmatcherrors, &NOBYTELEVEL, &OPTIMIZEBYTELEVEL); data/glimpse-4.18.7/glimpse/main.c:2172: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). if (!strncmp(dest_index_buf, "END", strlen("END"))) break; data/glimpse-4.18.7/glimpse/main.c:2323:118: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). NOBYTELEVEL, OPTIMIZEBYTELEVEL, src_index_set[REAL_PARTITION - 2], src_index_set[REAL_PARTITION - 1], num_blocks, strlen(APattern), APattern, WHOLEFILESCOPE); data/glimpse-4.18.7/glimpse/main.c:2344:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nextchar = getc(fp)) != EOF) { data/glimpse-4.18.7/glimpse/main.c:2347:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(fp)) == EOF) break; data/glimpse-4.18.7/glimpse/main.c:2350:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(fp)) == EOF) break; data/glimpse-4.18.7/glimpse/main.c:2353:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(fp)) == EOF) break; data/glimpse-4.18.7/glimpse/main.c:2392:49: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i < BITFIELDLENGTH) && (nextchar = getc(fp)) != EOF) { data/glimpse-4.18.7/glimpse/main.c:2565: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). fileopt_length = strlen(FileOpt); data/glimpse-4.18.7/glimpse/main.c:2566:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(index_argv[index_argc],FileOpt+j,fileopt_length-j); data/glimpse-4.18.7/glimpse/main.c:3286: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). if (memagrep_search( strlen(terminals[i].data.leaf.value), terminals[i].data.leaf.value, data/glimpse-4.18.7/glimpse/split.c:117: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(tempbuf); data/glimpse-4.18.7/glimpse/split.c:312: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). *apatptr += strlen(n->data.leaf.value); data/glimpse-4.18.7/glimpse/split.c:388: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). *apatptr += strlen(n->data.leaf.value); data/glimpse-4.18.7/glimpse/split.c:516: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). buffer_end = buffer + strlen(terminals[first].data.leaf.value); data/glimpse-4.18.7/glimpse/split.c:520: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). word_length = strlen(word); data/glimpse-4.18.7/index/build_in.c:293: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). write(f_out, onestring, strlen(onestring)); data/glimpse-4.18.7/index/build_in.c:580: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). memory_usage -= (strlen(tp_old->word) + 1); data/glimpse-4.18.7/index/build_in.c:921:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((toread > 0) && ((num_read = read(fd, bx, toread)) < toread)) { data/glimpse-4.18.7/index/build_in.c:1131:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((toread > 0) && ((num_read = read(fd, bx, toread)) < toread)) { data/glimpse-4.18.7/index/build_in.c:1262: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 wordlen = strlen(word); data/glimpse-4.18.7/index/build_in.c:1509: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). dest_end_pt = strlen(dest_index_buf); data/glimpse-4.18.7/index/build_in.c:1518: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). src_end_pt = strlen(src_index_buf); data/glimpse-4.18.7/index/build_in.c:1534: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). dest_end_pt = strlen(dest_index_buf); data/glimpse-4.18.7/index/build_in.c:1558: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). merge_len = strlen(src_index_buf); /* merge_index_buf[merge_len] is '\0', merge_index_buf[merge_len-1] is a part of the word */ data/glimpse-4.18.7/index/build_in.c:1612: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). merge_len = strlen(merge_index_buf); data/glimpse-4.18.7/index/build_in.c:1788: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). bdx = strlen(merge_index_buf); /* merge_index_buf[bdx] is '\0', merge_index_buf[bdx-1] is '\n' */ data/glimpse-4.18.7/index/build_in.c:1867: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). dest_end_pt = strlen(dest_index_buf); data/glimpse-4.18.7/index/build_in.c:1880: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). src_end_pt = strlen(src_index_buf); data/glimpse-4.18.7/index/build_in.c:1890: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). dest_end_pt = strlen(dest_index_buf); data/glimpse-4.18.7/index/build_in.c:1904: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). memory_usage -= (strlen(LIST_GET(name_list, fileindex)) + 2); data/glimpse-4.18.7/index/convert.c:122:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (len != read(fd, *buffer, len)) { data/glimpse-4.18.7/index/convert.c:150:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fdi, array, 4) != 4) { data/glimpse-4.18.7/index/convert.c:155:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fdi, array, 4) == 4) { data/glimpse-4.18.7/index/convert.c:164:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, file, lastoffset - offset); data/glimpse-4.18.7/index/convert.c:165:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else len = read(fd, file, MAX_LINE_LEN); data/glimpse-4.18.7/index/convert.c:243:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(fdi, array, 4)) != 4) { data/glimpse-4.18.7/index/convert.c:250:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fdi, array, 4) == 4) { data/glimpse-4.18.7/index/convert.c:268:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (size != read(fd, buffer, size)) { data/glimpse-4.18.7/index/convert.c:274: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). for (i=0; i<size; i+=4+strlen((char *)&buffer[i+4])+1) { data/glimpse-4.18.7/index/convert.c:355: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). for (i=0; i<size; i+=4+strlen((char *)&buffer[i+4])+1) { data/glimpse-4.18.7/index/convert.c:423: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). name_len = strlen(name); data/glimpse-4.18.7/index/convert.c:426: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). name_len = strlen(name); data/glimpse-4.18.7/index/convert.c:459:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nextchar = getc(inputfile)) != EOF) { data/glimpse-4.18.7/index/convert.c:462:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(inputfile)) == EOF) break; data/glimpse-4.18.7/index/convert.c:465:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(inputfile)) == EOF) break; data/glimpse-4.18.7/index/convert.c:468:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(inputfile)) == EOF) break; data/glimpse-4.18.7/index/convert.c:503:60: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i < sizeof(int) * index_set_size) && (nextchar = getc(inputfile)) != EOF) { data/glimpse-4.18.7/index/convert.c:744: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). name_len = strlen(name); data/glimpse-4.18.7/index/convert.c:891:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(glimpseindex_dir, argv[2], MAX_LINE_LEN); data/glimpse-4.18.7/index/convert.c:899:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename_prefix, argv[2], MAX_LINE_LEN); data/glimpse-4.18.7/index/dir.c:17: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). # define NAMLEN(dirent) strlen((dirent)->d_name) data/glimpse-4.18.7/index/dir.c:131: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). int len_current_dir_buf = strlen(current_dir_buf) + 1; /* includes the '\0' which is going to be replaced by '\n' below */ data/glimpse-4.18.7/index/dir.c:138: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). name_len = strlen(name); /* name[name_len] is '\0' */ data/glimpse-4.18.7/index/dir.c:355: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). t1 = (char *) my_malloc(strlen(outname) + 2); data/glimpse-4.18.7/index/dir.c:388: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). t1 = (char *)my_malloc(strlen(name) + xinfo_len + 3); data/glimpse-4.18.7/index/dir.c:390:8: [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(t1, " "); data/glimpse-4.18.7/index/dir.c:414: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). t1 = (char *)my_malloc(strlen(name) + xinfo_len + 3); data/glimpse-4.18.7/index/dir.c:416: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(t1, " "); data/glimpse-4.18.7/index/dir.c:420: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). t1 = (char *)my_malloc(strlen(name) + 2); data/glimpse-4.18.7/index/dir.c:470: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). t1 = (char *)my_malloc(strlen(name) + xinfo_len + 3); data/glimpse-4.18.7/index/dir.c:472:7: [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(t1, " "); data/glimpse-4.18.7/index/dir.c:476: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). t1 = (char *) my_malloc(strlen(name) + 2); data/glimpse-4.18.7/index/dir.c:509: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). nbp = name + strlen(name); data/glimpse-4.18.7/index/filetype.c:54: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 i, name_len = strlen(name); data/glimpse-4.18.7/index/filetype.c:64: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). name_len = strlen(tempname); data/glimpse-4.18.7/index/filetype.c:69:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strcmp(COMP_SUFFIX, &tempname[name_len-strlen(COMP_SUFFIX)])) data/glimpse-4.18.7/index/filetype.c:90:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((num_read = read(fd, buffer, extract_only?EXTRACT_SAMPLE_SIZE:SAMPLE_SIZE)) <= 0) { data/glimpse-4.18.7/index/filetype.c:150: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). if (!strcasecmp(&tempname[name_len - strlen(extract_info_suffix[i])], extract_info_suffix[i])) break; data/glimpse-4.18.7/index/filetype.c:181: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). begin_len = strlen(begin); data/glimpse-4.18.7/index/filetype.c:182: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). end_len = strlen(end); data/glimpse-4.18.7/index/filetype.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). k = strlen(notitle); data/glimpse-4.18.7/index/filetype.c:216:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(xinfo, notitle, max_len); data/glimpse-4.18.7/index/filetype.c:227: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). while ((i<num_read) && (k<max_len - strlen(name) - 3)) { data/glimpse-4.18.7/index/filetype.c:258: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). k = strlen(notitle); data/glimpse-4.18.7/index/filetype.c:259:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(xinfo, notitle, max_len); data/glimpse-4.18.7/index/filetype.c:291: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). hash_value = hash4k(word, strlen(word)); data/glimpse-4.18.7/index/fixname.c:9: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). offset += strlen(buffer); data/glimpse-4.18.7/index/fixname.c:15: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). offset += strlen(buffer); data/glimpse-4.18.7/index/glimpse.c:184:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(077); data/glimpse-4.18.7/index/glimpse.c:189:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(IProgname, argv[0], MAX_LINE_LEN); data/glimpse-4.18.7/index/glimpse.c:240:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(rdelim, argv[2], MAX_LINE_LEN); data/glimpse-4.18.7/index/glimpse.c:242: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). rdelim_len = strlen(rdelim); data/glimpse-4.18.7/index/glimpse.c:417:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(INDEX_DIR, argv[2], MAX_LINE_LEN); data/glimpse-4.18.7/index/glimpse.c:465: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). offset += strlen(buffer); data/glimpse-4.18.7/index/glimpse.c:471: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). offset += strlen(buffer); data/glimpse-4.18.7/index/glimpse.c:524:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(INDEX_DIR, indexdir, MAX_LINE_LEN); data/glimpse-4.18.7/index/glimpse.c:577: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(freq_file, "/"); data/glimpse-4.18.7/index/glimpse.c:580: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(hash_file, "/"); data/glimpse-4.18.7/index/glimpse.c:583: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(string_file, "/"); data/glimpse-4.18.7/index/glimpse.c:919: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). rdelim_len = strlen(rdelim); data/glimpse-4.18.7/index/glimpse.c:975: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). memory_usage -= (strlen(LIST_GET(name_list, i)) + 2); data/glimpse-4.18.7/index/io.c:76: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). line_length = strlen(buffer); data/glimpse-4.18.7/index/io.c:90: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). memory_usage -= (strlen(LIST_GET(table, i)) + 2); data/glimpse-4.18.7/index/io.c:147:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = getc(file_in)) != EOF) { data/glimpse-4.18.7/index/io.c:149:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(file_in)) == EOF) break; data/glimpse-4.18.7/index/io.c:151:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(file_in)) == EOF) break; data/glimpse-4.18.7/index/io.c:153:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(file_in)) == EOF) break; data/glimpse-4.18.7/index/io.c:266: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). len = strlen(filter_command[i]); data/glimpse-4.18.7/index/io.c:357:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(src)) != EOF) data/glimpse-4.18.7/index/io.c:399:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(filterbuf)) < 1) continue; data/glimpse-4.18.7/index/io.c:454: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). int name_len = strlen(inname); data/glimpse-4.18.7/index/io.c:471: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). name_len = strlen(tempinname); data/glimpse-4.18.7/index/io.c:515: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). name_len -= strlen(suffix); data/glimpse-4.18.7/index/io.c:519: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). if (strlen(newoutname) >= MAX_LINE_LEN - 1) break; data/glimpse-4.18.7/index/io.c:552: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). if (strlen(newoutname) >= MAX_LINE_LEN - 1) break; data/glimpse-4.18.7/index/io.c:891: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). wordlen = strlen((char *)word); data/glimpse-4.18.7/index/io.c:1088: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). linelen = strlen(s); data/glimpse-4.18.7/index/io.c:1168: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). linelen = strlen(s); data/glimpse-4.18.7/index/io.c:1334: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). if (len < 0) len = strlen(name); data/glimpse-4.18.7/index/io.c:1365: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). len = strlen(name); data/glimpse-4.18.7/index/io.c:1379: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). len = strlen(name); data/glimpse-4.18.7/index/io.c:1393: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). len = strlen(name); data/glimpse-4.18.7/index/io.c:1407: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). len = strlen(name); data/glimpse-4.18.7/index/io.c:1434: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). len = strlen(name); data/glimpse-4.18.7/index/io.c:1475: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). len = strlen(name); data/glimpse-4.18.7/index/io.c:1511: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). (*pe)->name_len = strlen(name); data/glimpse-4.18.7/index/io.c:1526: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). temp_len = strlen(temp); data/glimpse-4.18.7/index/io.c:1549: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). len = strlen(name); data/glimpse-4.18.7/index/lib.c:12: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). len = strlen(str); data/glimpse-4.18.7/index/memlook.c:36: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). pattern_length = strlen((char *) pattern); data/glimpse-4.18.7/index/partition.c:126:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(patbuf)) < 1) continue; data/glimpse-4.18.7/index/partition.c:147:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(patbuf)) < 1) continue; data/glimpse-4.18.7/index/partition.c:164: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). current_dir[strlen(current_dir)-1] = '\0'; /* overwrite \n with \0 */ data/glimpse-4.18.7/index/partition.c:342: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). memory_usage -= strlen(inc) + 2; data/glimpse-4.18.7/index/partition.c:348: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). memory_usage -= strlen(pat) + 2; data/glimpse-4.18.7/index/partition.c:460:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(patbuf)) < 1) continue; data/glimpse-4.18.7/index/partition.c:481:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(patbuf)) < 1) continue; data/glimpse-4.18.7/index/partition.c:515: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). current_dir[strlen(current_dir)-1] = '\0'; /* overwrite \n with \0 */ data/glimpse-4.18.7/index/partition.c:566: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). memory_usage -= strlen(inc) + 2; data/glimpse-4.18.7/index/partition.c:572: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). memory_usage -= strlen(pat) + 2; data/glimpse-4.18.7/index/partition.c:626:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/index/partition.c:850: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). offset += strlen(LIST_GET(name_list, i)) + 1; data/glimpse-4.18.7/index/partition.c:910: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). offset += strlen(e->name) + 1; data/glimpse-4.18.7/index/partition.c:927:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/index/partition.c:952:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/index/partition.c:1085:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/glimpse-4.18.7/index/region.c:130:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(e->attribute, name, len + 1); data/glimpse-4.18.7/index/region.c:155: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). memory_usage -= strlen(e->attribute) + 2; data/glimpse-4.18.7/index/region.c:248:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fp)) != EOF) { data/glimpse-4.18.7/index/region.c:256:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c=getc(fp)) != ' ') buffer[i++] = c; data/glimpse-4.18.7/index/region.c:261:3: [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(buffer, "%d,%1023s", &id, temp); data/glimpse-4.18.7/index/region.c:270: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). e->attribute = (char *)my_malloc(strlen(temp) + 2); data/glimpse-4.18.7/index/region.c:332: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). if ((t->url != NULL) && (strlen(t->url) > 0)) { data/glimpse-4.18.7/index/region.c:339:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rl->offset = t->offset + strlen(t->template_type) + 3; data/glimpse-4.18.7/index/region.c:340:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rl->length = strlen(t->url) + 1; data/glimpse-4.18.7/index/region.c:397:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rl->attributeid = attr_insert_name(temp, strlen(temp)); data/glimpse-4.18.7/index/simpletest.c:106: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). int len = strlen(name); data/glimpse-4.18.7/libtemplate/include/util.h:32: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). #define stradd_buffer(b,s) add_buffer((b), (s), strlen(s)) data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:62: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(buf) < 1) data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:65:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). append_AVList(t->list, attr, buf, strlen(buf)); data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:75: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(s) < 1) /* empty line */ data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:79:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). append_AVList(t->list, attr, value, strlen(value)); data/glimpse-4.18.7/libtemplate/template/iafa2soif.c:81: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). t->list = create_AVList(attr, value, strlen(value)); data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:90: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(s) < 1) /* empty line */ data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:94:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). append_AVList(t->list, attr, value, strlen(value)); data/glimpse-4.18.7/libtemplate/template/lsm2soif.c:96: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). t->list = create_AVList(attr, value, strlen(value)); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:145: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(url, "/"); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:157:6: [1] (buffer) strlen: Does not handle 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(archive_site)); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:159: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). if (p != NULL && strlen(p) >= 6) /* yymmdd */ data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:160: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). add_AVList(t->list, "ASCII-Date", p, strlen(p)); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:165: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 (strcmp(p, "0") != 0 && strlen(p) > 0) data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:166:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). add_AVList(t->list, "File-Size", p, strlen(p)); data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:171: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). if (p != NULL && strlen(p) > 0) data/glimpse-4.18.7/libtemplate/template/pcindex2soif.c:172:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). add_AVList(t->list, "Description", p, strlen(p)); data/glimpse-4.18.7/libtemplate/template/print-template.c:29: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). add_AVList(t->list, "Print-Time", buf, strlen(buf)); data/glimpse-4.18.7/libtemplate/template/print-urlrefs.c:54:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *thishost = t->url + strlen("http://"), *z; data/glimpse-4.18.7/libtemplate/template/template.c:359: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). output_buffer(buf, strlen(buf)); data/glimpse-4.18.7/libtemplate/template/template.c:374: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). output_buffer(buf, strlen(buf)); data/glimpse-4.18.7/libtemplate/template/template.c:448:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(inputfile); \ data/glimpse-4.18.7/libtemplate/util/harvest.c:88: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). newpath = xmalloc(strlen(s) + BUFSIZ); data/glimpse-4.18.7/libtemplate/util/harvest.c:90: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). sprintf(newpath + strlen(newpath), ":%s", harvest_bindir()); data/glimpse-4.18.7/libtemplate/util/harvest.c:95: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). sprintf(newpath + strlen(newpath), ":%s/%s", data/glimpse-4.18.7/libtemplate/util/strdup.c:34: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). sz = strlen(s); data/glimpse-4.18.7/main.c:266:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!tuncompressible_filename(file_list[i], strlen(file_list[i]))) TCOMPRESSED = OFF; data/glimpse-4.18.7/main.c:478:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(indexdir, home, MAXNAME); data/glimpse-4.18.7/main.c:545: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). rdelim_len = strlen(rdelim); data/glimpse-4.18.7/main.c:678:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write(svstderr, QUITREQUESTMSG, strlen(QUITREQUESTMSG)); data/glimpse-4.18.7/main.c:750:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(077); data/glimpse-4.18.7/main.c:1018: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). len = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family); data/glimpse-4.18.7/main.c:1202: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). len = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family); data/glimpse-4.18.7/main.c:1266:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(sockfd, tmpbuf, 1024)) > 0) { data/glimpse-4.18.7/main.c:1434:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(GD_pattern, "\n"); data/glimpse-4.18.7/main.c:1435: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). GD_length = strlen(GD_pattern); data/glimpse-4.18.7/main.c:1475:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:1568: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). if ((dummylen = strlen(argv[0])) > MAXFILEOPT) { data/glimpse-4.18.7/main.c:1575: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). if ((dummylen = strlen(p+1)) > MAXFILEOPT) { data/glimpse-4.18.7/main.c:1622: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). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(indexdir) + 2); data/glimpse-4.18.7/main.c:1633:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(temp_file, "."); data/glimpse-4.18.7/main.c:1657:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((num_read = read(ret, matched_region, MAX_REGION_LIMIT*2)) > 0) { data/glimpse-4.18.7/main.c:1823:6: [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(temp_bitfield_file, "/"); data/glimpse-4.18.7/main.c:1847:6: [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(temp_filenames_file, "/"); data/glimpse-4.18.7/main.c:1893: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). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:1945:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (c == 'd') && ((D_length = strlen(argv[0])) > MAX_NAME_SIZE) ) { data/glimpse-4.18.7/main.c:1958:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:1968:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (c == 'd') && ((D_length = strlen(p+1)) > MAX_NAME_SIZE) ) { data/glimpse-4.18.7/main.c:1981:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(p+1) + 2); data/glimpse-4.18.7/main.c:2027:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). agrep_argv[agrep_argc] = (char *)my_malloc(strlen(argv[0]) + 2); data/glimpse-4.18.7/main.c:2150:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). AM=strlen(APattern); data/glimpse-4.18.7/main.c:2165:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(dest_index_buf, "BEGIN", strlen("BEGIN"))) break; data/glimpse-4.18.7/main.c:2167: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). sscanf(&dest_index_buf[strlen("BEGIN")], "%d%d%d", &bestmatcherrors, &NOBYTELEVEL, &OPTIMIZEBYTELEVEL); data/glimpse-4.18.7/main.c:2172: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). if (!strncmp(dest_index_buf, "END", strlen("END"))) break; data/glimpse-4.18.7/main.c:2323:118: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). NOBYTELEVEL, OPTIMIZEBYTELEVEL, src_index_set[REAL_PARTITION - 2], src_index_set[REAL_PARTITION - 1], num_blocks, strlen(APattern), APattern, WHOLEFILESCOPE); data/glimpse-4.18.7/main.c:2344:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nextchar = getc(fp)) != EOF) { data/glimpse-4.18.7/main.c:2347:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(fp)) == EOF) break; data/glimpse-4.18.7/main.c:2350:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(fp)) == EOF) break; data/glimpse-4.18.7/main.c:2353:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nextchar = getc(fp)) == EOF) break; data/glimpse-4.18.7/main.c:2392:49: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i < BITFIELDLENGTH) && (nextchar = getc(fp)) != EOF) { data/glimpse-4.18.7/main.c:2565: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). fileopt_length = strlen(FileOpt); data/glimpse-4.18.7/main.c:2566:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(index_argv[index_argc],FileOpt+j,fileopt_length-j); data/glimpse-4.18.7/main.c:3286: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). if (memagrep_search( strlen(terminals[i].data.leaf.value), terminals[i].data.leaf.value, data/glimpse-4.18.7/split.c:117: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(tempbuf); data/glimpse-4.18.7/split.c:312: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). *apatptr += strlen(n->data.leaf.value); data/glimpse-4.18.7/split.c:388: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). *apatptr += strlen(n->data.leaf.value); data/glimpse-4.18.7/split.c:516: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). buffer_end = buffer + strlen(terminals[first].data.leaf.value); data/glimpse-4.18.7/split.c:520: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). word_length = strlen(word); ANALYSIS SUMMARY: Hits = 1841 Lines analyzed = 46071 in approximately 1.57 seconds (29388 lines/second) Physical Source Lines of Code (SLOC) = 38395 Hits@level = [0] 1682 [1] 378 [2] 768 [3] 16 [4] 679 [5] 0 Hits@level+ = [0+] 3523 [1+] 1841 [2+] 1463 [3+] 695 [4+] 679 [5+] 0 Hits/KSLOC@level+ = [0+] 91.7567 [1+] 47.949 [2+] 38.1039 [3+] 18.1013 [4+] 17.6846 [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.