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/ale-0.9.0.3/ale_fixed.h
Examining data/ale-0.9.0.3/ale_pos.h
Examining data/ale-0.9.0.3/device/canon_300d_raw_linear_50mm_1_8.h
Examining data/ale-0.9.0.3/device/xvp610_640x480.h
Examining data/ale-0.9.0.3/device/canon_300d_raw_linear.h
Examining data/ale-0.9.0.3/device/canon_300d_raw_linear_50mm_1_4.h
Examining data/ale-0.9.0.3/device/canon_300d_raw_linear_50mm_1_4_1_4.h
Examining data/ale-0.9.0.3/device/canon_300d_raw_linear_85mm_1_8.h
Examining data/ale-0.9.0.3/device/xvp610_320x240.h
Examining data/ale-0.9.0.3/device/nikon_d50.h
Examining data/ale-0.9.0.3/device/ov7620_raw_linear.h
Examining data/ale-0.9.0.3/d3.cc
Examining data/ale-0.9.0.3/rand.cc
Examining data/ale-0.9.0.3/d3/tfile.cc
Examining data/ale-0.9.0.3/d3/view.h
Examining data/ale-0.9.0.3/d3/focus.h
Examining data/ale-0.9.0.3/d3/et.h
Examining data/ale-0.9.0.3/d3/tfile.h
Examining data/ale-0.9.0.3/d3/space.cc
Examining data/ale-0.9.0.3/d3/pt.h
Examining data/ale-0.9.0.3/d3/scene.h
Examining data/ale-0.9.0.3/d3/align.cc
Examining data/ale-0.9.0.3/d3/point.h
Examining data/ale-0.9.0.3/d3/align.h
Examining data/ale-0.9.0.3/d3/cpf.cc
Examining data/ale-0.9.0.3/d3/render.h
Examining data/ale-0.9.0.3/d3/space.h
Examining data/ale-0.9.0.3/d3/scene.cc
Examining data/ale-0.9.0.3/d3/cpf.h
Examining data/ale-0.9.0.3/d3/focus.cc
Examining data/ale-0.9.0.3/d3.h
Examining data/ale-0.9.0.3/d2.h
Examining data/ale-0.9.0.3/link-warning.h
Examining data/ale-0.9.0.3/ui/util.h
Examining data/ale-0.9.0.3/ui/help.h
Examining data/ale-0.9.0.3/ui/ui.h
Examining data/ale-0.9.0.3/ui/input.h
Examining data/ale-0.9.0.3/ui/input.cc
Examining data/ale-0.9.0.3/ui/ui_wo.h
Examining data/ale-0.9.0.3/ui/ui_tty.h
Examining data/ale-0.9.0.3/ui/ui.cc
Examining data/ale-0.9.0.3/ui/ui_quiet.h
Examining data/ale-0.9.0.3/ui/ui_log.h
Examining data/ale-0.9.0.3/ui/ui_log.cc
Examining data/ale-0.9.0.3/ui/implication.h
Examining data/ale-0.9.0.3/ui/unsupported.h
Examining data/ale-0.9.0.3/lib/c-ctype.c
Examining data/ale-0.9.0.3/lib/string.in.h
Examining data/ale-0.9.0.3/lib/strtod.c
Examining data/ale-0.9.0.3/lib/strndup.c
Examining data/ale-0.9.0.3/lib/strnlen.c
Examining data/ale-0.9.0.3/lib/unistd.in.h
Examining data/ale-0.9.0.3/lib/intprops.h
Examining data/ale-0.9.0.3/lib/strerror.c
Examining data/ale-0.9.0.3/lib/error.h
Examining data/ale-0.9.0.3/lib/stdlib.in.h
Examining data/ale-0.9.0.3/lib/error.c
Examining data/ale-0.9.0.3/lib/c-ctype.h
Examining data/ale-0.9.0.3/lib/errno.in.h
Examining data/ale-0.9.0.3/lib/stdbool.in.h
Examining data/ale-0.9.0.3/d2.cc
Examining data/ale-0.9.0.3/ale.cc
Examining data/ale-0.9.0.3/ale_math.h
Examining data/ale-0.9.0.3/ale_accum.h
Examining data/ale-0.9.0.3/ale_real.h
Examining data/ale-0.9.0.3/thread.cc
Examining data/ale-0.9.0.3/d2/image_weighted_simple.h
Examining data/ale-0.9.0.3/d2/tfile.cc
Examining data/ale-0.9.0.3/d2/image_bayer_ale_real.h
Examining data/ale-0.9.0.3/d2/trans_abstract.h
Examining data/ale-0.9.0.3/d2/vise.h
Examining data/ale-0.9.0.3/d2/trans_multi.cc
Examining data/ale-0.9.0.3/d2/pixel.h
Examining data/ale-0.9.0.3/d2/render/usm.h
Examining data/ale-0.9.0.3/d2/render/psf/psf_template.h
Examining data/ale-0.9.0.3/d2/render/psf/stdin_vg.h
Examining data/ale-0.9.0.3/d2/render/psf/box.h
Examining data/ale-0.9.0.3/d2/render/psf/backprojector.h
Examining data/ale-0.9.0.3/d2/render/psf/gauss.h
Examining data/ale-0.9.0.3/d2/render/psf/psf_parse.h
Examining data/ale-0.9.0.3/d2/render/psf/stdin.h
Examining data/ale-0.9.0.3/d2/render/psf/psf_calibrate.h
Examining data/ale-0.9.0.3/d2/render/psf/normalizer.h
Examining data/ale-0.9.0.3/d2/render/psf/rasterizer.h
Examining data/ale-0.9.0.3/d2/render/psf/sum.h
Examining data/ale-0.9.0.3/d2/render/psf/circle.h
Examining data/ale-0.9.0.3/d2/render/psf/convolution.h
Examining data/ale-0.9.0.3/d2/render/psf/psf.h
Examining data/ale-0.9.0.3/d2/render/psf/scalar_mult.h
Examining data/ale-0.9.0.3/d2/render/psf/raster.h
Examining data/ale-0.9.0.3/d2/render/incremental.h
Examining data/ale-0.9.0.3/d2/render/invariant.h
Examining data/ale-0.9.0.3/d2/render/ipc.h
Examining data/ale-0.9.0.3/d2/render/combine.h
Examining data/ale-0.9.0.3/d2/render/zero.h
Examining data/ale-0.9.0.3/d2/image_rw.cc
Examining data/ale-0.9.0.3/d2/image_ale_real.h
Examining data/ale-0.9.0.3/d2/image_rw.h
Examining data/ale-0.9.0.3/d2/tfile.h
Examining data/ale-0.9.0.3/d2/exposure/exposure.cc
Examining data/ale-0.9.0.3/d2/exposure/exposure.h
Examining data/ale-0.9.0.3/d2/exposure/exposure_default.h
Examining data/ale-0.9.0.3/d2/exposure/exposure_boolean.h
Examining data/ale-0.9.0.3/d2/exposure/exposure_linear.h
Examining data/ale-0.9.0.3/d2/transformation.h
Examining data/ale-0.9.0.3/d2/image.cc
Examining data/ale-0.9.0.3/d2/render.cc
Examining data/ale-0.9.0.3/d2/exclusion.h
Examining data/ale-0.9.0.3/d2/image_weighted_median.h
Examining data/ale-0.9.0.3/d2/align.cc
Examining data/ale-0.9.0.3/d2/image.h
Examining data/ale-0.9.0.3/d2/filter.h
Examining data/ale-0.9.0.3/d2/pixel_accum.h
Examining data/ale-0.9.0.3/d2/point.h
Examining data/ale-0.9.0.3/d2/ppm.h
Examining data/ale-0.9.0.3/d2/trans_single.h
Examining data/ale-0.9.0.3/d2/align.h
Examining data/ale-0.9.0.3/d2/trans_multi.h
Examining data/ale-0.9.0.3/d2/image_weighted_avg.h
Examining data/ale-0.9.0.3/d2/spixel.h
Examining data/ale-0.9.0.3/d2/vise_core.h
Examining data/ale-0.9.0.3/d2/vise/ma.h
Examining data/ale-0.9.0.3/d2/vise/sf.h
Examining data/ale-0.9.0.3/d2/image_zero.h
Examining data/ale-0.9.0.3/d2/render.h
Examining data/ale-0.9.0.3/d2/filter/scaled_filter.h
Examining data/ale-0.9.0.3/d2/filter/box.h
Examining data/ale-0.9.0.3/d2/filter/gauss.h
Examining data/ale-0.9.0.3/d2/filter/lanczos.h
Examining data/ale-0.9.0.3/d2/filter/filter.h
Examining data/ale-0.9.0.3/d2/filter/mult.h
Examining data/ale-0.9.0.3/d2/filter/sinc.h
Examining data/ale-0.9.0.3/d2/filter/triangle.h
Examining data/ale-0.9.0.3/d2/filter/zero.h
Examining data/ale-0.9.0.3/d2/filter/ssfe.h
Examining data/ale-0.9.0.3/d2/vise_core.cc
Examining data/ale-0.9.0.3/d2/render_parse.h
Examining data/ale-0.9.0.3/rand.h
Examining data/ale-0.9.0.3/optimizations.h
Examining data/ale-0.9.0.3/thread.h

