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/libspectre-0.2.9/libspectre/spectre-page.c
Examining data/libspectre-0.2.9/libspectre/spectre-gs.h
Examining data/libspectre-0.2.9/libspectre/spectre.h
Examining data/libspectre-0.2.9/libspectre/ps.c
Examining data/libspectre-0.2.9/libspectre/spectre-device.h
Examining data/libspectre-0.2.9/libspectre/spectre-version.h
Examining data/libspectre-0.2.9/libspectre/spectre-page.h
Examining data/libspectre-0.2.9/libspectre/spectre-exporter-ps.c
Examining data/libspectre-0.2.9/libspectre/spectre-exporter.c
Examining data/libspectre-0.2.9/libspectre/spectre-render-context.c
Examining data/libspectre-0.2.9/libspectre/ps.h
Examining data/libspectre-0.2.9/libspectre/spectre-utils.c
Examining data/libspectre-0.2.9/libspectre/spectre-device.c
Examining data/libspectre-0.2.9/libspectre/spectre-gs.c
Examining data/libspectre-0.2.9/libspectre/spectre-utils.h
Examining data/libspectre-0.2.9/libspectre/spectre-render-context.h
Examining data/libspectre-0.2.9/libspectre/spectre-document.c
Examining data/libspectre-0.2.9/libspectre/spectre-exporter.h
Examining data/libspectre-0.2.9/libspectre/spectre-status.h
Examining data/libspectre-0.2.9/libspectre/spectre-status.c
Examining data/libspectre-0.2.9/libspectre/spectre-macros.h
Examining data/libspectre-0.2.9/libspectre/spectre-private.h
Examining data/libspectre-0.2.9/libspectre/spectre-document.h
Examining data/libspectre-0.2.9/libspectre/spectre-exporter-pdf.c
Examining data/libspectre-0.2.9/test/spectre_read_fuzzer.c
Examining data/libspectre-0.2.9/test/spectre-test.c
Examining data/libspectre-0.2.9/test/parser-test.c
Examining data/libspectre-0.2.9/test/fuzz_main.c

FINAL RESULTS:

data/libspectre-0.2.9/libspectre/ps.c:670:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(doc->media[0].name, dmp->name);
data/libspectre-0.2.9/libspectre/ps.c:703:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(doc->media[doc->nummedia].name, dmp->name);
data/libspectre-0.2.9/libspectre/ps.c:1432: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(cp, text);
data/libspectre-0.2.9/libspectre/ps.c:1934: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).
         strcpy(cp, line);
data/libspectre-0.2.9/libspectre/spectre-utils.c:99:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf (stderr, format, args);
data/libspectre-0.2.9/libspectre/spectre-utils.c:127:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf (stderr, format, args);
data/libspectre-0.2.9/libspectre/spectre-utils.c:173:6:  [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.
	n = vsnprintf (&c, 1, format, args);
data/libspectre-0.2.9/libspectre/spectre-utils.c:177:9:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
		len = vsprintf (string, format, args_copy);
data/libspectre-0.2.9/libspectre/spectre-utils.c:65: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.
	s = getenv ("SPECTRE_FATAL_WARNINGS");
data/libspectre-0.2.9/libspectre/ps.c:213: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 fllx[21], flly[21], furx[21], fury[21];
data/libspectre-0.2.9/libspectre/ps.c:389: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 text[PSLINELENGTH];	/* Temporary storage for text */
data/libspectre-0.2.9/libspectre/ps.c:606: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 w[21], h[21];
data/libspectre-0.2.9/libspectre/ps.c:1348: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 text[PSLINELENGTH];	/* Temporary storage for text */
data/libspectre-0.2.9/libspectre/ps.c:1811:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char text[101];
data/libspectre-0.2.9/libspectre/ps.c:1942: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.
         char text[101];
data/libspectre-0.2.9/libspectre/ps.c:2104: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 text[PSLINELENGTH];
data/libspectre-0.2.9/libspectre/ps.c:2117: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).
    src_file = fopen(src_filename, "rb");
