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/dwdiff-2.1.3/src/optionMacros.h
Examining data/dwdiff-2.1.3/src/stream.c
Examining data/dwdiff-2.1.3/src/util.c
Examining data/dwdiff-2.1.3/src/option.h
Examining data/dwdiff-2.1.3/src/util.h
Examining data/dwdiff-2.1.3/src/tempfile.h
Examining data/dwdiff-2.1.3/src/dwfilter.c
Examining data/dwdiff-2.1.3/src/unicode.h
Examining data/dwdiff-2.1.3/src/diff/analyze.c
Examining data/dwdiff-2.1.3/src/diff/diffseq.h
Examining data/dwdiff-2.1.3/src/diff/diff.h
Examining data/dwdiff-2.1.3/src/tempfile.c
Examining data/dwdiff-2.1.3/src/stream.h
Examining data/dwdiff-2.1.3/src/definitions.h
Examining data/dwdiff-2.1.3/src/file.c
Examining data/dwdiff-2.1.3/src/buffer.c
Examining data/dwdiff-2.1.3/src/hashtable.c
Examining data/dwdiff-2.1.3/src/doDiff.c
Examining data/dwdiff-2.1.3/src/unicode.c
Examining data/dwdiff-2.1.3/src/buffer.h
Examining data/dwdiff-2.1.3/src/option.c
Examining data/dwdiff-2.1.3/src/profile.h
Examining data/dwdiff-2.1.3/src/optionDescriptions.h
Examining data/dwdiff-2.1.3/src/file.h
Examining data/dwdiff-2.1.3/src/dispatch.h
Examining data/dwdiff-2.1.3/src/profile.c
Examining data/dwdiff-2.1.3/src/dwdiff.c
Examining data/dwdiff-2.1.3/src/vector.h
Examining data/dwdiff-2.1.3/src/static_assert.h
Examining data/dwdiff-2.1.3/src/hashtable.h
Examining data/dwdiff-2.1.3/src/dispatch_autogen.h

FINAL RESULTS:

data/dwdiff-2.1.3/src/buffer.c:166:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf(LINENUMBERS_FMT_ARGS);
data/dwdiff-2.1.3/src/buffer.c:181:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			printed = snprintf(contextBuffers[bufferIndex].data + contextBuffers[bufferIndex].used, allowed, LINENUMBERS_FMT_ARGS);
data/dwdiff-2.1.3/src/buffer.c:187:15:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
				printed = snprintf(contextBuffers[bufferIndex].data + contextBuffers[bufferIndex].used, allowed, LINENUMBERS_FMT_ARGS);
data/dwdiff-2.1.3/src/buffer.c:196:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			printf(LINENUMBERS_FMT_ARGS);
data/dwdiff-2.1.3/src/dwfilter.c:150:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(tempfile, TEMPLATE);
data/dwdiff-2.1.3/src/dwfilter.c:161:3:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execvp(args[0], args);
data/dwdiff-2.1.3/src/dwfilter.c:195:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(outputArg, OUTPUT_OPTION "%s", tempfile);
data/dwdiff-2.1.3/src/profile.c:72: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(pathname, dir);
data/dwdiff-2.1.3/src/profile.c:74:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(pathname, name);
data/dwdiff-2.1.3/src/tempfile.c:54: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(files[openIndex].name, TEMPLATE);
data/dwdiff-2.1.3/src/util.c:31: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, fmt, args);
data/dwdiff-2.1.3/src/util.c:51:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	return strcpy(result, orig);
data/dwdiff-2.1.3/src/util.h:19:57:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void fatal(const char *fmt, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));
data/dwdiff-2.1.3/src/profile.c:60:21:  [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.
		const char *env = getenv("HOME");
data/dwdiff-2.1.3/src/buffer.c:223:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(contextBuffers[bufferIndex].data + contextBuffers[bufferIndex].used, string, bytes);
data/dwdiff-2.1.3/src/diff/analyze.c:58: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 *discarded[2];
data/dwdiff-2.1.3/src/dispatch.h:61:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	FPTR void (*addCharactersDT)(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]);
data/dwdiff-2.1.3/src/dispatch.h:61:81:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	FPTR void (*addCharactersDT)(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]);
data/dwdiff-2.1.3/src/dispatch_autogen.h:40:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void  addCharactersSC(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]);
data/dwdiff-2.1.3/src/dispatch_autogen.h:40:73:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void  addCharactersSC(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]);
data/dwdiff-2.1.3/src/dispatch_autogen.h:51:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void  addCharactersUTF8(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]);
data/dwdiff-2.1.3/src/dispatch_autogen.h:51:75:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void  addCharactersUTF8(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]);
data/dwdiff-2.1.3/src/doDiff.c:59:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char encoded[4];
data/dwdiff-2.1.3/src/doDiff.c:516: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 encoded[4];
data/dwdiff-2.1.3/src/doDiff.c:560: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(edgeArray + 1, dataBase, context * sizeof(ValueType));
data/dwdiff-2.1.3/src/doDiff.c:568: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(edgeArray, dataBase + dataRange - context, context * sizeof(ValueType));
data/dwdiff-2.1.3/src/dwdiff.c:146: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 utf8char[4];
data/dwdiff-2.1.3/src/dwdiff.c:152: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(currentWord.data + currentWord.used, &utf8char, bytes);
data/dwdiff-2.1.3/src/dwdiff.c:186: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 utf8char[4];
data/dwdiff-2.1.3/src/dwdiff.c:194: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(whitespaceBuffer.data + whitespaceBuffer.used, utf8char, bytes);
data/dwdiff-2.1.3/src/dwfilter.c:136: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 tempfile[TEMPLATE_LENGTH];
data/dwdiff-2.1.3/src/dwfilter.c:151:12:  [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).
	if ((fd = mkstemp(tempfile)) < 0)
