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/wiggle-1.1/ccan/build_assert/build_assert.h
Examining data/wiggle-1.1/ccan/build_assert/test/compile_fail-expr.c
Examining data/wiggle-1.1/ccan/build_assert/test/compile_fail.c
Examining data/wiggle-1.1/ccan/build_assert/test/compile_ok.c
Examining data/wiggle-1.1/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
Examining data/wiggle-1.1/ccan/hash/test/api-hash_stable.c
Examining data/wiggle-1.1/ccan/hash/test/run.c
Examining data/wiggle-1.1/ccan/hash/hash.c
Examining data/wiggle-1.1/ccan/hash/hash.h
Examining data/wiggle-1.1/config.h
Examining data/wiggle-1.1/demo.orig/vpatch.c
Examining data/wiggle-1.1/demo.orig/wiggle.c
Examining data/wiggle-1.1/demo.patched/vpatch.c
Examining data/wiggle-1.1/demo.patched/wiggle.c
Examining data/wiggle-1.1/demo/md.c
Examining data/wiggle-1.1/demo/vpatch.c
Examining data/wiggle-1.1/demo/wiggle.c
Examining data/wiggle-1.1/diff.c
Examining data/wiggle-1.1/load.c
Examining data/wiggle-1.1/merge2.c
Examining data/wiggle-1.1/parse.c
Examining data/wiggle-1.1/patch_depends.c
Examining data/wiggle-1.1/split.c
Examining data/wiggle-1.1/wiggle.c
Examining data/wiggle-1.1/wiggle.h
Examining data/wiggle-1.1/ReadMe.c
Examining data/wiggle-1.1/bestmatch.c
Examining data/wiggle-1.1/extract.c
Examining data/wiggle-1.1/vpatch.c

FINAL RESULTS:

data/wiggle-1.1/demo.orig/wiggle.c:578: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(replacename, argv[optind]);
data/wiggle-1.1/demo.orig/wiggle.c:579: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(orignew, argv[optind]);
data/wiggle-1.1/demo.patched/wiggle.c:578: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(replacename, argv[optind]);
data/wiggle-1.1/demo.patched/wiggle.c:579: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(orignew, argv[optind]);
data/wiggle-1.1/demo/md.c:1737:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len+= sprintf(page+len, "%sfaulty",sep);
data/wiggle-1.1/demo/md.c:1741:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len += sprintf(page+len, "%sin_sync",sep);
data/wiggle-1.1/demo/md.c:1745:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len += sprintf(page+len, "%swrite_mostly",sep);
data/wiggle-1.1/demo/md.c:1750:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len += sprintf(page+len, "%sspare", sep);
data/wiggle-1.1/demo/md.c:2146:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		return sprintf(page, "%s\n", p->name);
data/wiggle-1.1/demo/md.c:2148:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		return sprintf(page, "%s\n", mddev->clevel);
data/wiggle-1.1/demo/md.c:2362:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	return sprintf(page, "%s\n", array_states[st]);
data/wiggle-1.1/demo/md.c:2634:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	return sprintf(page, "%s\n", type);
data/wiggle-1.1/demo/md.c:2691:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	return sprintf(page, "%d (%s)\n", speed_min(mddev),
data/wiggle-1.1/demo/md.c:2717:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	return sprintf(page, "%d (%s)\n", speed_max(mddev),
data/wiggle-1.1/demo/md.c:3646: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(file->pathname, ptr);
data/wiggle-1.1/demo/wiggle.c:578: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(replacename, argv[optind]);
data/wiggle-1.1/demo/wiggle.c:579: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(orignew, argv[optind]);
data/wiggle-1.1/extract.c:137: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(r1.body + r1.len, f);
data/wiggle-1.1/merge2.c:862: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(replacename, file);
data/wiggle-1.1/merge2.c:864: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(orignew, file);
data/wiggle-1.1/vpatch.c:1278:3:  [4] (shell) execlp:
  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.
		execlp(ed, ed, linebuf, file, NULL);
data/wiggle-1.1/vpatch.c:2838:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
				sprintf(saveall_buf, saveall_msg,
data/wiggle-1.1/vpatch.c:2907: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(orignew, file);
data/wiggle-1.1/wiggle.c:538: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(replacename, argv[0]);
data/wiggle-1.1/wiggle.c:539: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(orignew, argv[0]);
data/wiggle-1.1/ccan/hash/test/run.c:38:16:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
				array[k] = random();
data/wiggle-1.1/ccan/hash/test/run.c:63:16:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
				array[k] = random();
data/wiggle-1.1/demo.orig/wiggle.c:164:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv,
data/wiggle-1.1/demo.patched/wiggle.c:164:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv,
data/wiggle-1.1/demo/wiggle.c:164:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv,
data/wiggle-1.1/merge2.c:898:9:  [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.
		dir = getenv("TMPDIR");
data/wiggle-1.1/vpatch.c:1269:13:  [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 *ed = getenv("VISUAL");
data/wiggle-1.1/vpatch.c:1272:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		ed = getenv("EDITOR");
data/wiggle-1.1/vpatch.c:2665: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.
	char *debug = getenv("WIGGLE_DEBUG");
data/wiggle-1.1/wiggle.c:681: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.
	trace = getenv("WIGGLE_TRACE");
data/wiggle-1.1/wiggle.c:685:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv,
data/wiggle-1.1/bestmatch.c:217:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
					vnew.c = atoi(b->list[y-1].start+1);
data/wiggle-1.1/bestmatch.c:241:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			v[klo].c = atoi(b->list[y-1].start+1);
data/wiggle-1.1/ccan/hash/test/run.c:13: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 array2[sizeof(array) + sizeof(uint32_t)];
data/wiggle-1.1/ccan/hash/test/run.c:24: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(array2 + i, array, sizeof(array));
data/wiggle-1.1/ccan/hash/test/run.c:114: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 p[5];
data/wiggle-1.1/demo.orig/vpatch.c:40:6:  [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 open;
data/wiggle-1.1/demo.orig/vpatch.c:97: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 name[1024];
data/wiggle-1.1/demo.orig/vpatch.c:247: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 curr[1024];
data/wiggle-1.1/demo.orig/vpatch.c:290:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	while (pl[pos].open &&
data/wiggle-1.1/demo.orig/vpatch.c:299: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).
	if (pl[pos].open) {
data/wiggle-1.1/demo.orig/vpatch.c:314: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 hdr[10];
data/wiggle-1.1/demo.orig/vpatch.c:323: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(hdr, "XX");
data/wiggle-1.1/demo.orig/vpatch.c:324: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.
	else sprintf(hdr, "%02d", pl->chunks);
data/wiggle-1.1/demo.orig/vpatch.c:326: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(hdr, " XX");
data/wiggle-1.1/demo.orig/vpatch.c:327: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.
	else sprintf(hdr+2, " %02d", pl->wiggles);
data/wiggle-1.1/demo.orig/vpatch.c:329: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(hdr, " XX");
data/wiggle-1.1/demo.orig/vpatch.c:330: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.
	else sprintf(hdr+5, " %02d ", pl->conflicts);
data/wiggle-1.1/demo.orig/vpatch.c:332: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(hdr+9, "= ");
data/wiggle-1.1/demo.orig/vpatch.c:333:15:  [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).
	else if (pl->open)
data/wiggle-1.1/demo.orig/vpatch.c:334: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(hdr+9, "+ ");
data/wiggle-1.1/demo.orig/vpatch.c:335: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.
	else strcpy(hdr+9, "- ");
data/wiggle-1.1/demo.orig/vpatch.c:356:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[100];
data/wiggle-1.1/demo.orig/vpatch.c:362: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, "Chunk count: %d\n", ch);
data/wiggle-1.1/demo.orig/vpatch.c:607:30:  [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).
				pl[pos].open = ! pl[pos].open;
data/wiggle-1.1/demo.orig/vpatch.c:630: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).
		f = fopen(argv[argc-1], "w+");
data/wiggle-1.1/demo.orig/vpatch.c:632:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		in = fopen(argv[1], "r");
data/wiggle-1.1/demo.orig/wiggle.c:580:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(orignew, ".porig");
data/wiggle-1.1/demo.orig/wiggle.c:581:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if (open(orignew, O_RDONLY) >= 0 ||
data/wiggle-1.1/demo.orig/wiggle.c:587:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(replacename,"XXXXXX");
data/wiggle-1.1/demo.orig/wiggle.c:588:9:  [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(replacename);
data/wiggle-1.1/demo.patched/vpatch.c:41:6:  [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 open;
data/wiggle-1.1/demo.patched/vpatch.c:98: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 name[1024];
data/wiggle-1.1/demo.patched/vpatch.c:248: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 curr[1024];
data/wiggle-1.1/demo.patched/vpatch.c:291:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	while (pl[pos].open &&
data/wiggle-1.1/demo.patched/vpatch.c:300: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).
	if (pl[pos].open) {
data/wiggle-1.1/demo.patched/vpatch.c:315: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 hdr[10];
data/wiggle-1.1/demo.patched/vpatch.c:324: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(hdr, "XX");
data/wiggle-1.1/demo.patched/vpatch.c:325: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.
	else sprintf(hdr, "%02d", pl->chunks);
data/wiggle-1.1/demo.patched/vpatch.c:327: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(hdr, " XX");
data/wiggle-1.1/demo.patched/vpatch.c:328: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.
	else sprintf(hdr+2, " %02d", pl->wiggles);
data/wiggle-1.1/demo.patched/vpatch.c:330: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(hdr, " XX");
data/wiggle-1.1/demo.patched/vpatch.c:331: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.
	else sprintf(hdr+5, " %02d ", pl->conflicts);
data/wiggle-1.1/demo.patched/vpatch.c:333: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(hdr+9, "= ");
data/wiggle-1.1/demo.patched/vpatch.c:334:15:  [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).
	else if (pl->open)
data/wiggle-1.1/demo.patched/vpatch.c:335: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(hdr+9, "+ ");
data/wiggle-1.1/demo.patched/vpatch.c:336: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.
	else strcpy(hdr+9, "- ");
data/wiggle-1.1/demo.patched/vpatch.c:357: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[100];
data/wiggle-1.1/demo.patched/vpatch.c:363: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, "Chunk count: %d\n", ch);
data/wiggle-1.1/demo.patched/vpatch.c:608:30:  [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).
				pl[pos].open = ! pl[pos].open;
data/wiggle-1.1/demo.patched/vpatch.c:631: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).
		f = fopen(argv[argc-1], "w+");
data/wiggle-1.1/demo.patched/vpatch.c:633:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		in = fopen(argv[1], "r");
data/wiggle-1.1/demo.patched/wiggle.c:580:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(orignew, ".porig");
data/wiggle-1.1/demo.patched/wiggle.c:581:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if (open(orignew, O_RDONLY) >= 0 ||
data/wiggle-1.1/demo.patched/wiggle.c:587:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(replacename,"XXXXXX");
data/wiggle-1.1/demo.patched/wiggle.c:588:9:  [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(replacename);
data/wiggle-1.1/demo/md.c:524: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:646: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 b[BDEVNAME_SIZE], b2[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:787: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(mddev->uuid+0, &sb->set_uuid0, 4);
data/wiggle-1.1/demo/md.c:788: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(mddev->uuid+4, &sb->set_uuid1, 4);
data/wiggle-1.1/demo/md.c:789: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(mddev->uuid+8, &sb->set_uuid2, 4);
data/wiggle-1.1/demo/md.c:790: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(mddev->uuid+12,&sb->set_uuid3, 4);
data/wiggle-1.1/demo/md.c:874: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(&sb->set_uuid0, mddev->uuid+0, 4);
data/wiggle-1.1/demo/md.c:875: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(&sb->set_uuid1, mddev->uuid+4, 4);
data/wiggle-1.1/demo/md.c:876: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(&sb->set_uuid2, mddev->uuid+8, 4);
data/wiggle-1.1/demo/md.c:877: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(&sb->set_uuid3, mddev->uuid+12,4);
data/wiggle-1.1/demo/md.c:1004: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 b[BDEVNAME_SIZE], b2[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1134: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(mddev->uuid, sb->set_uuid, 16);
data/wiggle-1.1/demo/md.c:1325: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 b[BDEVNAME_SIZE], b2[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1388: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1410: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1443: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1523: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1540: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1665: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:1795: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(page, page_address(rdev->sb_page), rdev->sb_size);
data/wiggle-1.1/demo/md.c:1805:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%d\n", atomic_read(&rdev->corrected_errors));
data/wiggle-1.1/demo/md.c:1826:10:  [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.
		return sprintf(page, "none\n");
data/wiggle-1.1/demo/md.c:1828:10:  [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.
		return sprintf(page, "%d\n", rdev->raid_disk);
data/wiggle-1.1/demo/md.c:1859:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%llu\n", (unsigned long long)rdev->data_offset);
data/wiggle-1.1/demo/md.c:1881:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%llu\n", (unsigned long long)rdev->size);
data/wiggle-1.1/demo/md.c:1963: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:2042: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:2097:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%d.%03d\n", msec/1000, msec%1000);
data/wiggle-1.1/demo/md.c:2106: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[30];
data/wiggle-1.1/demo/md.c:2150:10:  [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.
		return sprintf(page, "%d\n", mddev->level);
data/wiggle-1.1/demo/md.c:2181:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%d\n", mddev->layout);
data/wiggle-1.1/demo/md.c:2207:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%d\n", mddev->raid_disks);
data/wiggle-1.1/demo/md.c:2235:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%d\n", mddev->chunk_size);
data/wiggle-1.1/demo/md.c:2259:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%llu\n", (unsigned long long)mddev->recovery_cp);
data/wiggle-1.1/demo/md.c:2520:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%llu\n", (unsigned long long)mddev->size);
data/wiggle-1.1/demo/md.c:2566:10:  [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.
		return sprintf(page, "%d.%d\n",
data/wiggle-1.1/demo/md.c:2569:10:  [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.
		return sprintf(page, "external\n");
data/wiggle-1.1/demo/md.c:2571:10:  [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.
		return sprintf(page, "none\n");
data/wiggle-1.1/demo/md.c:2678:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%llu\n",
data/wiggle-1.1/demo/md.c:2749:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%ld\n", db/dt/2); /* K/sec */
data/wiggle-1.1/demo/md.c:2765:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%lu / %lu\n", resync, max_blocks);
data/wiggle-1.1/demo/md.c:2774:10:  [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.
		return sprintf(page, "max\n");
data/wiggle-1.1/demo/md.c:2776:10:  [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.
		return sprintf(page, "%llu\n",
data/wiggle-1.1/demo/md.c:2810:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%llu\n", (unsigned long long)mddev->suspend_lo);
data/wiggle-1.1/demo/md.c:2838:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(page, "%llu\n", (unsigned long long)mddev->suspend_hi);
data/wiggle-1.1/demo/md.c:2978: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(disk->disk_name, "md_d%d", unit);
data/wiggle-1.1/demo/md.c:2979: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(disk->devfs_name, "md/d%d", unit);
data/wiggle-1.1/demo/md.c:2981: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(disk->disk_name, "md%d", unit);
data/wiggle-1.1/demo/md.c:2982: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(disk->devfs_name, "md/%d", unit);
data/wiggle-1.1/demo/md.c:3016: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:3156:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char nm[20];
data/wiggle-1.1/demo/md.c:3157:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(nm, "rd%d", rdev->raid_disk);
data/wiggle-1.1/demo/md.c:3356: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 nm[20];
data/wiggle-1.1/demo/md.c:3357: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(nm, "rd%d", rdev->raid_disk);
data/wiggle-1.1/demo/md.c:3394: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:3423: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:3500: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:3697: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 b[BDEVNAME_SIZE], b2[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:3847: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:3873: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:4680: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 b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:4873:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char b[BDEVNAME_SIZE];
data/wiggle-1.1/demo/md.c:5517: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 nm[20];
data/wiggle-1.1/demo/md.c:5518: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(nm,"rd%d", rdev->raid_disk);
data/wiggle-1.1/demo/md.c:5530: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 nm[20];
data/wiggle-1.1/demo/md.c:5531: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(nm, "rd%d", rdev->raid_disk);
data/wiggle-1.1/demo/md.c:5740:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	return sprintf(buffer, "%d", start_readonly);
data/wiggle-1.1/demo/vpatch.c:42:6:  [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 open;
data/wiggle-1.1/demo/vpatch.c:99: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 name[1024];
data/wiggle-1.1/demo/vpatch.c:249: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 curr[1024];
data/wiggle-1.1/demo/vpatch.c:292:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	while (pl[pos].open &&
data/wiggle-1.1/demo/vpatch.c:301: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).
	if (pl[pos].open) {
data/wiggle-1.1/demo/vpatch.c:316: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 hdr[10];
data/wiggle-1.1/demo/vpatch.c:325: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(hdr, "XX");
data/wiggle-1.1/demo/vpatch.c:326: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.
	else sprintf(hdr, "%02d", pl->chunks);
data/wiggle-1.1/demo/vpatch.c:328: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(hdr, " XX");
data/wiggle-1.1/demo/vpatch.c:329: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.
	else sprintf(hdr+2, " %02d", pl->wiggles);
data/wiggle-1.1/demo/vpatch.c:331: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(hdr, " XX");
data/wiggle-1.1/demo/vpatch.c:332: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.
	else sprintf(hdr+5, " %02d ", pl->conflicts);
data/wiggle-1.1/demo/vpatch.c:334: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(hdr+9, "= ");
data/wiggle-1.1/demo/vpatch.c:335:15:  [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).
	else if (pl->open)
data/wiggle-1.1/demo/vpatch.c:336: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(hdr+9, "+ ");
data/wiggle-1.1/demo/vpatch.c:337: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.
	else strcpy(hdr+9, "- ");
data/wiggle-1.1/demo/vpatch.c:358: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[100];
data/wiggle-1.1/demo/vpatch.c:364: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, "Chunk count: %d\n", ch);
data/wiggle-1.1/demo/vpatch.c:609:30:  [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).
				pl[pos].open = ! pl[pos].open;
data/wiggle-1.1/demo/vpatch.c:632: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).
		f = fopen(argv[argc-1], "w+");
data/wiggle-1.1/demo/vpatch.c:634:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		in = fopen(argv[1], "r");
data/wiggle-1.1/demo/wiggle.c:580:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(orignew, ".porig");
data/wiggle-1.1/demo/wiggle.c:581:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if (open(orignew, O_RDONLY) >= 0 ||
data/wiggle-1.1/demo/wiggle.c:587:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(replacename,"XXXXXX");
data/wiggle-1.1/demo/wiggle.c:588:9:  [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(replacename);
data/wiggle-1.1/extract.c:68: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 before[100], after[100];
data/wiggle-1.1/extract.c:69: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 func[100];
data/wiggle-1.1/extract.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 buf[(3*12)+1];
data/wiggle-1.1/extract.c:129:12:  [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.
				slen = sprintf(buf+1, "%5d %5d %5d", chunks, a, acnt)+1;
data/wiggle-1.1/extract.c:130: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(r1.body+r1.len, buf, slen);
data/wiggle-1.1/extract.c:149: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[(3*12)+2];
data/wiggle-1.1/extract.c:151:12:  [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.
				slen = sprintf(buf+1, "%5d %5d %5d\n", chunks, c, bcnt)+2;
data/wiggle-1.1/extract.c:152:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(r2.body+r2.len, buf, slen);
data/wiggle-1.1/load.c:63: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, list[i].body, list[i].len);
data/wiggle-1.1/load.c:135:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		FILE *f = fopen(name + prefix_len, "r");
data/wiggle-1.1/load.c:147:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			fd = open(name, O_RDONLY);
data/wiggle-1.1/merge2.c:863: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(replacename, "XXXXXX");
data/wiggle-1.1/merge2.c:865: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(orignew, ".porig");
data/wiggle-1.1/merge2.c:867: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(replacename);
data/wiggle-1.1/parse.c:44:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd  = open(file, O_RDONLY);
data/wiggle-1.1/parse.c:212: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 curr[1024];
data/wiggle-1.1/parse.c:267: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 name[1024];
data/wiggle-1.1/split.c:115: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).
				list->hash = atoi(start+1);
data/wiggle-1.1/vpatch.c:1052: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 b[100];
data/wiggle-1.1/vpatch.c:1270: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 linebuf[20];
data/wiggle-1.1/vpatch.c:1290: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(r, a, len);
data/wiggle-1.1/vpatch.c:1349: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 search[80];  /* string we are searching for */
data/wiggle-1.1/vpatch.c:1652:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[100];
data/wiggle-1.1/vpatch.c:1683:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[12+1];
data/wiggle-1.1/vpatch.c:2436:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		while (pl[pos].open &&
data/wiggle-1.1/vpatch.c:2459:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (pl[pos].open) {
data/wiggle-1.1/vpatch.c:2490: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 hdr[2*12];
data/wiggle-1.1/vpatch.c:2502: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(hdr, "         ");
data/wiggle-1.1/vpatch.c:2505:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(hdr, "XX");
data/wiggle-1.1/vpatch.c:2507:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(hdr, "%2d", pl->chunks);
data/wiggle-1.1/vpatch.c:2509:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(hdr+2, " XX");
data/wiggle-1.1/vpatch.c:2511:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(hdr+2, " %2d", pl->wiggles);
data/wiggle-1.1/vpatch.c:2513:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(hdr+5, " XX ");
data/wiggle-1.1/vpatch.c:2515:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(hdr+5, " %2d ", pl->conflicts);
data/wiggle-1.1/vpatch.c:2518: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(hdr+9, "= ");
data/wiggle-1.1/vpatch.c:2519:15:  [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).
	else if (pl->open)
data/wiggle-1.1/vpatch.c:2520: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(hdr+9, "+ ");
data/wiggle-1.1/vpatch.c:2522: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(hdr+9, "- ");
data/wiggle-1.1/vpatch.c:2606: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 saveall_buf[200];
data/wiggle-1.1/vpatch.c:2651: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 mesg_buf[1024];
data/wiggle-1.1/vpatch.c:2731:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char bb[30];
data/wiggle-1.1/vpatch.c:2732:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(bb, "last-key = 0%o", c);
data/wiggle-1.1/vpatch.c:2784:29:  [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).
				pl[pos].open = !pl[pos].open;
data/wiggle-1.1/vpatch.c:2786:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				if (pl[pos].open)
data/wiggle-1.1/vpatch.c:2908:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				strcat(orignew, ".porig");
data/wiggle-1.1/vpatch.c:3056:8:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			f = tmpfile();
data/wiggle-1.1/vpatch.c:3080: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).
		f = fopen(argv[0], "r");
data/wiggle-1.1/vpatch.c:3114: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).
		f = fopen(argv[1], "r");
data/wiggle-1.1/wiggle.c:528: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).
		outfile = fopen(outfilename, "w");
data/wiggle-1.1/wiggle.c:540:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(orignew, ".porig");
data/wiggle-1.1/wiggle.c:541: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).
		if (open(orignew, O_RDONLY) >= 0 ||
data/wiggle-1.1/wiggle.c:548:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(replacename, "XXXXXX");
data/wiggle-1.1/wiggle.c:549:8:  [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(replacename);
data/wiggle-1.1/wiggle.c:634:6:  [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(filename, "r");
data/wiggle-1.1/wiggle.c:649: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 *av[2];
data/wiggle-1.1/wiggle.c:784:13:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				strip = atol(optarg);
data/wiggle-1.1/wiggle.h:137:6:  [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 open;
data/wiggle-1.1/demo.orig/vpatch.c:100:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c=fgetc(f)) != EOF ) {
data/wiggle-1.1/demo.orig/vpatch.c:111:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c=fgetc(f)) != EOF && c != '\t' && c != '\n' && c != ' ' &&
data/wiggle-1.1/demo.orig/vpatch.c:120:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (c != '\n' && (c=fgetc(f)) != EOF) {
data/wiggle-1.1/demo.orig/vpatch.c:130:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c=fgetc(f)) != EOF) {
data/wiggle-1.1/demo.orig/vpatch.c:199: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 (c) al = c-a; else al = strlen(a);
data/wiggle-1.1/demo.orig/vpatch.c:201: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 (c) bl = c-b; else bl = strlen(b);
data/wiggle-1.1/demo.orig/vpatch.c:223: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 (c) l = c-file; else l = strlen(file);
data/wiggle-1.1/demo.orig/wiggle.c:574: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).
			replacename = malloc(strlen(argv[optind])+ 20);
data/wiggle-1.1/demo.orig/wiggle.c:576: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).
			orignew = malloc(strlen(argv[optind])+20);
data/wiggle-1.1/demo.patched/vpatch.c:101:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c=fgetc(f)) != EOF ) {
data/wiggle-1.1/demo.patched/vpatch.c:112:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c=fgetc(f)) != EOF && c != '\t' && c != '\n' && c != ' ' &&
data/wiggle-1.1/demo.patched/vpatch.c:121:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (c != '\n' && (c=fgetc(f)) != EOF) {
data/wiggle-1.1/demo.patched/vpatch.c:131:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c=fgetc(f)) != EOF) {
data/wiggle-1.1/demo.patched/vpatch.c:200: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 (c) al = c-a; else al = strlen(a);
data/wiggle-1.1/demo.patched/vpatch.c:202: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 (c) bl = c-b; else bl = strlen(b);
data/wiggle-1.1/demo.patched/vpatch.c:224: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 (c) l = c-file; else l = strlen(file);
data/wiggle-1.1/demo.patched/wiggle.c:574: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).
			replacename = malloc(strlen(argv[optind])+ 20);
data/wiggle-1.1/demo.patched/wiggle.c:576: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).
			orignew = malloc(strlen(argv[optind])+20);
data/wiggle-1.1/demo/md.c:1753:13:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	return len+sprintf(page+len, "\n");
data/wiggle-1.1/demo/md.c:2165:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(mddev->clevel, buf, len);
data/wiggle-1.1/demo/vpatch.c:102:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c=fgetc(f)) != EOF ) {
data/wiggle-1.1/demo/vpatch.c:113:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c=fgetc(f)) != EOF && c != '\t' && c != '\n' && c != ' ' &&
data/wiggle-1.1/demo/vpatch.c:122:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (c != '\n' && (c=fgetc(f)) != EOF) {
data/wiggle-1.1/demo/vpatch.c:132:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c=fgetc(f)) != EOF) {
data/wiggle-1.1/demo/vpatch.c:201: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 (c) al = c-a; else al = strlen(a);
data/wiggle-1.1/demo/vpatch.c:203: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 (c) bl = c-b; else bl = strlen(b);
data/wiggle-1.1/demo/vpatch.c:225: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 (c) l = c-file; else l = strlen(file);
data/wiggle-1.1/demo/wiggle.c:574: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).
			replacename = malloc(strlen(argv[optind])+ 20);
data/wiggle-1.1/demo/wiggle.c:576: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).
			orignew = malloc(strlen(argv[optind])+20);
data/wiggle-1.1/diff.c:659: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).
		lst->len = strlen(argv[arg]);
data/wiggle-1.1/diff.c:674: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).
		lst->len = strlen(argv[arg]);
data/wiggle-1.1/extract.c:90: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.
			if (sscanf(cp, "@@ -%99s +%99s @@%99[^\n]", before, after, func) >= 2) {
data/wiggle-1.1/extract.c:138: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).
					r1.len += strlen(f);
data/wiggle-1.1/load.c:79:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, s.body, s.len) != s.len)
data/wiggle-1.1/load.c:94:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		list[i].len = read(fd, list[i].body, 8192);
data/wiggle-1.1/merge2.c:856: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).
	char *replacename = xmalloc(strlen(file) + 20);
data/wiggle-1.1/merge2.c:857: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 *orignew = xmalloc(strlen(file) + 20);
data/wiggle-1.1/merge2.c:912: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).
		suffix = strlen(base)+1;
data/wiggle-1.1/parse.c:84: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).
		memmove(pl[i].file, p, strlen(p)+1);
data/wiggle-1.1/parse.c:109: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).
			al = strlen(a);
data/wiggle-1.1/parse.c:114: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).
			bl = strlen(b);
data/wiggle-1.1/parse.c:137: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).
		memmove(file, file+1, strlen(file));
data/wiggle-1.1/parse.c:185: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).
			l = strlen(file);
data/wiggle-1.1/parse.c:270:23:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c = fgetc(f)) != EOF) {
data/wiggle-1.1/parse.c:283:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = fgetc(f)) != EOF
data/wiggle-1.1/parse.c:295:28:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (c != '\n' && (c = fgetc(f)) != EOF)
data/wiggle-1.1/parse.c:307:23:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (*pos && (c = fgetc(f)) != EOF) {
data/wiggle-1.1/split.c:72: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).
			cp += strlen(cp) + 1;
data/wiggle-1.1/vpatch.c:805:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int len = strlen(search);
data/wiggle-1.1/vpatch.c:1062: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).
		col += strlen(b);
data/wiggle-1.1/vpatch.c:1669: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).
			mvaddstr(0, cols - strlen(buf) - 1, buf);