data/libspectre-0.2.9/libspectre/ps.h:75: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 id[4];
data/libspectre-0.2.9/libspectre/spectre-device.c:111: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 (sd->user_image, sd->gs_image, sd->row_length * sd->height);
data/libspectre-0.2.9/libspectre/spectre-device.c:130: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 (sd->user_image + sd->row_length * i + x * 4,
data/libspectre-0.2.9/libspectre/spectre-device.c:189:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (dest + dest_pixel_start, src + src_pixel_start, PIXEL_SIZE);
data/libspectre-0.2.9/libspectre/spectre-document.c:120:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file = fopen (filename, "rb");
data/libspectre-0.2.9/libspectre/spectre-document.c:283:40:  [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).
	return document->doc->languagelevel ? atoi (document->doc->languagelevel) : 0;
data/libspectre-0.2.9/libspectre/spectre-document.c:448:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	from = fopen (document->doc->filename, "rb");
data/libspectre-0.2.9/libspectre/spectre-document.c:454: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).
	to = fopen (filename, "wb");
data/libspectre-0.2.9/libspectre/spectre-exporter-pdf.c:30:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *args[10];
data/libspectre-0.2.9/libspectre/spectre-exporter-ps.c:29:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	exporter->from = fopen (exporter->doc->filename, "rb");
data/libspectre-0.2.9/libspectre/spectre-exporter-ps.c:33:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	exporter->to = fopen (filename, "wb");
data/libspectre-0.2.9/libspectre/spectre-gs.c:92: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 buf[BUFFER_SIZE];
data/libspectre-0.2.9/libspectre/spectre-gs.c:98: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).
	fd = fopen (filename, "rb");
data/libspectre-0.2.9/libspectre/spectre-utils.c:218: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 (copy, str, len);
data/libspectre-0.2.9/libspectre/spectre-utils.c:334: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 (c, nptr, decimal_point_pos - nptr);
data/libspectre-0.2.9/libspectre/spectre-utils.c:336: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 (c, decimal_point, decimal_point_len);
data/libspectre-0.2.9/libspectre/spectre-utils.c:338: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 (c, decimal_point_pos + 1, end - (decimal_point_pos + 1));
data/libspectre-0.2.9/libspectre/spectre-utils.c:358: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 (copy, nptr, end - nptr);
data/libspectre-0.2.9/libspectre/spectre-utils.h:55:41:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#    define SPECTRE_VA_COPY(ap1, ap2)   memcpy ((ap1), (ap2), sizeof (va_list))
data/libspectre-0.2.9/test/fuzz_main.c:21:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(argv[1], "rb");
data/libspectre-0.2.9/test/parser-test.c:16: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 buf[BUFFER_SIZE];
data/libspectre-0.2.9/test/parser-test.c:21:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	dst = fopen (filename, "w");
data/libspectre-0.2.9/test/parser-test.c:55: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).
	fd = fopen (argv[1], "r");