data/dwdiff-2.1.3/src/file.c:72:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(name, openMode, 0600)) < 0)
data/dwdiff-2.1.3/src/file.c:217: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(file->buffer + file->bufferFill, buffer, minLength);
data/dwdiff-2.1.3/src/file.h:50:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[FILE_BUFFER_SIZE];
data/dwdiff-2.1.3/src/hashtable.c:39:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char string[1];
data/dwdiff-2.1.3/src/hashtable.c:138: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(tuple->string, data, size);
data/dwdiff-2.1.3/src/option.c:253:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void addCharactersSC(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]) {
data/dwdiff-2.1.3/src/option.c:253:72:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void addCharactersSC(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]) {
data/dwdiff-2.1.3/src/option.c:314:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void addCharactersUTF8(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]) {
data/dwdiff-2.1.3/src/option.c:314:74:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void addCharactersUTF8(const char *chars, size_t length, CHARLIST *list, char bitmap[BITMASK_SIZE]) {
data/dwdiff-2.1.3/src/option.c:341: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(tmp.data, cluster.UTF8Char.converted.data, cluster.UTF8Char.converted.used * sizeof(UChar));
data/dwdiff-2.1.3/src/option.c:407: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 sequenceBuffer[SEQUENCE_BUFFER_LEN];
data/dwdiff-2.1.3/src/option.c:732:25:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((option.output = fopen(optArg, "r+")) == NULL)
data/dwdiff-2.1.3/src/option.h:36:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char delimiters[BITMASK_SIZE],
data/dwdiff-2.1.3/src/profile.c:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[4096];
data/dwdiff-2.1.3/src/profile.c:76:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((file = fopen(pathname, "r")) == NULL) {
data/dwdiff-2.1.3/src/profile.c:127: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(new_option->arg + 2, first, space - first);
data/dwdiff-2.1.3/src/profile.c:140:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(new_option->arg + arg_len, first, len);
data/dwdiff-2.1.3/src/profile.c:173:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char *argv[3];
data/dwdiff-2.1.3/src/tempfile.c:40:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(files[openIndex].name, "dwdiffTemp");
data/dwdiff-2.1.3/src/tempfile.c:41: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(files[openIndex].name + strlen(files[openIndex].name), "%d", openIndex);
data/dwdiff-2.1.3/src/tempfile.c:55:12:  [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).
	if ((fd = mkstemp(files[openIndex].name)) < 0)
data/dwdiff-2.1.3/src/tempfile.h:25:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[TEMPLATE_LENGTH];
data/dwdiff-2.1.3/src/unicode.c:221: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 encoded[4];
data/dwdiff-2.1.3/src/unicode.c:270: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 clusterContinuationTable[MAX_GCB_CLASS][MAX_GCB_CLASS] = {
data/dwdiff-2.1.3/src/unicode.c:287: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 backspaceContinuationTable[MAX_GCB_CLASS][MAX_GCB_CLASS] = {
data/dwdiff-2.1.3/src/unicode.c:325:69:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static bool getClusterInternal(Stream *stream, UTF16Buffer *buffer, char continuationTable[MAX_GCB_CLASS][MAX_GCB_CLASS]) {
data/dwdiff-2.1.3/src/dwdiff.c:539: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).
		for (i = strlen(lc_ctype) - 1; i >= 0; i--)
data/dwdiff-2.1.3/src/dwfilter.c:146:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(~S_IRWXU);
data/dwdiff-2.1.3/src/dwfilter.c:191: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).
	outputArg = safe_malloc(strlen(tempfile) + sizeof(OUTPUT_OPTION) + 1);
data/dwdiff-2.1.3/src/file.c:94:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t retval = read(file->fd, file->buffer + bytesRead, FILE_BUFFER_SIZE - bytesRead);
data/dwdiff-2.1.3/src/file.c:237:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	length = strlen(string);
data/dwdiff-2.1.3/src/option.c:82:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t maxReadPosition = strlen(string);
data/dwdiff-2.1.3/src/option.c:416: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).
		memmove(color, color + 2, strlen(color) + 1);
data/dwdiff-2.1.3/src/option.c:479:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	option.paraDelimMarkerLength = strlen(option.paraDelimMarker);
data/dwdiff-2.1.3/src/option.c:697: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).
				option.delColorLen = strlen(option.delColor);
data/dwdiff-2.1.3/src/option.c:698: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).
				option.addColorLen = strlen(option.addColor);
data/dwdiff-2.1.3/src/optionMacros.h:119:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					optlength = strlen(optcurrent); \
data/dwdiff-2.1.3/src/optionMacros.h:207:121:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define OPTION(shortName, longName, argReq) if ((opttype == SHORT && optcurrent[1] == shortName) || (opttype == LONG && strlen(longName) == optlength - 2 && strncmp(optcurrent + 2, longName, optlength - 2) == 0)) { CHECK_ARG(argReq) {
data/dwdiff-2.1.3/src/optionMacros.h:214:62:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define LONG_OPTION(longName, argReq) if (opttype == LONG && strlen(longName) == optlength - 2 && strncmp(optcurrent + 2, longName, optlength - 2) == 0) { CHECK_ARG(argReq) {
data/dwdiff-2.1.3/src/profile.c:61:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (env == NULL || strlen(env) == 0) {
data/dwdiff-2.1.3/src/profile.c:70: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).
	if ((pathname = malloc(strlen(dir) + 1 + strlen(name) + 1)) == NULL)
data/dwdiff-2.1.3/src/profile.c:70:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((pathname = malloc(strlen(dir) + 1 + strlen(name) + 1)) == NULL)
data/dwdiff-2.1.3/src/profile.c:73:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(pathname, "/");
data/dwdiff-2.1.3/src/profile.c:88: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).
		stripSpaces(line, strlen(line), &first, &len);
data/dwdiff-2.1.3/src/tempfile.c:41:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(files[openIndex].name + strlen(files[openIndex].name), "%d", openIndex);
data/dwdiff-2.1.3/src/tempfile.c:48:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(~S_IRWXU);
data/dwdiff-2.1.3/src/util.c:49: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).
	if ((result = malloc(strlen(orig) * sizeof(char))) == NULL)

ANALYSIS SUMMARY:

Hits = 79
Lines analyzed = 6318 in approximately 0.22 seconds (29299 lines/second)
Physical Source Lines of Code (SLOC) = 4075
Hits@level = [0]  14 [1]  21 [2]  44 [3]   1 [4]  13 [5]   0
Hits@level+ = [0+]  93 [1+]  79 [2+]  58 [3+]  14 [4+]  13 [5+]   0
Hits/KSLOC@level+ = [0+] 22.8221 [1+] 19.3865 [2+] 14.2331 [3+] 3.43558 [4+] 3.19018 [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.