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/fyre-1.0.1/src/avi-writer.c
Examining data/fyre-1.0.1/src/avi-writer.h
Examining data/fyre-1.0.1/src/histogram-view.c
Examining data/fyre-1.0.1/src/histogram-view.h
Examining data/fyre-1.0.1/src/bifurcation-diagram.c
Examining data/fyre-1.0.1/src/bifurcation-diagram.h
Examining data/fyre-1.0.1/src/image-fu.c
Examining data/fyre-1.0.1/src/image-fu.h
Examining data/fyre-1.0.1/src/curve-editor.c
Examining data/fyre-1.0.1/src/curve-editor.h
Examining data/fyre-1.0.1/src/discovery-client.c
Examining data/fyre-1.0.1/src/discovery-client.h
Examining data/fyre-1.0.1/src/cell-renderer-bifurcation.c
Examining data/fyre-1.0.1/src/cell-renderer-bifurcation.h
Examining data/fyre-1.0.1/src/spline.c
Examining data/fyre-1.0.1/src/spline.h
Examining data/fyre-1.0.1/src/platform.h
Examining data/fyre-1.0.1/src/explorer.c
Examining data/fyre-1.0.1/src/explorer.h
Examining data/fyre-1.0.1/src/parameter-editor.c
Examining data/fyre-1.0.1/src/parameter-editor.h
Examining data/fyre-1.0.1/src/de-jong.c
Examining data/fyre-1.0.1/src/de-jong.h
Examining data/fyre-1.0.1/src/exr.cpp
Examining data/fyre-1.0.1/src/iterative-map.c
Examining data/fyre-1.0.1/src/iterative-map.h
Examining data/fyre-1.0.1/src/getopt.c
Examining data/fyre-1.0.1/src/getopt1.c
Examining data/fyre-1.0.1/src/chunked-file.c
Examining data/fyre-1.0.1/src/chunked-file.h
Examining data/fyre-1.0.1/src/var-int.h
Examining data/fyre-1.0.1/src/probability-map.c
Examining data/fyre-1.0.1/src/probability-map.h
Examining data/fyre-1.0.1/src/prefix.c
Examining data/fyre-1.0.1/src/prefix.h
Examining data/fyre-1.0.1/src/batch-image-render.c
Examining data/fyre-1.0.1/src/batch-image-render.h
Examining data/fyre-1.0.1/src/remote-server.c
Examining data/fyre-1.0.1/src/remote-server.h
Examining data/fyre-1.0.1/src/math-util.c
Examining data/fyre-1.0.1/src/math-util.h
Examining data/fyre-1.0.1/src/histogram-imager.h
Examining data/fyre-1.0.1/src/explorer-history.c
Examining data/fyre-1.0.1/src/color-button.c
Examining data/fyre-1.0.1/src/color-button.h
Examining data/fyre-1.0.1/src/gui-util.c
Examining data/fyre-1.0.1/src/gui-util.h
Examining data/fyre-1.0.1/src/parameter-holder.c
Examining data/fyre-1.0.1/src/parameter-holder.h
Examining data/fyre-1.0.1/src/cell-renderer-transition.c
Examining data/fyre-1.0.1/src/cell-renderer-transition.h
Examining data/fyre-1.0.1/src/explorer-tools.c
Examining data/fyre-1.0.1/src/remote-client.c
Examining data/fyre-1.0.1/src/remote-client.h
Examining data/fyre-1.0.1/src/explorer-about.c
Examining data/fyre-1.0.1/src/discovery-server.c
Examining data/fyre-1.0.1/src/discovery-server.h
Examining data/fyre-1.0.1/src/explorer-cluster.c
Examining data/fyre-1.0.1/src/screensaver.c
Examining data/fyre-1.0.1/src/screensaver.h
Examining data/fyre-1.0.1/src/animation-render-ui.c
Examining data/fyre-1.0.1/src/animation-render-ui.h
Examining data/fyre-1.0.1/src/cluster-model.c
Examining data/fyre-1.0.1/src/cluster-model.h
Examining data/fyre-1.0.1/src/animation.c
Examining data/fyre-1.0.1/src/main.c
Examining data/fyre-1.0.1/src/animation.h
Examining data/fyre-1.0.1/src/explorer-animation.c
Examining data/fyre-1.0.1/src/histogram-imager.c