FINAL RESULTS:

data/ale-0.9.0.3/lib/unistd.in.h:108:12:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
#   define chown rpl_chown
data/ale-0.9.0.3/lib/unistd.in.h:109:12:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
extern int chown (const char *file, uid_t uid, gid_t gid);
data/ale-0.9.0.3/lib/unistd.in.h:113:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
# undef chown
data/ale-0.9.0.3/lib/unistd.in.h:114:10:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
# define chown(f,u,g) \
data/ale-0.9.0.3/lib/unistd.in.h:118:6:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
     chown (f, u, g))
data/ale-0.9.0.3/lib/unistd.in.h:504:12:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
extern int readlink (const char *file, char *buf, size_t bufsize);
data/ale-0.9.0.3/lib/unistd.in.h:507:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
# undef readlink
data/ale-0.9.0.3/lib/unistd.in.h:508:10:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
# define readlink(f,b,s) \
data/ale-0.9.0.3/lib/unistd.in.h:511:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
     readlink (f, b, s))
data/ale-0.9.0.3/d2/align.h:3123:4:  [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(wmx_exec, wmx_exec, wmx_file, wmx_defs, NULL);
data/ale-0.9.0.3/d2/render/psf/psf_parse.h:64:4:  [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.
			fprintf(stderr, is_linear ? "linear" : "non-linear");
data/ale-0.9.0.3/d2/render/psf/psf_parse.h:71:4:  [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.
			fprintf(stderr, is_linear ? "linear" : "non-linear");
data/ale-0.9.0.3/d2/tfile.h:797:3:  [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.
		fprintf(t->file, is_primary ? "P " : "Q ");
data/ale-0.9.0.3/d2/tfile.h:803:3:  [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.
		fprintf(t->file, is_primary ? "E " : "F ");
data/ale-0.9.0.3/lib/error.c:205: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, args);
data/ale-0.9.0.3/lib/error.c:317:3:  [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.
  fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
data/ale-0.9.0.3/lib/error.h:30:22:  [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__ printf
data/ale-0.9.0.3/lib/strerror.c:265:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf (mesg, fmt, n);
data/ale-0.9.0.3/ui/help.h:61:3:  [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.
		fprintf(help_stream, BETWEEN_SECTIONS);
data/ale-0.9.0.3/ui/help.h:81:3:  [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.
		fprintf(help_stream, 
data/ale-0.9.0.3/ui/help.h:112:3:  [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.
		fprintf(help_stream, 
data/ale-0.9.0.3/ui/help.h:123:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:160:3:  [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.
		fprintf(help_stream, 
data/ale-0.9.0.3/ui/help.h:271:3:  [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.
		fprintf(help_stream, 
data/ale-0.9.0.3/ui/help.h:328:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:401:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:421:3:  [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.
		fprintf(help_stream, 
data/ale-0.9.0.3/ui/help.h:451:3:  [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.
		fprintf(help_stream, 
data/ale-0.9.0.3/ui/help.h:478:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:535:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:555:3:  [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.
		fprintf(help_stream, 
data/ale-0.9.0.3/ui/help.h:574:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:583:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:678:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:721:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/help.h:759:3:  [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.
		fprintf(help_stream,
data/ale-0.9.0.3/ui/ui.h:214:15:  [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.
	virtual void printf(const char *format, ...) = 0;
data/ale-0.9.0.3/ui/ui.h:610: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(format_string_ok(), status.match_value);
data/ale-0.9.0.3/ui/ui.h:615: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(format_string_no_match(), status.match_value);
data/ale-0.9.0.3/ui/ui_log.h:32:7:  [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 printf(const char *format, ...) {
data/ale-0.9.0.3/ui/ui_log.h:38:3:  [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(ui_stream, format, ap);
data/ale-0.9.0.3/ui/ui_log.h:207: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(message);
data/ale-0.9.0.3/ui/ui_quiet.h:32:7:  [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 printf(const char *format, ...) {
data/ale-0.9.0.3/ui/ui_quiet.h:43:3:  [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(ui_stream, format, ap);
data/ale-0.9.0.3/ui/ui_tty.h:111:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			n = vsnprintf(local_buffer, terminal_width - status_index, format, ap);
data/ale-0.9.0.3/ui/ui_tty.h:297:7:  [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 printf(const char *format, ...) {
data/ale-0.9.0.3/ui/ui_tty.h:306:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			n = vsnprintf(buffer + buffer_index, terminal_width - buffer_index, format, ap);
data/ale-0.9.0.3/ui/ui_tty.h:336:4:  [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(ui_stream, format, ap);
data/ale-0.9.0.3/ui/ui_wo.h:32:7:  [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 printf(const char *format, ...) {
data/ale-0.9.0.3/ui/ui_wo.h:35:3:  [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(ui_stream, format, ap);
data/ale-0.9.0.3/rand.h:55:3:  [3] (random) srand:
  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.
		srand(s);
data/ale-0.9.0.3/rand.h:61:16:  [3] (random) nrand48:
  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 (int) nrand48(state_vars.state_us3) % RAND_MAX;
data/ale-0.9.0.3/rand.h:68:3:  [3] (random) srand:
  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.
		srand(state_vars.state_ui);
data/ale-0.9.0.3/d2/align.h:3229:37:  [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).
			astate.set_input_frame(image_rw::open(n));
data/ale-0.9.0.3/d2/align.h:3288:37:  [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).
			astate.set_input_frame(image_rw::open(i));
data/ale-0.9.0.3/d2/image_ale_real.h:116:14:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			support = tmpfile();
data/ale-0.9.0.3/d2/image_bayer_ale_real.h:150:14:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			support = tmpfile();
data/ale-0.9.0.3/d2/image_rw.h:569:22:  [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).
	static const image *open(unsigned int n) {
data/ale-0.9.0.3/d2/image_rw.h:593:4:  [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).
			open(n);
data/ale-0.9.0.3/d2/ppm.h:122: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 *f = fopen(filename, "rb");
data/ale-0.9.0.3/d2/ppm.h:149: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 *f = fopen(filename, "rb");
data/ale-0.9.0.3/d2/ppm.h:322: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 *f = fopen(filename, "wb");
data/ale-0.9.0.3/d2/render/incremental.h:372:32:  [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).
			const image *im = image_rw::open(0);
data/ale-0.9.0.3/d2/render/incremental.h:390:32:  [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).
			const image *im = image_rw::open(get_step());
data/ale-0.9.0.3/d2/render/ipc.h:1243:35:  [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).
				const image *real = image_rw::open(m);
data/ale-0.9.0.3/d2/render/psf/psf_calibrate.h:56:47:  [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).
                const image *real = image_rw::open(m);
data/ale-0.9.0.3/d2/render/zero.h:45:32:  [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).
			const image *im = image_rw::open(0);
data/ale-0.9.0.3/d2/tfile.h:71: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).
	FILE *file = fopen (filename, "r");
data/ale-0.9.0.3/d2/tfile.h:134: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 line[1024];
data/ale-0.9.0.3/d2/tfile.h:164: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[1024];
data/ale-0.9.0.3/d2/tfile.h:204: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 line[1024];
data/ale-0.9.0.3/d2/tfile.h:421: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 line[1024];
data/ale-0.9.0.3/d2/tfile.h:659: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).
	FILE *file = fopen (filename, "w");
data/ale-0.9.0.3/d2/tfile.h:698: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).
	t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d2/tfile.h:781: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).
	t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d2/tfile.h:831: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).
		t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d2/tfile.h:860: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).
		t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d2/tfile.h:875:26:  [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).
               t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d2/tfile.h:890:26:  [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).
               t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d2/trans_multi.h:193: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(spatio_elem_map, tm.spatio_elem_map, cur_size);
data/ale-0.9.0.3/d2/trans_multi.h:200: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(spatio_elem_map_r, tm.spatio_elem_map_r, cur_size);
data/ale-0.9.0.3/d2/vise/ma.h:136: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).
			replace_image = image_rw::open(frame_number);
data/ale-0.9.0.3/d2/vise/sf.h:93: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).
			replace_image = image_rw::open(frame_number);
data/ale-0.9.0.3/d3/cpf.h:416: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).
		load_f = fopen(load_n, "r");
data/ale-0.9.0.3/d3/cpf.h:426: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).
		save_f = fopen(save_n, "w");
data/ale-0.9.0.3/d3/scene.h:857: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).
		void open(unsigned int f) {
data/ale-0.9.0.3/d3/scene.h:866:5:  [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).
				open(f);
data/ale-0.9.0.3/d3/scene.h:1270: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(data, w.data, size * sizeof(ale_real) * 2);
data/ale-0.9.0.3/d3/scene.h:1738: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).
				al->open(f);
data/ale-0.9.0.3/d3/scene.h:3310: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).
				al->open(f);
data/ale-0.9.0.3/d3/scene.h:3396:42:  [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).
				const d2::image *imf = d2::image_rw::open(f);
data/ale-0.9.0.3/d3/scene.h:3423:19:  [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).
				d2::image_rw::open(f);
data/ale-0.9.0.3/d3/scene.h:4810:10:  [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).
					al->open(f1);
data/ale-0.9.0.3/d3/scene.h:4818:11:  [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).
						al->open(f2);
data/ale-0.9.0.3/d3/scene.h:4854: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).
				al->open(f1);
data/ale-0.9.0.3/d3/scene.h:4855: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).
				al->open(f2);
data/ale-0.9.0.3/d3/tfile.h:66: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).
	FILE *file = fopen (filename, "r");
data/ale-0.9.0.3/d3/tfile.h:127: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 line[1024];
data/ale-0.9.0.3/d3/tfile.h:150: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[1024];
data/ale-0.9.0.3/d3/tfile.h:177: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 line[1024];
data/ale-0.9.0.3/d3/tfile.h:294: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 line[1024];
data/ale-0.9.0.3/d3/tfile.h:386: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).
	FILE *file = fopen (filename, "w");
data/ale-0.9.0.3/d3/tfile.h:425: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).
	t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d3/tfile.h:468: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).
	t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d3/tfile.h:499: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).
		t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d3/tfile.h:527: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).
		t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d3/tfile.h:542:26:  [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).
               t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/d3/tfile.h:557:26:  [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).
               t->file = fopen(t->filename, "a");
data/ale-0.9.0.3/lib/error.c:110: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 errbuf[1024];
data/ale-0.9.0.3/lib/stdlib.in.h:213:11:  [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).
#  define mkstemp rpl_mkstemp
data/ale-0.9.0.3/lib/stdlib.in.h:214: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).
extern int mkstemp (char * /*template*/);
data/ale-0.9.0.3/lib/stdlib.in.h:220: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).
# undef mkstemp
data/ale-0.9.0.3/lib/stdlib.in.h:221:10:  [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).
# define mkstemp(t) \
data/ale-0.9.0.3/lib/stdlib.in.h:224:6:  [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).
     mkstemp (t))
data/ale-0.9.0.3/lib/strerror.c:264:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char mesg[sizeof fmt + INT_STRLEN_BOUND (n)];
data/ale-0.9.0.3/lib/strndup.c:36:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  return memcpy (new, s, len);
data/ale-0.9.0.3/link-warning.h:18:22:  [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 const char warning[sizeof (message)]		\
data/ale-0.9.0.3/thread.h:49: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 buffer[100];
data/ale-0.9.0.3/thread.h:51: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).
		cpuinfo = fopen("/proc/cpuinfo", "r");
data/ale-0.9.0.3/ui/input.h:1374: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.
		const char *psf[psf_N] = {NULL, NULL};
data/ale-0.9.0.3/ui/input.h:2789:41:  [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).
				const d2::image *im = d2::image_rw::open(0);
data/ale-0.9.0.3/ui/input.h:2836:40:  [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).
			const d2::image *im = d2::image_rw::open(j);
data/ale-0.9.0.3/d2/image_rw.h:184:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(image_info->filename, filename, MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:377:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(image_info->filename, filename, MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:412:4:  [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(mi->magick, "PNM", MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:413:4:  [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(image_info->magick, "PNM", MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:415:4:  [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(mi->magick, "PNM", MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:416:4:  [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(image_info->magick, "PNM", MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:502:4:  [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(mi->magick, "PNM", MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:503:4:  [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(image_info->magick, "PNM", MaxTextExtent);
data/ale-0.9.0.3/d2/image_rw.h:528: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).
		int length = strlen(p) + strlen(s) + 8;
data/ale-0.9.0.3/d2/image_rw.h:528:28:  [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 length = strlen(p) + strlen(s) + 8;
data/ale-0.9.0.3/d2/ppm.h:68:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			next = fgetc(f);
data/ale-0.9.0.3/d2/ppm.h:92:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			next = fgetc(f);
data/ale-0.9.0.3/d2/ppm.h:94:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		next = fgetc(f);
data/ale-0.9.0.3/d2/ppm.h:104:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		next = fgetc(f);
data/ale-0.9.0.3/d2/ppm.h:170:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	m3 = fgetc(f);
data/ale-0.9.0.3/d2/ppm.h:173:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		m4 = fgetc(f);
data/ale-0.9.0.3/d2/ppm.h:177:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			m4 = fgetc(f);
data/ale-0.9.0.3/d2/ppm.h:229:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (fgetc(f) == EOF) {
data/ale-0.9.0.3/d2/render.h:58:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return strncmp(a, b, strlen(a));
data/ale-0.9.0.3/d2/render/psf/psf_parse.h:42:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return strncmp(a, b, strlen(a));
data/ale-0.9.0.3/d2/render/psf/psf_parse.h:76: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).
			if (sscanf(orig_type + strlen("box="), "%lf", &param) != 1)
data/ale-0.9.0.3/d2/render/psf/psf_parse.h:80: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).
			if (sscanf(orig_type + strlen("circle="), "%lf", &param) != 1)
data/ale-0.9.0.3/d2/render/psf/psf_parse.h:84: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).
			if (sscanf(orig_type + strlen("gauss="), "%lf", &param) != 1)
data/ale-0.9.0.3/d2/render_parse.h:38:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return strncmp(a, b, strlen(a));
data/ale-0.9.0.3/d2/render_parse.h:57: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 (sscanf(type + strlen("lanc:"), "%lf", &param) != 1) 
data/ale-0.9.0.3/d2/render_parse.h: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 (sscanf(type + strlen("triangle:"), "%lf", &param) != 1) 
data/ale-0.9.0.3/d2/render_parse.h:65: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 (sscanf(type + strlen("box:"), "%lf", &param) != 1) 
data/ale-0.9.0.3/d2/render_parse.h:69: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 (sscanf(type + strlen("gauss:"), "%lf", &param) != 1)
data/ale-0.9.0.3/d2/render_parse.h:116: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).
			return new filter::scaled_filter(get_SF(type + strlen("coarse:")), 1);
data/ale-0.9.0.3/d2/render_parse.h:118: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).
			return new filter::scaled_filter(get_SF(type + strlen("fine:")), 0);
data/ale-0.9.0.3/d2/render_parse.h:120: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).
			return new filter::scaled_filter(get_SF(type + strlen("auto:")), 2);
data/ale-0.9.0.3/d2/render_parse.h:128: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).
			return new filter::ssfe(get_SSF(type + strlen("ex:")), 1);
data/ale-0.9.0.3/d2/render_parse.h:130: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).
			return new filter::ssfe(get_SSF(type + strlen("nex:")), 0);
data/ale-0.9.0.3/d2/render_parse.h:141:38:  [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).
			i = new invariant(get_SSFE(type + strlen("min:")));
data/ale-0.9.0.3/d2/render_parse.h:144:38:  [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).
			i = new invariant(get_SSFE(type + strlen("max:")));
data/ale-0.9.0.3/d2/render_parse.h:147:38:  [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).
			i = new invariant(get_SSFE(type + strlen("last:")));
data/ale-0.9.0.3/d2/render_parse.h:150:38:  [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).
			i = new invariant(get_SSFE(type + strlen("first:")));
data/ale-0.9.0.3/d2/render_parse.h:153:38:  [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).
			i = new invariant(get_SSFE(type + strlen("avg:")));
data/ale-0.9.0.3/d2/render_parse.h:156: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 (sscanf(type + strlen("avgf:"), "%lf%n", &param, &offset) != 1) 
data/ale-0.9.0.3/d2/render_parse.h:158:38:  [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).
			i = new invariant(get_SSFE(type + strlen("avgf:") + offset + strlen(":")));
data/ale-0.9.0.3/d2/render_parse.h:158:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			i = new invariant(get_SSFE(type + strlen("avgf:") + offset + strlen(":")));
data/ale-0.9.0.3/d2/render_parse.h:161:38:  [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).
			i = new invariant(get_SSFE(type + strlen("median:")));
data/ale-0.9.0.3/d2/tfile.h:126:20:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	first_character = fgetc(t->file);
data/ale-0.9.0.3/d2/tfile.h:136: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).
		if (strlen(line) >= 1023) {
data/ale-0.9.0.3/d2/tfile.h:142:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		first_character = fgetc(t->file);
data/ale-0.9.0.3/d2/tfile.h:166:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(line) >= 1023) {
data/ale-0.9.0.3/d2/tfile.h:211: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).
		if (strlen(line) >= 1023) {
data/ale-0.9.0.3/d2/tfile.h:403:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		char c = fgetc(t->file);
data/ale-0.9.0.3/d2/tfile.h:428: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).
		if (strlen(line) >= 1023) {
data/ale-0.9.0.3/d2/vise.h:56: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).
		int length = strlen(prefix) + strlen(suffix) + 8 + 1;
data/ale-0.9.0.3/d2/vise.h:56: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).
		int length = strlen(prefix) + strlen(suffix) + 8 + 1;
data/ale-0.9.0.3/d3/cpf.h:88:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			next_character = fgetc(load_f);
data/ale-0.9.0.3/d3/cpf.h:159:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			command_char = fgetc(load_f);
data/ale-0.9.0.3/d3/tfile.h:119:20:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	first_character = fgetc(t->file);
data/ale-0.9.0.3/d3/tfile.h:129: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).
		if (strlen(line) >= 1023) {
data/ale-0.9.0.3/d3/tfile.h:135:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		first_character = fgetc(t->file);
data/ale-0.9.0.3/d3/tfile.h:152:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(line) >= 1023) {
data/ale-0.9.0.3/d3/tfile.h:184: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).
		if (strlen(line) >= 1023) {
data/ale-0.9.0.3/d3/tfile.h:301: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).
		if (strlen(line) >= 1023) {
data/ale-0.9.0.3/lib/error.c:142: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).
      size_t len = strlen (message) + 1;
data/ale-0.9.0.3/thread.h:58:37:  [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 (strncmp("processor", buffer, strlen("processor")))
data/ale-0.9.0.3/ui/help.h:57: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).
		int plen = strlen(package) + strlen(package_banner) + strlen(version);
data/ale-0.9.0.3/ui/help.h:57: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).
		int plen = strlen(package) + strlen(package_banner) + strlen(version);
data/ale-0.9.0.3/ui/help.h:57:57:  [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 plen = strlen(package) + strlen(package_banner) + strlen(version);
data/ale-0.9.0.3/ui/help.h:58: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).
		int slen = strlen(section_banner) + strlen(name);
data/ale-0.9.0.3/ui/help.h:58:39:  [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 slen = strlen(section_banner) + strlen(name);
data/ale-0.9.0.3/ui/input.h:144: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).
			if (!strncmp(argv[i], pfix, strlen(pfix)))
data/ale-0.9.0.3/ui/input.h:320:28:  [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 (strncmp(name, "0 ", strlen("0 ")))
data/ale-0.9.0.3/ui/input.h:323: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).
			name += strlen("0 ");
data/ale-0.9.0.3/ui/input.h:350: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).
			int length = strlen(name) + 3 * sizeof(unsigned int);
data/ale-0.9.0.3/ui/input.h:354:58:  [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).
			snprintf(desired_string, length, "%u %s", arg, name + strlen("0 "));
data/ale-0.9.0.3/ui/input.h:367: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).
			int length = strlen(name) + 3 * sizeof(unsigned int);
data/ale-0.9.0.3/ui/input.h:371:58:  [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).
			snprintf(desired_string, length, "%u %s", arg, name + strlen("0 "));
data/ale-0.9.0.3/ui/input.h:381: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).
			int length = strlen(name) + 3 * sizeof(unsigned int);
data/ale-0.9.0.3/ui/input.h:385:58:  [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).
			snprintf(desired_string, length, "%u %s", arg, name + strlen("0 "));
data/ale-0.9.0.3/ui/input.h:851: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).
		int length = (strlen(unadorned) + sizeof(unsigned int) * 3 + sizeof(int) * 3 + 2) + 1;
data/ale-0.9.0.3/ui/input.h:1078: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).
				if (strncmp("-", token, strlen("-")) || end_of_options) {
data/ale-0.9.0.3/ui/input.h:1256:50:  [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 is_help_option = !strncmp(argv[i], "--h", strlen("--h"));
data/ale-0.9.0.3/ui/input.h:1303: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).
			 || strncmp(argv[i], "--", strlen("--"))
data/ale-0.9.0.3/ui/ui_log.h:41: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).
		if (format[strlen(format) - 1] != '\n')
data/ale-0.9.0.3/ui/ui_tty.h:318:15:  [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 (format[strlen(format) - 1] == '\n') {
data/ale-0.9.0.3/ui/ui_tty.h:344: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).
		if (format[strlen(format) - 1] == '\n') {

ANALYSIS SUMMARY:

Hits = 204
Lines analyzed = 42594 in approximately 1.07 seconds (39862 lines/second)
Physical Source Lines of Code (SLOC) = 24173
Hits@level = [0] 479 [1]  82 [2]  69 [3]   3 [4]  41 [5]   9
Hits@level+ = [0+] 683 [1+] 204 [2+] 122 [3+]  53 [4+]  50 [5+]   9
Hits/KSLOC@level+ = [0+] 28.2547 [1+] 8.43917 [2+] 5.04695 [3+] 2.19253 [4+] 2.06842 [5+] 0.372316
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.