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/nordlicht-0.4.5/src/cheat.h
Examining data/nordlicht-0.4.5/src/error.c
Examining data/nordlicht-0.4.5/src/error.h
Examining data/nordlicht-0.4.5/src/image.c
Examining data/nordlicht-0.4.5/src/image.h
Examining data/nordlicht-0.4.5/src/main.c
Examining data/nordlicht-0.4.5/src/nordlicht.c
Examining data/nordlicht-0.4.5/src/nordlicht.h
Examining data/nordlicht-0.4.5/src/source.c
Examining data/nordlicht-0.4.5/src/source.h
Examining data/nordlicht-0.4.5/src/testsuite.c

FINAL RESULTS:

data/nordlicht-0.4.5/src/cheat.h:299:10:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		(void )fprintf(stderr, \
data/nordlicht-0.4.5/src/cheat.h:646:11:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	result = vsprintf(destination, format, list);
data/nordlicht-0.4.5/src/cheat.h:667:11:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	result = vfprintf(stream, format, list);
data/nordlicht-0.4.5/src/cheat.h:2961:18:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	return (size_t )vsnprintf(NULL, 0, format, another_list);
data/nordlicht-0.4.5/src/cheat.h:2968:25:  [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.
static int CHEAT_UNWRAP(vfprintf)(FILE* const stream,
data/nordlicht-0.4.5/src/cheat.h:2971:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	return vfprintf(stream, format, list);
data/nordlicht-0.4.5/src/cheat.h:2975:23:  [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.
static int CHEAT_WRAP(vfprintf)(FILE* const stream,
data/nordlicht-0.4.5/src/cheat.h:2993:13:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
			result = vsprintf(buffer, format, list);
data/nordlicht-0.4.5/src/cheat.h:3012:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	return vfprintf(stream, format, list);
data/nordlicht-0.4.5/src/cheat.h:3015:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define vfprintf CHEAT_WRAP(vfprintf)
data/nordlicht-0.4.5/src/cheat.h:3015:29:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define vfprintf CHEAT_WRAP(vfprintf)
data/nordlicht-0.4.5/src/cheat.h:3018:25:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static int CHEAT_UNWRAP(vprintf)(char const* const format,
data/nordlicht-0.4.5/src/cheat.h:3020:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	return vprintf(format, list);
data/nordlicht-0.4.5/src/cheat.h:3024:23:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static int CHEAT_WRAP(vprintf)(char const* const format,
data/nordlicht-0.4.5/src/cheat.h:3026:20:  [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.
	return CHEAT_WRAP(vfprintf)(stdout, format, list);
data/nordlicht-0.4.5/src/cheat.h:3029:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define vprintf CHEAT_WRAP(vprintf)
data/nordlicht-0.4.5/src/cheat.h:3029:28:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define vprintf CHEAT_WRAP(vprintf)
data/nordlicht-0.4.5/src/cheat.h:3032:25:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static int CHEAT_UNWRAP(fprintf)(FILE* const stream,
data/nordlicht-0.4.5/src/cheat.h:3038:24:  [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.
	result = CHEAT_UNWRAP(vfprintf)(stream, format, list);
data/nordlicht-0.4.5/src/cheat.h:3044:23:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static int CHEAT_WRAP(fprintf)(FILE* const stream,
data/nordlicht-0.4.5/src/cheat.h:3050:22:  [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.
	result = CHEAT_WRAP(vfprintf)(stream, format, list);
data/nordlicht-0.4.5/src/cheat.h:3055:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define fprintf CHEAT_WRAP(fprintf)
data/nordlicht-0.4.5/src/cheat.h:3055:28:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define fprintf CHEAT_WRAP(fprintf)
data/nordlicht-0.4.5/src/cheat.h:3058:25:  [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.
static int CHEAT_UNWRAP(printf)(char const* const format, ...) {
data/nordlicht-0.4.5/src/cheat.h:3063:24:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	result = CHEAT_UNWRAP(vprintf)(format, list);
data/nordlicht-0.4.5/src/cheat.h:3069:23:  [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.
static int CHEAT_WRAP(printf)(char const* const format, ...) {
data/nordlicht-0.4.5/src/cheat.h:3074:22:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	result = CHEAT_WRAP(vprintf)(format, list);
data/nordlicht-0.4.5/src/cheat.h:3079:9:  [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.
#define printf CHEAT_WRAP(printf)
data/nordlicht-0.4.5/src/cheat.h:3079:27:  [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.
#define printf CHEAT_WRAP(printf)
data/nordlicht-0.4.5/src/cheat.h:3092:22:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	result = CHEAT_WRAP(fprintf)(stream, "%s", message);
data/nordlicht-0.4.5/src/cheat.h:3113:22:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	result = CHEAT_WRAP(fprintf)(stream, "%c", character);
data/nordlicht-0.4.5/src/cheat.h:3241:14:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		CHEAT_WRAP(fprintf)(stderr, "%s: %s\n", message, strerror(errno));
data/nordlicht-0.4.5/src/cheat.h:3243:14:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		CHEAT_WRAP(fprintf)(stderr, "%s: Failure\n", message);
data/nordlicht-0.4.5/src/error.c:16:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(error_message, 1000, message, arglist);
data/nordlicht-0.4.5/src/main.c:49:5:  [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, message, arglist);
data/nordlicht-0.4.5/src/testsuite.c:7:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define access _access
data/nordlicht-0.4.5/src/testsuite.c:21:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        return system(c);
data/nordlicht-0.4.5/src/testsuite.c:36:24:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    cheat_assert(-1 != access("video.mp4", F_OK));
data/nordlicht-0.4.5/src/testsuite.c:200:24:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    cheat_assert(-1 != access("video.mp4.nordlicht.png", F_OK));
data/nordlicht-0.4.5/src/testsuite.c:202:24:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    cheat_assert(-1 != access("ünîç⌀də.png", F_OK));
data/nordlicht-0.4.5/src/cheat.h:1903:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (!CreateProcess(NULL, command, NULL, NULL,
data/nordlicht-0.4.5/src/cheat.h:1903:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (!CreateProcess(NULL, command, NULL, NULL,
data/nordlicht-0.4.5/src/nordlicht.c:7:9:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
data/nordlicht-0.4.5/src/nordlicht.c:329:29:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    char *realpath_output = realpath(filename, NULL);
data/nordlicht-0.4.5/src/nordlicht.c:332:32:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
        char *realpath_input = realpath(n->filename, NULL);
data/nordlicht-0.4.5/src/cheat.h:574: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(result, literal, paste_length);
data/nordlicht-0.4.5/src/cheat.h:575: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(&result[paste_length], marker, marker_length + 1);
data/nordlicht-0.4.5/src/cheat.h:581: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(result, literal, literal_length + 1);
data/nordlicht-0.4.5/src/cheat.h:929: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(elements, buffer, size);
data/nordlicht-0.4.5/src/cheat.h:1789: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 buffer[BUFSIZ];
data/nordlicht-0.4.5/src/cheat.h:1898: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(command, GetCommandLine(), command_length);
data/nordlicht-0.4.5/src/cheat.h:1899: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(&command[command_length], " " CHEAT_OPTION " ", option_length + 2);
data/nordlicht-0.4.5/src/cheat.h:1900: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(&command[command_length + option_length + 2],
data/nordlicht-0.4.5/src/image.c:37:50:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
void av_frame_copy(AVFrame *dst, AVFrame *src) { memcpy(dst->data[0], src->data[0], sizeof(uint8_t)*avpicture_get_size(AV_PIX_FMT_RGB24, dst->width, dst->height)); }
data/nordlicht-0.4.5/src/image.c:295:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(file_path, "wb");
data/nordlicht-0.4.5/src/main.c:226: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).
        int fd = open(output_file, O_CREAT | O_TRUNC | O_RDWR, 0666);
data/nordlicht-0.4.5/src/testsuite.c:19:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char c[200];
data/nordlicht-0.4.5/src/cheat.h:560:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	literal_length = strlen(literal);
data/nordlicht-0.4.5/src/cheat.h:565:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		marker_length = strlen(marker);
data/nordlicht-0.4.5/src/cheat.h:1552:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						strlen(assertion_format), strlen(file),
data/nordlicht-0.4.5/src/cheat.h:1552: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).
						strlen(assertion_format), strlen(file),
data/nordlicht-0.4.5/src/cheat.h:1553:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						CHEAT_INTEGER_LENGTH(line), strlen(suite->test_name),
data/nordlicht-0.4.5/src/cheat.h:1554:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						strlen(truncation), (size_t )1));
data/nordlicht-0.4.5/src/cheat.h:1562:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			cheat_append_list(&suite->messages, buffer, strlen(buffer));
data/nordlicht-0.4.5/src/cheat.h:1802:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			size = read(channels[index].reader, buffer, sizeof buffer);
data/nordlicht-0.4.5/src/cheat.h:1888:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	command_length = strlen(GetCommandLine());
data/nordlicht-0.4.5/src/cheat.h:1889: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).
	option_length = strlen(CHEAT_OPTION);
data/nordlicht-0.4.5/src/cheat.h:1890: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).
	name_length = strlen(test->name);
data/nordlicht-0.4.5/src/nordlicht.c:56: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).
        size_t filename_len = strlen(filename);
data/nordlicht-0.4.5/src/nordlicht.c:58:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(n->filename, "file:", 5);
data/nordlicht-0.4.5/src/nordlicht.c:59:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(n->filename + 5, filename, filename_len);

ANALYSIS SUMMARY:

Hits = 71
Lines analyzed = 5290 in approximately 0.24 seconds (21881 lines/second)
Physical Source Lines of Code (SLOC) = 3924
Hits@level = [0]  29 [1]  14 [2]  12 [3]   5 [4]  40 [5]   0
Hits@level+ = [0+] 100 [1+]  71 [2+]  57 [3+]  45 [4+]  40 [5+]   0
Hits/KSLOC@level+ = [0+] 25.4842 [1+] 18.0938 [2+] 14.526 [3+] 11.4679 [4+] 10.1937 [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.