data/libspectre-0.2.9/libspectre/ps.c:116:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	 strncpy(tmp, s2, (n-1));
data/libspectre-0.2.9/libspectre/ps.c:219:9:  [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 (line, "%20s %20s %20s %20s",
data/libspectre-0.2.9/libspectre/ps.c:477:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      sscanf(line, "%%!%256s %*s", text);
data/libspectre-0.2.9/libspectre/ps.c:481:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      sscanf(line, "%*s %256s", text);
data/libspectre-0.2.9/libspectre/ps.c:533: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.
	    sscanf(line+length("%%BoundingBox:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:543: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.
	    sscanf(line+length("%%Orientation:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:560: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.
	    sscanf(line+length("%%PageOrder:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:574: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.
	    sscanf(line+length("%%Pages:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:613:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if (sscanf(next_char, "%20s %20s", w, h) == 2) {
data/libspectre-0.2.9/libspectre/ps.c:637: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.
		    if (sscanf(next_char, "%20s %20s", w, h) == 2) {
data/libspectre-0.2.9/libspectre/ps.c:668: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).
			doc->media[0].name = (char *)PS_malloc(strlen(dmp->name)+1);
data/libspectre-0.2.9/libspectre/ps.c:701: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).
				(char *)PS_malloc(strlen(dmp->name)+1);
data/libspectre-0.2.9/libspectre/ps.c:804:3:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		sscanf(line+length("%%PageOrientation:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:924:3:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		sscanf(line+length("%%PageOrientation:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:1057:19:  [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.
		const int res = sscanf(line+length("%%PageOrientation:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:1095:19:  [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.
		const int res = sscanf(line+length("%%PageBoundingBox:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:1162: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.
	    sscanf(line+length("%%Orientation:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:1173: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.
	    sscanf(line+length("%%PageOrder:"), "%256s", text);
data/libspectre-0.2.9/libspectre/ps.c:1326: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(line) == 0) {ENDMESSAGE(gettextline) return NULL;}
data/libspectre-0.2.9/libspectre/ps.c:1327: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).
	cp = (char *) PS_malloc(strlen(line));
data/libspectre-0.2.9/libspectre/ps.c:1329:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cp, line, strlen(line)-1);
data/libspectre-0.2.9/libspectre/ps.c:1329: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).
	strncpy(cp, line, strlen(line)-1);
data/libspectre-0.2.9/libspectre/ps.c:1330: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).
	cp[strlen(line)-1] = '\0';
data/libspectre-0.2.9/libspectre/ps.c:1429:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!quoted && strlen(text) == 0) {ENDMESSAGE(ps_gettext) return NULL;}
data/libspectre-0.2.9/libspectre/ps.c:1430: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).
    cp = (char *) PS_malloc(strlen(text)+1);
data/libspectre-0.2.9/libspectre/ps.c:1661:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
         INFMESSAGE(failed to read more chars)
data/libspectre-0.2.9/libspectre/ps.c:1815: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.
      if (sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) {
data/libspectre-0.2.9/libspectre/ps.c:1920: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).
      comment_length = strlen(comment);
data/libspectre-0.2.9/libspectre/ps.c:1931: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).
         char *cp = (char *) PS_malloc(strlen(line)+1);
data/libspectre-0.2.9/libspectre/ps.c:1946:14:  [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(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) {
data/libspectre-0.2.9/libspectre/ps.c:2073: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).
        pscopyuntil(fd, to, here, here + strlen ("%%Trailer") + 1, NULL);
data/libspectre-0.2.9/libspectre/ps.c:2133:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
       sscanf(comment+length("%%Pages:"), "%256s", text);
data/libspectre-0.2.9/libspectre/spectre-gs.c:93:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	unsigned int read;
data/libspectre-0.2.9/libspectre/spectre-gs.c:115: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).
		error = gsapi_run_string_continue (ghostscript_instance, set, strlen (set),
data/libspectre-0.2.9/libspectre/spectre-gs.c:133:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						   buf, read, 0, &exit_code);
data/libspectre-0.2.9/libspectre/spectre-gs.c:135:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		left -= read;
data/libspectre-0.2.9/libspectre/spectre-gs.c:213: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).
					      str, strlen (str), 0, &exit_code);
data/libspectre-0.2.9/libspectre/spectre-utils.c:212: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) + 1;
data/libspectre-0.2.9/libspectre/spectre-utils.c:290: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).
	decimal_point_len = strlen (decimal_point);
data/libspectre-0.2.9/test/parser-test.c:17:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	unsigned int read;
data/libspectre-0.2.9/test/parser-test.c:39:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fwrite (buf, sizeof (char), read, dst);
data/libspectre-0.2.9/test/parser-test.c:41:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		left -= read;

ANALYSIS SUMMARY:

Hits = 82
Lines analyzed = 6778 in approximately 0.19 seconds (35009 lines/second)
Physical Source Lines of Code (SLOC) = 4716
Hits@level = [0]  73 [1]  42 [2]  31 [3]   1 [4]   8 [5]   0
Hits@level+ = [0+] 155 [1+]  82 [2+]  40 [3+]   9 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 32.8668 [1+] 17.3876 [2+] 8.48176 [3+] 1.9084 [4+] 1.69635 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.