FINAL RESULTS:

data/fyre-1.0.1/src/getopt.c:218: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.
#ifndef getenv
data/fyre-1.0.1/src/getopt.c:219:14:  [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.
extern char *getenv ();
data/fyre-1.0.1/src/getopt.c:404: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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/fyre-1.0.1/src/getopt.c:1194:1:  [3] (buffer) getopt:
  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.
getopt (argc, argv, optstring)
data/fyre-1.0.1/src/getopt.c:1224:11:  [3] (buffer) getopt:
  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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/fyre-1.0.1/src/getopt1.c:71:1:  [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.
getopt_long (argc, argv, options, long_options, opt_index)
data/fyre-1.0.1/src/getopt1.c:98:18:  [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.
libc_hidden_def (getopt_long)
data/fyre-1.0.1/src/getopt1.c:131:11:  [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.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/fyre-1.0.1/src/main.c:120:6:  [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.
	c = getopt_long(argc, argv, "hi:n:o:p:s:S:q:rvP:c:C",
data/fyre-1.0.1/src/math-util.c:42:12:  [3] (random) g_rand_double:
  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.
    return g_rand_double(global_random);
data/fyre-1.0.1/src/math-util.c:70:12:  [3] (random) g_rand_int_range:
  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.
    return g_rand_int_range(global_random, minimum, maximum);
data/fyre-1.0.1/src/animation-render-ui.c:242:32:  [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).
    self->avi = avi_writer_new(fopen(self->filename, "wb"), self->width, self->height, self->frame_rate);
data/fyre-1.0.1/src/animation.c:335: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(tempstring, (void *) data, length);
data/fyre-1.0.1/src/animation.c:383:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(f = fopen(filename, "rb"))) {
data/fyre-1.0.1/src/animation.c:402:27:  [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).
    g_return_if_fail((f = fopen(filename, "wb")));
data/fyre-1.0.1/src/avi-writer.c:48: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 fourcc[5];   /* The chunk's FOURCC code */
data/fyre-1.0.1/src/avi-writer.c:54: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 fourcc[5];   /* The chunk's FOURCC code */
data/fyre-1.0.1/src/avi-writer.c:460:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(new_entry->fourcc, current_chunk->fourcc, 5);
data/fyre-1.0.1/src/curve-editor.c:316:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy (c->spline.points + i, c->spline.points + i - 1,
data/fyre-1.0.1/src/curve-editor.c:340:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy (c->spline.points + dst, c->spline.points + src,
data/fyre-1.0.1/src/curve-editor.c:436: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(self->spline.points, spline->points, spline->num_points * sizeof (SplineControlPoint));
data/fyre-1.0.1/src/explorer-cluster.c:168:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int port = atoi(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(self->xml, "cluster_port"))));
data/fyre-1.0.1/src/histogram-imager.c:332:11:  [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).
	height = atoi (cptr+1);
data/fyre-1.0.1/src/main.c:190:20:  [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).
	    port_number = atol(optarg);
data/fyre-1.0.1/src/main.c:421:37:  [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).
    AviWriter *avi = avi_writer_new(fopen(filename, "wb"),
data/fyre-1.0.1/src/main.c:476: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, "w");
data/fyre-1.0.1/src/prefix.c:104: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 line[5000];
data/fyre-1.0.1/src/prefix.c:110: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 ("/proc/self/maps", "r");
data/fyre-1.0.1/src/prefix.c:355: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 (result, str1, len1);
data/fyre-1.0.1/src/prefix.c:356: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 (result + len1, str2, len2);
data/fyre-1.0.1/src/prefix.c:377: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 (result, str, size);
data/fyre-1.0.1/src/spline.c:64: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(n->points, spline->points, spline->num_points * sizeof(SplineControlPoint));
data/fyre-1.0.1/src/spline.c:77: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(buffer, spline->points, *size);
data/fyre-1.0.1/src/spline.c:85: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(n->points, (void *) data, n->num_points * sizeof(SplineControlPoint));
data/fyre-1.0.1/src/animation.c:277:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    callback(user_data, CHUNK_FYRE_PARAMS, strlen((void *) params), (void *) params);
data/fyre-1.0.1/src/avi-writer.c:380:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(new_chunk->fourcc, fourcc, 4);
data/fyre-1.0.1/src/batch-image-render.c:78:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(filename) > 4 && strcmp(".exr", filename + strlen(filename) - 4)==0) {
data/fyre-1.0.1/src/batch-image-render.c:78:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(filename) > 4 && strcmp(".exr", filename + strlen(filename) - 4)==0) {
data/fyre-1.0.1/src/chunked-file.c:103:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    fwrite((void *) signature, strlen((void *) signature), 1, self);
data/fyre-1.0.1/src/chunked-file.c:109: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).
    int expected_size = strlen((void *) signature);
data/fyre-1.0.1/src/discovery-client.c:169:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (length != strlen(self->service_name) + 3)
data/fyre-1.0.1/src/discovery-client.c:191:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			 strlen(self->service_name)+1, self->broadcast);
data/fyre-1.0.1/src/discovery-server.c:147:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (length != strlen(self->service_name) + 1)
data/fyre-1.0.1/src/getopt.c:241:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
# if (!defined __STDC__ || !__STDC__) && !defined strlen
data/fyre-1.0.1/src/getopt.c:244: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).
extern int strlen (const char *);
data/fyre-1.0.1/src/getopt.c:435:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      int len = nonoption_flags_max_len = strlen (orig_str);
data/fyre-1.0.1/src/getopt.c:663: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).
		== (unsigned int) strlen (p->name))
data/fyre-1.0.1/src/getopt.c:708: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).
	  nextchar += strlen (nextchar);
