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/xdvik-ja-22.87.05+j1.42/texk/xdvik/alloc-debug.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/c-openmx.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dl_list.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dl_list.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/exit-handlers.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/exit-handlers.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/filehist.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/filehist.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gf.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Panner.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Panner.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/PannerP.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Tip.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Tip.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/TipP.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/help-window.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/mag.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/mag.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/menu.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/message-window.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/message-window.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-log.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-log.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/search-dialog.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDir.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDir.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfinternal.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/topic-window.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/topic-window.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_bitmaps.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_bitmaps.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xicon.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xicon.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xlwradio.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xlwradio.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xlwradioP.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_colorsel.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_filesel.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefsP.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_appearance.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_appearance.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_fonts.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_fonts.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_helpers.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_toolbar.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_toolbar.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/help-window.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/menu.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/search-dialog.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_colorsel.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_helpers.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-snprintf.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-snprintf.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-vsnprintf.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-vsnprintf.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psdps.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psdps.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string_list.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string_list.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/run_tests.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/run_tests.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test1.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_dl_list.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_string_list.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_string_utils.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_util.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/translations.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-config.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xserver-info.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xserver-info.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/AJ16.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft2vert.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft2vert.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexvf.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexvf.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/jfm.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/jfm.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/fontconfig.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/fontconfig.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft2.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft2.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pk.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/version.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/vf.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.h
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c
Examining data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c

FINAL RESULTS:

data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:495:16:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
		    if ((n = readlink(base, resolved, MAXPATHLEN)) < 0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c:60:2:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execvp(argv[0], argv);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:101:10:  [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.
# define vfprintf(stream, message, args)	_doprnt(message, args, stream)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:482:11:  [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.
    (void)vfprintf(stderr, message, args);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4312: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(q + 9, p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:1806: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(dvi_property, globals.dvi_name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/filehist.c:196: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(item->filename, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1698:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%s at %d", fname, dpi);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Panner.c:161:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	(void) sprintf(buf,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:876:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(buf, pageno_format, ' ', page_info.page_labels[i]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:904:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(buf, pageno_format, '*', page_info.page_labels[idx]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:909:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(buf, pageno_format, ' ', page_info.page_labels[idx]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:1012:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(page_info.page_labels[idx], pageno_format, '*', get_page_size(),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:1017:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(page_info.page_labels[idx], pageno_format, ' ', get_page_size(),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:178: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).
	new_name = strcpy(new_name, basename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:182: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).
	new_name = strcpy(new_name, old_name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:187: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(new_name + len, new_ext);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:190: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(new_name + len - strlen(old_ext), new_ext);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1822:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(info->finfo->out_file, "%s/%s", globals.cwd, tmp);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDir.c:139:15:  [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).
	(void)strcat(strcpy(result[i].real, str), " ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:80:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    (void)sprintf(sbuf, "XsraSelFile: can't get font %s",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:269: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).
			(void)strcpy(entry->shown, shown);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:105: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).
	    (void)strcpy(SFcurrentDir, path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:137: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).
    char *s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:206: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).
	(void)strcat(SFcurrentPath, str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:445: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).
	(void)strcat(strcpy(entries[i].real, "~"), pw->pw_name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:495:12:  [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).
	    (void)strcat(strcat(strcpy(SFcurrentPath,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:495:26:  [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).
	    (void)strcat(strcat(strcpy(SFcurrentPath,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:818: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).
	(void)strcpy(SFcurrentPath, SFtextBuffer);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:823: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).
	(void)strcat(strcpy(SFcurrentPath, SFstartDir), SFtextBuffer);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:823:15:  [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).
	(void)strcat(strcpy(SFcurrentPath, SFstartDir), SFtextBuffer);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:909: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(SFstartDir, cwd);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:916: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).
    (void)strcpy(SFcurrentDir, SFstartDir);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:920: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).
	    (void)strcpy(SFcurrentPath, callback->init_path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:929:12:  [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).
	    (void)strcat(strcpy(SFcurrentPath, SFstartDir), callback->init_path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:929:19:  [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).
	    (void)strcat(strcpy(SFcurrentPath, SFstartDir), callback->init_path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:935: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).
	(void)strcpy(SFcurrentPath, SFstartDir);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:170:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(g_string_savebuf, "This is xdvik %s", XDVI_TERSE_VERSION_INFO);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:449:12:  [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.
	    (void)vfprintf(stdout, fmt, argp);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.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(g_string_savebuf, buf);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.c:449:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%d %s", i + 1, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.c:481:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%d %s", num_children + 1, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.c:522:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%d %s", idx + 1, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.c:128:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%d %s", i + 1, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.c:211:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%d %s", num_children + 1, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.c:242:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%d %s", idx + 1, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:272: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(x_buf, resource.sidemargin);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:285: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(y_buf, resource.topmargin);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1966:6:  [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], (char **)argv);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2137: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(syscmd + offset + (ptr - viewer), fullpath);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2139: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(syscmd + offset + (ptr - viewer) + strlen(fullpath), ptr + strlen(format_string));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:262:14:  [4] (shell) popen:
  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 ((pipe = popen(p + 1, "r")) == NULL)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:264: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(pipe, "%s", fn);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:286: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(fn, p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:326:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(cmdline, fmt, resource.gs_path, *columns, *rows, xdpi, ydpi,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:328:17:  [4] (shell) popen:
  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 ((pipe = popen(cmdline, "w")) == NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:353:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(pipe, strsafe);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:701: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(image_info->filename, fullpath);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:528: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(syscmd + (ptr - cmd), arg);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:529: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(syscmd + (ptr - cmd) + strlen(arg), ptr + len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:535:14:  [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.
    retval = system(syscmd);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-snprintf.h:27:18:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define SNPRINTF snprintf
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-vsnprintf.c:80:12:  [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.
    size = vfprintf(fd, format, argp);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-vsnprintf.h:33:43:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define VSNPRINTF(buf, len, format, args) vsnprintf(buf, len, format, args)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:197: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(ptr, fname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:212:9:  [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.
 	(void)execvp(*argv, argv);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:609:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%s %ld %ld", resource.gs_palette,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:653:8:  [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.
	(void)execvp(argv[0] = resource.gs_path, (char *const *)argv);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:768: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(cp1, ocp1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:244: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(line_orig, line);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:496:20:  [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).
	    utf8_locale = strcat(utf8_locale, rest);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1443:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(ffline, "%s > %s", filename + 1, psinfp->tempname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1588:10:  [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.
			(void)execvp(argv[0], (char **)argv);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1893: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(q, keytab[keyno]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2705: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).
	this_node->this_file = strcpy(xmalloc((strlen(psheader) + 1) * sizeof(char)), psheader);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:164: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(path_name, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:224: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(expanded_filename, filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:262:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(tmp, fmt, arg);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:266: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, fmt);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:707: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 + (sep - fname), extension);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/run_tests.h:20:78:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ERROR(X) do { fprintf(stderr, "%s:%d: Error: ", __FILE__, __LINE__); fprintf X; } while(0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/run_tests.h:21:76:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define INFO(X) do { fprintf(stderr, "%s:%d: Info: ", __FILE__, __LINE__); fprintf X; } while(0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:72:9:  [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.
#define	vfprintf(stream, message, args)	_doprnt(message, args, stream)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:162:8:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	(void)vfprintf(stderr, fmt, argp);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:451: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(resolved, path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:512: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(tmpbuf, base); /* cannot overrun, since strlen(base) <= strlen(path) < MAXPATHLEN */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:536: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(resolved, tmpbuf);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:627: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).
    return strcpy(ret, ptr);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:872:28:  [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 (ourdir == NULL || access(ourdir, W_OK) < 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:874: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(ourdir, W_OK) < 0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1098:2:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execvp(proc_name, argv);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h:199:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf X;						\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h:211:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf X;						\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h:221:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf X;						\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h:231:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf X;						\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h:241:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf X;							\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h:255:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf X;						\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:777: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(buf + 1, name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:825: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(name_buf + offset, name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:868:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%s/%s", homedir, basename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-config.h:17:9:  [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.
#define	vfprintf(stream, message, args)	_doprnt(message, args, stream)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:39:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr,									\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:50:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr,									\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:72:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf X;                                      \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:146:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:154:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:162:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:170:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:178:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:186:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:194:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:202:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi-debug.h:211:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    fprintf X;						    \
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:949:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(new_special, "%d:%d %s", data.line, data.col, expanded_filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1128:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(*title_name, title_name_fmt, XDVIK_PROGNAME, *icon_name, total_pages,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1849:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(new_special, "%d:%d %s", data.line, data.col, expanded_filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c:182:17:  [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 ((browser = getenv("BROWSER")) != NULL)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c:184:17:  [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 ((browser = getenv("WWWBROWSER")) != NULL)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4287:6:  [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.
	p = getenv("XEDITOR");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4292:10:  [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.
	    p = getenv("VISUAL");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4294:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		p = getenv("EDITOR");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:336: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.
	dvipsrc = getenv("DVIPSRC");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:338:16:  [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.
	    dvipsrc = getenv("HOME");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1288:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	env_gs_lib = getenv("XDVI_GS_LIB");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1290:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	    env_gs_lib = getenv("GS_LIB");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1795: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.
	char *printer = getenv("PRINTER");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:1102:44:  [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.
    globals.debug = parse_debugging_option(getenv("XDVIDEBUG"));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:1247:69:  [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.
	fprintf(stderr, "%s:%d: SELFAUTOLOC=\"%s\"\n", __FILE__, __LINE__, getenv("SELFAUTOLOC"));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:1248:69:  [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.
	fprintf(stderr, "%s:%d: SELFAUTODIR=\"%s\"\n", __FILE__, __LINE__, getenv("SELFAUTODIR"));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:1249:72:  [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.
	fprintf(stderr, "%s:%d: SELFAUTOPARENT=\"%s\"\n", __FILE__, __LINE__, getenv("SELFAUTOPARENT"));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:269:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	newpath = xstrdup(getenv("HOME"));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:400:17:  [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 ((path = getenv(env_var)) == NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:326: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.
	char *homedir = getenv("HOME");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:440:2:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
	getwd(cwd)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:517:6:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
	    getwd(resolved)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:871:15:  [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.
	    ourdir = getenv("TMPDIR");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1458:6:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
	    getwd(cwd)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.h:83:19:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
# define REALPATH realpath
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:864:15:  [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.
    homedir = getenv("HOME");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c:55:18:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
    switch(pid = vfork()) {			   
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:1480: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, (char *)currinf.pos, i);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:2810: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 buffer[32];	/* holds longest name in adobe2unicode_table */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:3099: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 retbuf[MAX_CHARS];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:3285: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(w_info->txt_buf + w_info->curr_buf_idx, expanded_lig, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:3304: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 utf8_buf[MAX_CHARS]; /* ample ... */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:3313: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(w_info->txt_buf + w_info->curr_buf_idx, utf8_buf, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4118: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).
	parsed->line = atoi(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4130: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).
	parsed->col = atoi(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4151: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(parsed->filename, p, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4188: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(data->best.filename, data->recent.filename,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4228: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(data->best.filename, data->recent.filename,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4311: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(q, "xterm -e ", 9);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4604: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).
	src_this_line = atoi(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4615: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).
	col = atoi(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4996: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).
    src_line = atoi(src_file);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:5003: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).
	src_col = atoi(src_file);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:839: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.
    static char job_id[300];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:938: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 temp[21];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:989: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 wstr[256];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:990: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 hstr[256];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:1689: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 canonical_path[MAXPATHLEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:132: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 info[14];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:206: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(tmp, b_ptr, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3046: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 jis_seq[8] = { 
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3051: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 unicode[4];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3078: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(&u, unicode, sizeof unicode);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3107: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 unicode[4];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3137: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(&u, unicode, sizeof unicode);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3166: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 cjk[2], xx[3];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3682: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 cjk[2];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3684:6:  [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(fontname + i - 2);		/* font no */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3756:13:  [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.
	case 0x85: strcpy(retbuf, "ch"); return 0;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3757:13:  [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.
	case 0x86: strcpy(retbuf, "ck"); return 0;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3758:13:  [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.
	case 0xA7: strcpy(retbuf, "sz"); return 0;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:4154: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[2];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:4159: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(utf8 + i, tmpbuf, tmp_len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:4230: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(buf + offset, ret, len_ret);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:4237: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(buf + offset, "\\%.4lX", (unsigned long)ucs4);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:1197: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).
	*res = atoi(*param);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:1213:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	if (**param != 't' && (atoi(*param) != 0) == arg)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:1765: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).
	    arg = atoi(*params) - globals.pageno_correct;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:1820:72:  [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).
	resource.use_tex_pages = (**params == 't' ? !resource.use_tex_pages : atoi(*params));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:1951: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).
	arg = atoi(*params);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:2125:34:  [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).
			      ? !resource.keep_flag : atoi(*params));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:2543: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(args, ap->params, ap->num_params * sizeof (String));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:2590: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).
	    arg = atoi(*params);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:3663:45:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    dist = (strchr(*params, '.') == NULL) ? atoi(*params)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:3695:45:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    dist = (strchr(*params, '.') == NULL) ? atoi(*params)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:5359: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).
		    factor = atoi(actp->params[0]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/filehist.c:312: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 buf[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:344: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(ffline, dvipsrc, n);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:345: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(ffline + n, "/.dvipsrc", 10);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:664:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(q, w1p, w1l);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:669: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(q, w2p, w2l);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:677: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(q, pfp, pfl - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:690: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(q, encp, encl - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:698: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(q, qp, ql - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:717: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(q, p0, p - p0);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:749: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.
	const char	value[0];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:765: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(ffline, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:767: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(ffline + len + 1, name, namelen);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:837: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(ffline, name, namelen);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:952:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static	unsigned char	gs_ctype[256];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1142: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[GS_BUF_SIZE];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1263: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((char *) gslp->value, ffline + pos1, pos2 - pos1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1459: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[GS_BUF_SIZE];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1575: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 str[1024] = "";
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1604: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(str, "\nPrint process returned exit code %d.\n",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1608: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(str, "\nPrint process terminated by signal %d.\n",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1611: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(str, "\nPrint process returned unknown status 0x%x.\n",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1621:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[80];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1649: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(buf, line, bytes);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1712: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 buf[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.h:70: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.
	const char	*vec[256];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft.c:51:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 const unsigned char reverse_byte[0x100] = {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft.c:170: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(q, p, (slot->bitmap.width + 7) / 8);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft2vert.c:105: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.
    static char str[5];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Panner.c:159: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/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/help-window.c:137: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(tmp, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/help-window.c:204: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(widget_text + offset, resource_default[i], size - offset);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/mag.c:635: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).
	int n = atoi(p + 1) - 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/mag.c:645: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).
	magnifier.width = magnifier.height = atoi(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/mag.c:648:25:  [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).
	    magnifier.height = atoi(p + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:793: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[PAGENUMLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:802: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  ", get_page_size(),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:805: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  ", get_page_size(),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:871: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 buf[PAGENUMLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/pagesel.c:894: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 *mark_font, buf[128];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:269: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 tmp_label[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:282: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 buf[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:304:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:618: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 ofstring[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:643: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(ofstring, "of %d physical pages", total_pages);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:645: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(ofstring, "of %d to %d pages", globals.pageno_correct, total_pages + globals.pageno_correct - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:816: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.
	format_selection_texts[0] = XmStringCreateLocalized((char *)output_format_mapping[0].fmt_string);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:817: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.
	format_selection_texts[1] = XmStringCreateLocalized((char *)output_format_mapping[1].fmt_string);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:818: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.
	format_selection_texts[2] = XmStringCreateLocalized((char *)output_format_mapping[2].fmt_string);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:819: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.
	format_selection_texts[3] = XmStringCreateLocalized((char *)output_format_mapping[3].fmt_string);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:820: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.
	format_selection_texts[4] = XmStringCreateLocalized((char *)output_format_mapping[4].fmt_string);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1182: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 ofstring[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1216: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(ofstring, "of %d physical pages", total_pages);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1218: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(ofstring, "of %d to %d pages", globals.pageno_correct, total_pages + globals.pageno_correct - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1419: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 name[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1849: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).
    pageno = atoi(s) - globals.pageno_correct;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1943: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 page_string[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1953: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(page_string, "%d", current_page + globals.pageno_correct);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:2130: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 ((fin = fopen(globals.dvi_name, "rb")) == NULL
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:2149: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 ((fin = fopen(get_tmp_dvi_name(), "rb")) == NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:139:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((char*)targetP, (char*)std_targets, sizeof(Atom)*std_length);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:172: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.
	    const char *cl[1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:78: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 sbuf[256];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:211: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.
	(void)memcpy(p, str, len - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:108: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 SFstartDir[MAXPATHLEN], SFcurrentPath[MAXPATHLEN], SFcurrentDir[MAXPATHLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:126: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 SFtextBuffer[MAXPATHLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:137:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char fileMask[MASKWIDTH + 2] = "*.dvi";
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:198: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 buf[2];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:315: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 buf[2];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:66:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char g_string_savebuf[MAX_LEN + 2];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.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 buf[MAX_LEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_appearance.c:231:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_appearance.c:344: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 buf[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_fonts.c:202: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(g_link_color_rgb, "push rgb %.2f %.2f %.2f", r, g, b);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_fonts.c:206: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(g_visited_link_color_rgb, "push rgb %.2f %.2f %.2f", r, g, b);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_fonts.c:385: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[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_fonts.c:611: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[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_helpers.c:559: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.
	str = XmStringCreateLtoR((char *)m_browser_list[i], "UNMARKED");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_helpers.c:579: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.
	str = XmStringCreateLtoR((char *)m_editor_list[i], "UNMARKED");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_helpers.c:740:40:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    str_list[i] = XmStringCreateLtoR((char *)command_list[k], "MARKED");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_helpers.c:742:40:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    str_list[i] = XmStringCreateLtoR((char *)command_list[k], "UNMARKED");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:121: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[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:474: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[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:96: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 x_off[LENGTH_OF_INT + 16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:97: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 y_off[LENGTH_OF_INT + 16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:144:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    static char x_off[LENGTH_OF_INT + 16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:159:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    static char y_off[LENGTH_OF_INT + 16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:263: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 x_buf[LENGTH_OF_INT + 16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:264: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 y_buf[LENGTH_OF_INT + 16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:332: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(anchor, beg, end - beg);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:342: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(anchor, ptr + 1, pptr - ptr - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:351: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(anchor, ptr + 1, pptr - ptr - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:362: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(anchor, ptr + 1, pptr - ptr - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:868: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(anchor, beg, end - beg);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:905: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(info->anchors[info->curr_cnt].a_href + 1, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:926: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(info->anchors[info->curr_cnt].a_href, "file:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:927: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(info->anchors[info->curr_cnt].a_href + strlen("file:"),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1904: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.
    const char *argv[ARG_LEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1938:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(shrink_arg, "%d", currwin.shrinkfactor);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2006: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 *argv[4];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2015: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 canonical_path[MAXPATHLEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2127: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(syscmd, "xterm -e ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2130: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(syscmd + offset, viewer, ptr - viewer);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:126: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 filename[MaxTextExtent];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:575: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 density[40];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:583: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 canonical_path[MAXPATHLEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:705: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(density, "%0.2fx%0.2f", xdpi, ydpi);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:1122: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(info.filename, filename, filename_len); /* no need to terminate because of memset(...) above */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:1349: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(info.filename, cp, p - cp); /* no need to terminate because of memset(...) above */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:344: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.
    const char *sorted_options[XtNumber(options)];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:345: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 buf[256];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:372: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(buf, "[%.80s]", str1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:374: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(buf, "[%.80s <%.80s>]", str1, str2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:456: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.
    static char canonical_path[MAXPATHLEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:471: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(canonical_path, real_filename, n);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:568: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(p1, resource.mfmode, len - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:571: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).
	    resource.pixels_per_inch = atoi(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:708: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).
	    int n = atoi(resource.mg_arg[i]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:713:26:  [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).
		set_magglass_height(i, atoi(s + 1));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:766: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 buf[1024], req_buf[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:769: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 num[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:770: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(num, "%d", error->request_code);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:1310: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.
		static char buf[LENGTH_OF_INT]; /* so that we can pass its address */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:526: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(syscmd, cmd, ptr - cmd);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:112: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 history[HIST_LEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:129: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(ptr, "Page history empty.");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:133: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(ptr, "Page history:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:170:6:  [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(ptr, " ...");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:188: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(ptr, " -");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:195: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(ptr, " [");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:210: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(ptr, " [%d]", item->pageno + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:214: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(ptr, " %d", item->pageno + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:258: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 from_page[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:259: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 to_page[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:340:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[80];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:376: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 str[128] = "";
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:411: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(str, "\nDvips returned exit code %d.\n", WEXITSTATUS(exitval));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:414: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(str, "\nDvips terminated by signal %d.\n", WTERMSIG(exitval));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:416: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(str, "\nDvips returned unknown status 0x%x.\n", exitval);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:452: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 buf[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:506: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.
    const char *argv[5];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:527: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 str[128] = "";
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:560: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(str, "\nPrint process returned exit code %d.\n",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:564: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(str, "\nPrint process terminated by signal %d.\n",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:567: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(str, "\nPrint process returned unknown status 0x%x.\n",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psdps.c:176:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char line[BUFLEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psdps.c:724: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 buffer[1025];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:137:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char GS_outb[257];	/* circular output buffer */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:159:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char line[LINELEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:367: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(GS_outb_in, cp, bytes);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:542: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 buf[100];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:599:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "%ld %d 0 0 %u %u 72 72",
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:616: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, "%ld", mane.win);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:628:14:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
    GS_pid = vfork();
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:633: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(arg4 + 14, "%u", GS_page_w);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:634: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(arg5 + 15, "%u", GS_page_h);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:870: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 buf[150];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:889: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(buf,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:900: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(buf,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:913: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 buf[32];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:929:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "%d %d moveto\n", xul, yul);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:973: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 canonical_path[MAXPATHLEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:610: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 buf[100];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:636: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(buf, "H TeXDict begin /DVImag %d 1000 div def "
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:645: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(buf, "H TeXDict begin %d %d div dup "
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:659:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "%d %d moveto\n", xul, yul);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:734:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    (void)memcpy(cp1, ocp1, ptm1 - ocp1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:736:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(cp1, "89.999 rotate ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:746:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    (void)memcpy(cp1, ocp1, ptm1 - ocp1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:748:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(cp1, "-89.999 rotate ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:757:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    (void)memcpy(cp1, ocp1, ptm1 - ocp1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:797: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 buffer[1025];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:216: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 ((fp=fopen(filename, "r")) != NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:229:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[BUFSIZ], line_orig[BUFSIZ];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:234: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 ((fp = fopen(filename, "r")) == NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:442: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(info->txt_buf + info->curr_buf_idx, str, len + 1); /* also copy trailing 0 */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:453: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(info1->txt_buf + info1->curr_buf_idx, info2->txt_buf, info2->txt_buf_size);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:468: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(info2->txt_buf, info1->txt_buf, info1->curr_buf_idx);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:494:16:  [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.
	utf8_locale = strcat(utf8_locale, ".utf8");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1008: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(posix_regex + len1, perl2posix_map[i].posix_class, len2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1059: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(buf + offset, ret, len_ret);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1066: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(buf + offset, "\\%.4lX", ucs4);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1909: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[48];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:953:6:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    bcopy(rotate_stack[rotate_stack_ptr].matrix, bbox_matrix,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1420: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 *argv[4];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1585:13:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
		    pid = vfork();
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1859: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(buffer, "@beginspecial");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1904: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(q, " @setspecial\n");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2043: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 dummy[8];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2272: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(testname, cp, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2560: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 scr[16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2572: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(scr, "%.*s%c%c", (int)(p1 - p0), p0, *cp, cp[1]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:112: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 buf[BUFLENGTH];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:123:47:  [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 (argc > 3 || (in = (argc < 2 ? stdin : fopen(argv[1], "r"))) == NULL ||
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:124: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).
	(out = (argc < 3 ? stdout : fopen(argv[2], "w"))) == NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:234: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(expanded_filename, ".dvi");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:242: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 canonical_path[MAXPATHLEN + 1];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:382: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(chunks[i], b_ptr, chunk_len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:706: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(buf, fname, sep - fname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_string_utils.c:322: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 cwd[10240];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_util.c:10: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 *res[16]; /* big enuff */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:234: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).
    FILE *fp = fopen(fname, mode);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:237: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).
	fp = fopen(fname, mode);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:263:14:  [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).
    int fd = open(fname, flags);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:266:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(fname, flags);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:277:14:  [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).
    int fd = open(fname, flags, mode);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:280:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(fname, flags, mode);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:374: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(resolved, path, separator - path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:423: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[MAXPATHLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:428: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 cwd[MAXPATHLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:601: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(new, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:618: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(new, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:646: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(str1 + len1, str2, len2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:684:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static unsigned char reverse_byte[0x100];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:864: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 + strlen(p) - 6, "XXXXXX", 6);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:881: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(p, ourdir, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:882: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(p + len, tmp_suffix, sizeof tmp_suffix);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:891:10:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    fd = mkstemp(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:894: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 + strlen(p) - 6, "XXXXXX", 6);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:895:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:971: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 tmp_buf[BUF_SIZE];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:981: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(err_buf + buf_old_size, tmp_buf, buf_new_size - buf_old_size);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1040:19:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
    switch (pid = vfork()) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1050: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 path[MAXPATHLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1447: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 cwd[MAXPATHLEN];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1767: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 buf[TMP_BUF_SIZE];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1945: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 digit_arg[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1958: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(digit_arg, "%d", lineno);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1962: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(digit_arg, "%d", colno);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1971: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(curr, new_elem, l_mid);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1988: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(argv[i - 1], "+%d", lineno);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:2006: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(new_str, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:254: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(buffer + LONG_CONV_64(byte_offset, format_ret), prop_ret,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:516: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(str, "white");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:760: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 buf[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:824: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(name_buf, "xdvi.", offset);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:904: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 testbuf[1024];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:919: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 ((to_fp = fopen(xdvirc_name, "r")) != NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:1102: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(window_list, p, window_list_len * sizeof (long));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:576:59:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    {"magnifierSize1", "MagnifierSize", XtRString, sizeof(char *),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:578:59:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    {"magnifierSize2", "MagnifierSize", XtRString, sizeof(char *),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:580:59:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    {"magnifierSize3", "MagnifierSize", XtRString, sizeof(char *),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:582:59:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    {"magnifierSize4", "MagnifierSize", XtRString, sizeof(char *),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:584:59:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    {"magnifierSize5", "MagnifierSize", XtRString, sizeof(char *),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:770: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 tmp[16];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:782: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(tmp, arg, arg_end - arg);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1589:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(g_link_color_rgb, "push rgb %.2f %.2f %.2f", r, g, b);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1611:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(g_visited_link_color_rgb, "push rgb %.2f %.2f %.2f", r, g, b);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:2215: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 mask[2] = {0, 0};	/* the actual event mask */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:2244: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 mask[2] = {0, 0};	/* the actual event mask */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:2545: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/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:2561: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(tmpbuf, "* %d", longest_page);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:3290: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("/tmp/foo", "r")) == NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:3612: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 mmode[LENGTH_OF_INT];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.h:573: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.
    const char *mg_arg[5];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.h:1174:10:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
#  undef vfork
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.h:1175:11:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
#  define vfork fork
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xserver-info.c:40: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 dummybuf[40];
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xserver-info.c:66: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(dummybuf, "unknown order %d", BitmapBitOrder (dpy));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xserver-info.c:77: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(dummybuf, "unknown order %d", ImageByteOrder (dpy));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xserver-info.c:140: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 errorbuf[40];			/* for sprintfing into */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xserver-info.c:151: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(errorbuf, "unknown class %d", vip->class);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c:107:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cmd = xmalloc(strlen(browser) + strlen(url) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c:107:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cmd = xmalloc(strlen(browser) + strlen(url) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/browser.c:146:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(last_arg) > 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:432:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	+ read(fileno(fp), (char *)(currinf.pos = G_dvi_buf_ptr), DVI_BUFFER_LEN);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:3271: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(expanded_lig);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4310: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).
	    q = xmalloc(strlen(p) + 10);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4677: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).
    if (memicmp(str, "html:", strlen("html:")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4678:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t offset = strlen("html:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4687: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 (memicmp(str, "<a name", strlen("<a name")) != 0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4690: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).
	offset = strlen("<a name");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4714: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).
	if (memicmp(str, "sdict begin ", strlen("sdict begin ")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4716: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).
	    str += strlen("sdict begin ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4739: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 (memcmp(str, "html:", strlen("html:")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4740:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t offset = strlen("html:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4749: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 (memicmp(str, "<a name", strlen("<a name")) != 0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4752: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).
	offset = strlen("<a name");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4776: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).
	if (memicmp(str, "sdict begin ", strlen("sdict begin ")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-draw.c:4778: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).
	    str += strlen("sdict begin ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:155: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 len = strlen(arg);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:953: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(arg) > sizeof(temp) - 1)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:976:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(temp, name, sizeof(temp));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:981: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 (temp[strlen(temp) - 1] == 'r') {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:982: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).
		temp[strlen(temp) - 1] = '\0';
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:1625:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvi-init.c:1801: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).
    dvi_property_length = strlen(globals.dvi_name) + 1; /* also copy the terminating 0 */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:147:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (--m >= 0) putc(getc(fin), fout);	\
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:196:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (memicmp(special, "psfile=", strlen("psfile=")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:197: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).
	char *b_ptr = special + strlen("psfile=");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:238: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).
    if (memicmp(special, "color ", len = strlen("color ")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:249: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).
    else if (memicmp(special, "html:", len = strlen("html:")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:260: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).
    else if (memicmp(special, "papersize", len = strlen("papersize")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:265:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      || memcmp(special, "header", strlen("header")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:280:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/dvisel.c:681:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    while ((c = getc(in_fp)) != EOF) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:92: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).
#define HAS_PREFIX(src,dst) (memcmp(src, dst, strlen(dst)) == 0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3679: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).
	&& isdigit((int)fontname[(i=strlen(fontname))-1])
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:3920: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).
    size_t utf8_len = strlen(utf8) + 1; /* also convert terminating byte (acutally not needed ...) */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:4218: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).
    size_t utf8_len = strlen(utf8), i = 0, offset = 0;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/encodings.c:4229: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).
	    size_t len_ret = strlen(ret);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:584: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).
			    p1 = p + strlen(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:603: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).
			    p2 = p1 + strlen(p1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/events.c:687: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).
	  avladd(str, strlen(str), (struct avl **) &avl_ca_head,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/filehist.c:195: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).
	item->filename = xrealloc(item->filename, strlen(filename) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/filehist.c:327: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).
    ret[strlen(ret) - 1] = '\0'; /* chop off excess \n at end */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:155:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    len += strlen(ffline + len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.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).
		len = strlen(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:342:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		n = strlen(dvipsrc);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:453:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		p_node->value = xmemdup(ptr, strlen(ptr) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:566: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).
		p_end = p0 + strlen(p0);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:705: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).
		p_end = p + strlen(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:761: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).
	unsigned int	namelen	= strlen(name) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:792: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).
	str1_end = str1 + strlen(str1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:799: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).
		    str2_end = str2 + strlen(str2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:835: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).
	namelen = strlen(name) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.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).
	font_len = strlen(font);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1248: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 (strlen(gsfp->list->value + 1) + 2 == pos2 - pos1
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1312: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(fontname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1601:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    printlog_append("Done.\n", strlen("Done.\n"));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1627:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(fd, line, sizeof line);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1629:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(fd, line, sizeof line - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1697: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).
    buf = xmalloc(strlen(fname) + strlen(" at ") + LENGTH_OF_INT + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/font-open.c:1697: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).
    buf = xmalloc(strlen(fname) + strlen(" at ") + LENGTH_OF_INT + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ft.c:421:5:  [1] (buffer) strlen:
  Does not handle 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(t1p->encname),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Panner.c:225: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).
    from.size = strlen((char *) from.addr) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/Tip.c:594: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).
	    obj->size = strlen(text);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/help-window.c:190: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).
		get_title_and_summary(resource_default[i], strlen(resource_default[i]) - 1,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/help-window.c:195: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).
		size += strlen(resource_default[i]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/menu.c:200: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).
    entry_len = strlen(items[0]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/menu.c:235: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).
	    if (strlen(action) == 0 || (!compile_action(action, &my_action))) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/menu.c:312: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).
		size_t menu_len = strlen(line_items[0]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:177: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).
	new_name = xmalloc(strlen(basename) + strlen(new_ext) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:177: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).
	new_name = xmalloc(strlen(basename) + strlen(new_ext) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:181: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).
	new_name = xmalloc(strlen(old_name) + strlen(new_ext) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:181: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).
	new_name = xmalloc(strlen(old_name) + strlen(new_ext) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:185:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(new_name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:190: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).
	strcpy(new_name + len - strlen(old_ext), new_ext);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:219: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).
    if (papersize[strlen(papersize) - 1] == 'r') { /* landscape size */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:220: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).
	papersize[strlen(papersize) - 1] = '\0';
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:284:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    XtVaSetValues(file_text, XmNvalue, buf, XmNcursorPosition, strlen(buf), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:299:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tmp_label, old_label, sizeof tmp_label);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:307: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).
		XawTextSetInsertionPoint(file_text, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:542:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	XtVaSetValues(w, XmNvalue, fname, XmNcursorPosition, strlen(fname), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:545: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).
	XawTextSetInsertionPoint(w, strlen(fname));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:786: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).
		      XmNcursorPosition, strlen(info->printer_options),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:875:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		  XmNcursorPosition, strlen(info->finfo->out_file),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:954:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		  XmNcursorPosition, strlen(info->dvips_options),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1358: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).
	XawTextSetInsertionPoint(print_to_printer_text, strlen(info->printer_options));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1472: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).
    XawTextSetInsertionPoint(print_to_file_text, strlen(info->finfo->out_file));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1544: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).
    XawTextSetInsertionPoint(dvips_options_text, strlen(info->dvips_options));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1821:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    info->finfo->out_file = xmalloc(strlen(globals.cwd) + strlen(tmp) + 2); /* 1 extra for dir separator */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1821:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    info->finfo->out_file = xmalloc(strlen(globals.cwd) + strlen(tmp) + 2); /* 1 extra for dir separator */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1956:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	XtVaSetValues(text_from, XmNvalue, page_string, XmNcursorPosition, strlen(page_string), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1957:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	XtVaSetValues(text_to, XmNvalue, page_string, XmNcursorPosition, strlen(page_string), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1961: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).
	XawTextSetInsertionPoint(text_from, strlen(page_string));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-dialog.c:1962: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).
	XawTextSetInsertionPoint(text_to, strlen(page_string));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/print-log.c:529:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    printlog_append(info, str, strlen(str));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/search-dialog.c:168: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).
	XtVaSetValues(textfield, XmNcursorPosition, strlen(hist->char_items[0]), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/search-dialog.c:185: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).
	XtVaSetValues(textfield, XmNcursorPosition, strlen(str), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/search-dialog.c:191: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).
	XtVaSetValues(textfield, XmNcursorPosition, strlen(str), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/search-dialog.c:259: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).
	XtVaSetValues(textfield, XmNcursorPosition, strlen(hist->char_items[0]), NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:62: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).
    source.size = strlen(name) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:91: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 (memicmp(text_encoding, "iso-8859-1", strlen("iso-8859-1")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:92: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).
	|| memicmp(text_encoding, "iso8859-1", strlen("iso8859-1")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:95: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).
    else if (memicmp(text_encoding, "utf-8", strlen("utf-8")) != 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.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).
	     && memicmp(text_encoding, "utf8", strlen("utf8")) != 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:153: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).
	    *length = strlen(m_selection_text);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:160:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(m_cvt_selection_text, ptr, m_selection_size);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:166: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).
	    *length = strlen(m_cvt_selection_text);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:181:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(m_cvt_selection_text, ptr, m_selection_size);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/selection.c:230:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(m_selection_text, text, m_selection_size);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDir.c:106: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).
    maxChars = strlen(dir->dir) - 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDir.c:137: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/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDir.c:139: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.
	(void)strcat(strcpy(result[i].real, str), " ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:250: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).
	last = strlen(entry->real) - 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:266: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(shown);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:320: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).
			 entry->shown, strlen(entry->shown));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:367: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).
			 dir->dir, strlen(dir->dir)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:757: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).
    if (!strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir))) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfDraw.c:758: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).
	pos -= strlen(SFstartDir);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:137: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).
    char *s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:151: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).
    dir->nChars = strlen(cannotOpen);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:203:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:209: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).
	char *p = SFcurrentPath + strlen(SFcurrentPath);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:234:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:286:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:303: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).
	last = strlen(name) - 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:322: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).
	last = strlen(name) - 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:345: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 (str[strlen(str) - 1] == '/') {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:420:8:  [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.
	(void)strcpy(entries[0].real, "~");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:443: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(pw->pw_name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:445:15:  [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.
	(void)strcat(strcpy(entries[i].real, "~"), pw->pw_name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:477: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.
	(void)strcat(entries[i].real, "/");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:495:19:  [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.
	    (void)strcat(strcat(strcpy(SFcurrentPath,
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:703: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).
    text.length = strlen(path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:707:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    XawTextReplace(selFileField, 0, strlen(SFtextBuffer), &text);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:708: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).
    XawTextSetInsertionPoint(selFileField, strlen(SFtextBuffer));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfPath.c:823: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).
	last = strlen(str) - 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:308: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).
    entryReal[strlen(entryReal)] = SFstatChar(statBuf);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:825:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	SFtextPos = XawTextGetInsertionPoint(selFileField) + strlen(SFstartDir);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:915:11:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    (void)strcat(SFstartDir, "/");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:921: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).
	    if (strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir))) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:925: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).
		SFsetText(&(SFcurrentPath[strlen(SFstartDir)]));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:930:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    SFsetText(&(SFcurrentPath[strlen(SFstartDir)]));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/sfSelFile.c:950:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(fileMask, callback->filemask, MASKWIDTH);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:385: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(g_string_savebuf, " ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:444: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).
	if (!resource.hush_stdout && strlen(fmt) > 0) { /* check for strlen since sometimes we clear the statusline
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:459: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).
	    offset += strlen(old_content);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:460:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(buf, old_content, MAX_LEN);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:462: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).
	    if (strlen(old_content) < MAX_LEN - 1) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:463:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(buf, " ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:519: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).
    if (buf != NULL && memcmp(buf, pattern, strlen(pattern)) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/statusline.c:575: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 (strncmp(buf, pattern, strlen(pattern)) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/topic-window.c:199: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).
    if (subtitle != NULL && strlen(subtitle) > 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.c:443: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).
	new_len = LENGTH_OF_INT + strlen(filename) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.c:465: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).
    size_t new_len = LENGTH_OF_INT + strlen(filename) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xaw_menu.c:513: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).
    size_t new_len = LENGTH_OF_INT + strlen(filename) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.c:122: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).
	new_len = LENGTH_OF_INT + strlen(filename) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.c:198: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).
    size_t new_len = LENGTH_OF_INT + strlen(filename) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_menu.c:233: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).
    size_t new_len = LENGTH_OF_INT + strlen(filename) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_helpers.c:247: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(ptr) == 0 || is_spaces_only(ptr)) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:149: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).
		    strlen(papersizes[i].resource_format)) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:212: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(resource.paper) > 0 &&
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:214: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).
	resource.paper[strlen(resource.paper) - 1] == 'r')
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:253: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).
	if (strlen(resource.paper) > 0 &&
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:255: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).
	    resource.paper[strlen(resource.paper) - 1] == 'r') {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:338: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).
			strlen(papersizes[i].resource_format)) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:542:2:  [1] (buffer) strlen:
  Does not handle 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(resource.paper) > 0 &&
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:543: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).
	resource.paper[strlen(resource.paper) - 1] == 'r') { /* landscape format */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_page.c:598: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).
		    strlen(papersizes[i].resource_format)) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:281: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(x_buf, "0");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/gui/xm_prefs_scroll.c:294: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(y_buf, "0");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:328:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (memicmp(cp1, "<a href", strlen("<a href")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:329: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).
		cp1 += strlen("<a href");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:330: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).
		parse_html_special(cp1, strlen(cp1), &beg, &end);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:390: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).
    else if (memcmp(cp, "H.S end", strlen("H.S end")) == 0) { /* start of anchor */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:403: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).
    else if (memcmp(cp, "H.R end", strlen("H.R end")) == 0 /* end of rect */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:404:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	     || memcmp(cp, "H.A end", strlen("H.A end")) == 0 /* end of anchor */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:405:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	     || memcmp(cp, "H.L end", strlen("H.L end")) == 0 /* end of link */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:827:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (memicmp(filename, "file:", strlen("file:")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:829: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).
	    filename += strlen("file:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:836: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 (memicmp(filename, "//localhost", strlen("//localhost")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:837: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).
		filename += strlen("//localhost");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:847: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).
	    if (memicmp(filename, remote_URL_schemes[i], strlen(remote_URL_schemes[i])) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:894:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(info->anchors[info->curr_cnt].a_href, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:904: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(info->anchors[info->curr_cnt].a_href, "#");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:910:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(info->anchors[info->curr_cnt].a_href, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:919: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).
	    if (memcmp(str, "file:", strlen("file:")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:921:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(info->anchors[info->curr_cnt].a_href, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:925:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		info->anchors[info->curr_cnt].a_href = xmalloc(len + strlen("file:") + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:927: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).
		memcpy(info->anchors[info->curr_cnt].a_href + strlen("file:"),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:929: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).
		info->anchors[info->curr_cnt].a_href[len + strlen("file:")] = '\0';
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:943:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(info->anchors[info->curr_cnt].a_href, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:951:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(info->anchors[info->curr_cnt].a_name, str, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1078: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(m_prescan_info.pagelist[pageno - 1]),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1148:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    strncpy(number, str, 3);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1184:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    add_anchor(info, type, ptr, strlen(ptr), 0, NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1250: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).
    else if (memcmp(cp, "H.S end", strlen("H.S end")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1257:58:  [1] (buffer) strlen:
  Does not handle 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_anchor(&htex_page_info, A_HDVIPS_HREF, "__DUMMY__", strlen("__DUMMY__"), 0, NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1265: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).
    else if (memcmp(cp, "H.R end", strlen("H.R end")) == 0 /* end of rect */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1266:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	     || memcmp(cp, "H.A end", strlen("H.A end")) == 0 /* end of anchor */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1267:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	     || memcmp(cp, "H.L end", strlen("H.L end")) == 0 /* end of link */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1350: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).
		       strlen(htex_page_info.anchors[idx].a_href),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1354:57:  [1] (buffer) strlen:
  Does not handle 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_anchor(&htex_page_info, A_HREF, "__WRAPPED__", strlen("__WRAPPED__"), 0, NULL);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1424: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).
	g_anchor_len = strlen(g_anchor_pos);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1535: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).
	g_anchor_len = strlen(g_anchor_pos);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:1708: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).
		g_anchor_len = strlen(g_anchor_pos);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2109: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(format_string) > 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2122: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("xterm -e ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2125: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).
    syscmd = xmalloc(offset + strlen(viewer) + strlen(fullpath) + 2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2125: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).
    syscmd = xmalloc(offset + strlen(viewer) + strlen(fullpath) + 2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2132: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(format_string) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2133: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(syscmd + offset + (ptr - viewer), " ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2139: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).
    strcpy(syscmd + offset + (ptr - viewer) + strlen(fullpath), ptr + strlen(format_string));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/hypertex.c:2139:71:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strcpy(syscmd + offset + (ptr - viewer) + strlen(fullpath), ptr + strlen(format_string));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:320: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).
    size = strlen(fmt) + 25 * 2 + 10 * 2 + strlen(magick_tmp) + strlen(resource.gs_path) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:320: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).
    size = strlen(fmt) + 25 * 2 + 10 * 2 + strlen(magick_tmp) + strlen(resource.gs_path) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:320:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size = strlen(fmt) + 25 * 2 + 10 * 2 + strlen(magick_tmp) + strlen(resource.gs_path) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:687: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).
    n = strlen(fullpath);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/image-magick.c:1042: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).
    l = strlen(fn);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:333: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).
    return memicmp(*ss, *tt, strlen(*tt) + 1); /* also check for final 0 */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:402: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).
    col = strlen(s);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/main.c:406: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).
	n = strlen(sorted_options[k]);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:180: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).
	*ret_len = strlen(*linebuf);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:268: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).
    if (memcmp(path, "$HOME", strlen("$HOME")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.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).
	newpath = xstrcat(newpath, path + strlen("$HOME"));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:315: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).
	else if (num_items == 1 || (num_items >= 2 && strlen(items[1]) == 0)) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:351: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).
	    else if (memcmp(items[n], "test=", strlen("test=")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:352:57:  [1] (buffer) strlen:
  Does not handle 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_mailcap[*mailcap_line].testcmd = xstrdup(items[n] + strlen("test="));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:355: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).
	    else if (memcmp(items[n], "needsterminal", strlen("needsterminal")) == 0) { /* set flag */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:359: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).
	    else if (memcmp(items[n], "copiousoutput", strlen("copiousoutput")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:360: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).
		     || memcmp(items[n], "compose=", strlen("compose=")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:361: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).
		     || memcmp(items[n], "composetyped=", strlen("composetyped=")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:362: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).
		     || memcmp(items[n], "print=", strlen("print=")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:363:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		     || memcmp(items[n], "edit=", strlen("edit=")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:364: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).
		     || memcmp(items[n], "x11-bitmap=", strlen("x11-bitmap=")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:365: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).
		     || memcmp(items[n], "description=", strlen("description=")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:404: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).
    path_elems = split_line(path, ':', 0, strlen(path), &elem_cnt);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:514: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).
    syscmd = xmalloc(strlen(cmd) + strlen(arg) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:514: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).
    syscmd = xmalloc(strlen(cmd) + strlen(arg) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:529:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strcpy(syscmd + (ptr - cmd) + strlen(arg), ptr + len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:602:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (filename[strlen(filename) - 1] == '/') {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/mime.c:639: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).
	    cp += strlen(extension);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/my-vsnprintf.c:91:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(pipe_fd[0], buf, len);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:130: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).
	ptr += strlen("Page history empty.");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:134: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).
	ptr += strlen("Page history:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:171: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).
	    ptr += strlen(" ...");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:198: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).
		ptr += strlen(fname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/pagehist.c:199: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(ptr, "]");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:347:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(print_xio.fd, line, sizeof line);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/print-internal.c:349:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(print_xio.fd, line, sizeof line - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:230:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(fd, linepos, line + LINELEN - linepos);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:605: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).
		    PropModeReplace, (unsigned char *)buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:613: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).
		    PropModeReplace, (unsigned char *)buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:893: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).
	    gs_send(buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:905: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).
	    gs_send(buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:930: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).
    gs_send(buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:948: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).
    gs_send(cp, strlen(cp));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:966: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).
    gs_send(cp, strlen(cp));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:1002: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).
    gs_send(cp, strlen(cp));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psgs.c:1017: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).
    gs_send(cp, strlen(cp));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:639: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).
	    NeWS_send(buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:650: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).
	    NeWS_send(buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:660: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).
    NeWS_send(buf, strlen(buf));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:661: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).
    NeWS_send(cp, strlen(cp));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:703:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(origcp) + 4;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:737: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).
		    cp1 += strlen(cp1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:749: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).
		    cp1 += strlen(cp1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:774:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(cp);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/psnews.c:846: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).
    NeWS_send(cp, strlen(cp));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:106: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(font) >6 && strstr(font + (strlen(font) - 5), "/AJ16") != NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:106: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 (strlen(font) >6 && strstr(font + (strlen(font) - 5), "/AJ16") != NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:117: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).
      map->font_filename  = xstrndup(font, strlen(font) - 5);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:175: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(font) >6 && strstr(font + (strlen(font) - 5), "/AJ16") != NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:175: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 (strlen(font) >6 && strstr(font + (strlen(font) - 5), "/AJ16") != NULL) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/ptexmap.c:178: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).
      font[strlen(font) - 5] = '\0';
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:388: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).
		(unsigned long)(strlen(info->txt_buf + initial_offset))));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:433:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:492: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).
			       ptr - utf8_locale + strlen(".utf8") + strlen(rest) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:492: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).
			       ptr - utf8_locale + strlen(".utf8") + strlen(rest) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:513: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).
    if ((len = utf8_to_ucs4((const char *)p, &ucs4, strlen((const char*)p))) <= 0)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:528: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).
    tot_len = strlen(info->txt_buf);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:538: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).
	    len = utf8_to_ucs4(info->txt_buf + i, &ucs4, strlen(info->txt_buf + i));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:649:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ASSERT(info->curr_buf_idx == strlen(info->txt_buf), "");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:652: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).
		(unsigned long)strlen(info->txt_buf),
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:661: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).
		    (unsigned long)strlen(info->txt_buf)));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:677: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).
		curr_pos = res - info->txt_buf + strlen(settings->utf8_term);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:688: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).
	searchinfo->to_pos = searchinfo->from_pos + strlen(settings->utf8_term);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:999:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    size_t len2 = strlen(perl2posix_map[i].posix_class);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1004: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).
	    posix_regex = xrealloc(posix_regex, strlen(posix_regex) + len2 - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1006:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    memmove(posix_regex + len1 + len2, posix_regex + len1 + 2, strlen(posix_regex + len1 + 2) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1056:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = utf8_to_ucs4(txt_info.txt_buf + i, &ucs4, strlen(txt_info.txt_buf + i));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1058: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).
	    size_t len_ret = strlen(ret);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1215: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 (memicmp(encoding, "iso-8859-1", strlen("iso-8859-1")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1216: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).
	|| memicmp(encoding, "iso8859-1", strlen("iso8859-1")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1217: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).
	int conv_len = (strlen(settings->term) + 1) * 2;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1233: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).
    else if (memicmp(encoding, "utf-8", strlen("utf-8")) == 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1234: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).
	     || memicmp(encoding, "utf8", strlen("utf8")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1264: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 l, len = strlen((char *)p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1289:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	settings->utf8_term = xrealloc(settings->utf8_term, strlen(settings->utf8_term) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1703: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(settings->term) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1747: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(settings->utf8_term) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/search-internal.c:1943:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t len = strlen(settings->isearchterm);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1347:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1437: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).
	    len = strlen(filename) + strlen(psinfp->tempname) + (4 - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1437: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).
	    len = strlen(filename) + strlen(psinfp->tempname) + (4 - 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1558: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).
	    len = strlen(filename);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1568:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (getc(f) != magic1 || (char)getc(f) != magic2
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1568:34:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (getc(f) != magic1 || (char)getc(f) != magic2
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1569:29:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    || (magic3 != '\0' && getc(f) != magic3)) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1852:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(cp) + NKEYS + 30;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1860: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).
    q = buffer + strlen(buffer);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:1894: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).
		q += strlen(q);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2146:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	if (sscanf(cp, "%lf %lf %lf setrgbcolor %7s", &r, &g, &b, dummy) == 3
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2153:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	else if (sscanf(cp, "%lf %lf %lf %lf setcmykcolor %7s", &r, &g, &b, &k, dummy) == 4
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2164:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	else if (sscanf(cp, "%lf %lf %lf sethsbcolor %7s", &hue, &sat, &bri, dummy) == 3 && hue >= 0
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2185:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	else if (sscanf(cp, "%lf setgray %7s", &r, dummy) == 1 && r >= 0 && r <= 1) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2705: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).
	this_node->this_file = strcpy(xmalloc((strlen(psheader) + 1) * sizeof(char)), psheader);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2797:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (memicmp(cp, "sdict begin ", strlen("sdict begin ")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2802: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).
	    cp += strlen("sdict begin ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2814:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    htex_do_special(match, len - 3 - (match - cp) - strlen("sdict begin "));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2816:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    htex_do_special(cp, len - strlen("sdict begin "));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2989:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (memicmp(cp, "sdict begin ", strlen("sdict begin ")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:2992: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).
	    cp += strlen("sdict begin ");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:3017: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).
    else if (memicmp(cp, "html:", strlen("html:")) == 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/special.c:3018:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t offset = strlen("html:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:78: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).
    if (linepos + strlen(s) > LINELENGTH) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:83: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).
    linepos += strlen(s);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:94: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).
    l = strlen(s);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:134:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = getc(in);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:138:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    while ((c = getc(in)) != '\n');
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:158:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(in);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:165:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    *b++ = getc(in);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/squeeze/squeeze.c:180:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(in);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:80: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).
    int len1 = strlen(str1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:81: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).
    int len2 = strlen(str2);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:146: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).
	size_t len = strlen(filename) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:161:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    len += strlen(path_name) + 1;	/* 1 for '/' */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:163: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(path_name, "/");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:196: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).
	filename += strlen("file:");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:220:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(filename) + 5; /* 5 in case we need to add `.dvi\0' */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:260: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).
    char *tmp = xmalloc(strlen(fmt) + strlen(arg) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:260: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).
    char *tmp = xmalloc(strlen(fmt) + strlen(arg) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:278: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).
    ret = xmalloc(strlen(arg) * 2 + 1); /* more than enuff */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:292: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).
    return xrealloc(ret, strlen(ret) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:312: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(fmt);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:489: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).
    j = strlen(target);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:587:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(path);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:646:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/string-utils.c:703: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).
	size_t len = strlen(extension);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_string_utils.c:171: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).
			 tests[i].str1 + strlen(tests[i].str1) - strlen(tests[i].result) :
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/tests/test_string_utils.c:171: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).
			 tests[i].str1 + strlen(tests[i].str1) - strlen(tests[i].result) :
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:446: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(path) + 1 > MAXPATHLEN) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:524: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).
	    if (strlen(resolved) + 2 > MAXPATHLEN) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:528: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(resolved, "/");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:532: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).
	    if (strlen(resolved) + strlen(tmpbuf) + 1 > MAXPATHLEN) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:532: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).
	    if (strlen(resolved) + strlen(tmpbuf) + 1 > MAXPATHLEN) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:599:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(str) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:626: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).
    char *ret = XtMalloc(strlen(ptr) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:642: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).
    size_t len1 = (str1 == NULL) ? 0 : strlen(str1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:643:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len2 = strlen(str2) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:818:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    x = (signed char)getc(fp);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:820:24:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    x = (unsigned char)getc(fp);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:864: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).
	memcpy(p + strlen(p) - 6, "XXXXXX", 6);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:877: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).
	    len = strlen(ourdir);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:894: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).
	memcpy(p + strlen(p) - 6, "XXXXXX", 6);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:898: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).
    p1 = p + strlen(p) - 6;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:977:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((bytes = read(fd, tmp_buf, BUF_SIZE - 1)) > 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1026: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).
	buf[strlen(buf) - 1] = '\0'; /* chop off trailing space */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1214: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).
	    size_t curr_opt_len = strlen(debug_options[i].description);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1737: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).
    globals.dvi_file.dirlen = strlen(globals.dvi_file.dirname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1754: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).
    globals.dvi_file.dirlen = strlen(globals.dvi_file.dirname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1859:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t input_len = strlen(str);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1949:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t l_rest = strlen(ptr + 2) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1966: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).
		l_mid = strlen(new_elem);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/util.c:1968: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).
		argv[i] = xrealloc(argv[i], strlen(argv[i]) + l_mid + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:486: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).
    from.size = strlen(from.addr) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:492: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).
	from.size = strlen(from.addr) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:768: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(name) > 1023) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:813: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).
    size_t offset = strlen("xdvi.");
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:814: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).
    size_t name_len = strlen(name);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:865:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(homedir) + strlen(basename) + 2; /* 1 more for '/' */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:865: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).
    len = strlen(homedir) + strlen(basename) + 2; /* 1 more for '/' */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:922: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).
	    memcmp(testbuf, xdvirc_signature_line, strlen(xdvirc_signature_line)) != 0) {
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/x_util.c:1072: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).
		    (const unsigned char *)str, strlen(str));
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:768: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 len = strlen(arg);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:919: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).
    src_parse(source_str, strlen(source_str), &data);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:948: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).
			  + strlen(expanded_filename) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1122: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).
    *title_name = xmalloc(strlen(title_name_fmt)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1123: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).
			  + strlen(XDVIK_PROGNAME)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1124: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).
			  + strlen(*icon_name)
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1588:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    g_link_color_rgb = xmalloc(strlen("push rgb 0.00 0.00 0.00") + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1610: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).
    g_visited_link_color_rgb = xmalloc(strlen("push rgb 0.00 0.00 0.00") + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1615: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).
    from1.size = strlen(from1.addr) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1623: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).
	from1.size = strlen(from1.addr) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1629: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).
    from2.size = strlen(from2.addr) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1637: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).
	from2.size = strlen(from2.addr) + 1;
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1815:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    src_parse(source_position, strlen(source_position), &data);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:1848: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).
			      + strlen(expanded_filename) + 1);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:2097: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).
	p_end = p + strlen(p);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:3181: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).
    globals.dvi_file.dirlen = strlen(globals.dvi_file.dirname);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:3199: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(cb->page_arg) == 0) { /* special case: treat `+' as last page */
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.c:3581: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).
	g_anchor_len = strlen(g_anchor_pos);
data/xdvik-ja-22.87.05+j1.42/texk/xdvik/xdvi.h:1131:38:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define get_byte(fp)	((unsigned char)getc(fp))

ANALYSIS SUMMARY:

Hits = 853
Lines analyzed = 82111 in approximately 2.31 seconds (35623 lines/second)
Physical Source Lines of Code (SLOC) = 61319
Hits@level = [0] 555 [1] 403 [2] 311 [3]  23 [4] 115 [5]   1
Hits@level+ = [0+] 1408 [1+] 853 [2+] 450 [3+] 139 [4+] 116 [5+]   1
Hits/KSLOC@level+ = [0+] 22.9619 [1+] 13.9109 [2+] 7.33867 [3+] 2.26683 [4+] 1.89175 [5+] 0.0163082
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.