data/wiggle-1.1/vpatch.c:2725: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).
			last_mesg_len = strlen(mesg);
data/wiggle-1.1/vpatch.c:2734: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).
			last_mesg_len = strlen(bb);
data/wiggle-1.1/vpatch.c:2906: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).
				char *orignew = xmalloc(strlen(file) + 20);
data/wiggle-1.1/vpatch.c:3094: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).
		} else if (strlen(argv[0]) > 4 &&
data/wiggle-1.1/vpatch.c:3095: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).
			 strcmp(argv[0]+strlen(argv[0])-4, ".rej") == 0) {
data/wiggle-1.1/vpatch.c:3097: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).
			origname[strlen(origname) - 4] = '\0';
data/wiggle-1.1/wiggle.c:120: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).
		write(2, msg, strlen(msg));
data/wiggle-1.1/wiggle.c:536: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).
		replacename = xmalloc(strlen(argv[0]) + 20);
data/wiggle-1.1/wiggle.c:537: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).
		orignew = xmalloc(strlen(argv[0]) + 20);

ANALYSIS SUMMARY:

Hits = 300
Lines analyzed = 19120 in approximately 0.58 seconds (33138 lines/second)
Physical Source Lines of Code (SLOC) = 14454
Hits@level = [0] 313 [1]  60 [2] 204 [3]  11 [4]  25 [5]   0
Hits@level+ = [0+] 613 [1+] 300 [2+] 240 [3+]  36 [4+]  25 [5+]   0
Hits/KSLOC@level+ = [0+] 42.4104 [1+] 20.7555 [2+] 16.6044 [3+] 2.49066 [4+] 1.72963 [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.