data/fyre-1.0.1/src/getopt.c:774: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).
		  nextchar += strlen (nextchar);
data/fyre-1.0.1/src/getopt.c:808: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).
		  nextchar += strlen (nextchar);
data/fyre-1.0.1/src/getopt.c:813: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).
	  nextchar += strlen (nextchar);
data/fyre-1.0.1/src/getopt.c:1000:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/fyre-1.0.1/src/getopt.c:1040: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).
	    nextchar += strlen (nextchar);
data/fyre-1.0.1/src/getopt.c:1078: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).
		    nextchar += strlen (nextchar);
data/fyre-1.0.1/src/getopt.c:1110: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).
		    nextchar += strlen (nextchar);
data/fyre-1.0.1/src/getopt.c:1114: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).
	    nextchar += strlen (nextchar);
data/fyre-1.0.1/src/main.c:505:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        fgetc(stdin);
data/fyre-1.0.1/src/prefix.c:141:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen (path);
data/fyre-1.0.1/src/prefix.c:351: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).
	len1 = strlen (str1);
data/fyre-1.0.1/src/prefix.c:352: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).
	len2 = strlen (str2);
data/fyre-1.0.1/src/prefix.c:372:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen (str);
data/fyre-1.0.1/src/remote-client.c:286:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    gnet_conn_write(self->gconn, line, strlen(line));
data/fyre-1.0.1/src/remote-server.c:281:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    gnet_conn_write(self->gconn, line, strlen(line));

ANALYSIS SUMMARY:

Hits = 63
Lines analyzed = 18646 in approximately 0.52 seconds (35654 lines/second)
Physical Source Lines of Code (SLOC) = 11684
Hits@level = [0]  74 [1]  29 [2]  23 [3]  11 [4]   0 [5]   0
Hits@level+ = [0+] 137 [1+]  63 [2+]  34 [3+]  11 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 11.7254 [1+] 5.39199 [2+] 2.90996 [3+] 0.941458 [4+]   0 [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.