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/rockdodger-1.1.4/guru_meditation.h
Examining data/rockdodger-1.1.4/display_subsystem.c
Examining data/rockdodger-1.1.4/blubats.h
Examining data/rockdodger-1.1.4/game_state.h
Examining data/rockdodger-1.1.4/main.c
Examining data/rockdodger-1.1.4/sekrit_lab.h
Examining data/rockdodger-1.1.4/greeblies.c
Examining data/rockdodger-1.1.4/powerup.h
Examining data/rockdodger-1.1.4/mood_item.c
Examining data/rockdodger-1.1.4/sound.c
Examining data/rockdodger-1.1.4/game_state.c
Examining data/rockdodger-1.1.4/input_functions.h
Examining data/rockdodger-1.1.4/signal_handling.h
Examining data/rockdodger-1.1.4/u-iff.c
Examining data/rockdodger-1.1.4/SFont.c
Examining data/rockdodger-1.1.4/intro.c
Examining data/rockdodger-1.1.4/yellifish.h
Examining data/rockdodger-1.1.4/spacedots.c
Examining data/rockdodger-1.1.4/sparkles.c
Examining data/rockdodger-1.1.4/display_subsystem.h
Examining data/rockdodger-1.1.4/u-iff.h
Examining data/rockdodger-1.1.4/datafun.c
Examining data/rockdodger-1.1.4/laser.c
Examining data/rockdodger-1.1.4/laser.h
Examining data/rockdodger-1.1.4/infoscreen.h
Examining data/rockdodger-1.1.4/datafun.h
Examining data/rockdodger-1.1.4/scroller.h
Examining data/rockdodger-1.1.4/random_gen.c
Examining data/rockdodger-1.1.4/ship.c
Examining data/rockdodger-1.1.4/ship.h
Examining data/rockdodger-1.1.4/SFont.h
Examining data/rockdodger-1.1.4/globals.c
Examining data/rockdodger-1.1.4/spacedots.h
Examining data/rockdodger-1.1.4/greeblies.h
Examining data/rockdodger-1.1.4/blubats.c
Examining data/rockdodger-1.1.4/infoscreen.c
Examining data/rockdodger-1.1.4/signal_handling.c
Examining data/rockdodger-1.1.4/engine_exhaust.h
Examining data/rockdodger-1.1.4/mood_item.h
Examining data/rockdodger-1.1.4/highscore_io.c
Examining data/rockdodger-1.1.4/sekrit_lab.c
Examining data/rockdodger-1.1.4/guru_meditation.c
Examining data/rockdodger-1.1.4/scroller.c
Examining data/rockdodger-1.1.4/sparkles.h
Examining data/rockdodger-1.1.4/sprite.c
Examining data/rockdodger-1.1.4/highscore_io.h
Examining data/rockdodger-1.1.4/globals.h
Examining data/rockdodger-1.1.4/rocks.c
Examining data/rockdodger-1.1.4/engine_exhaust.c
Examining data/rockdodger-1.1.4/sound.h
Examining data/rockdodger-1.1.4/random_gen.h
Examining data/rockdodger-1.1.4/input_functions.c
Examining data/rockdodger-1.1.4/powerup.c
Examining data/rockdodger-1.1.4/sprite.h
Examining data/rockdodger-1.1.4/yellifish.c
Examining data/rockdodger-1.1.4/rocks.h
Examining data/rockdodger-1.1.4/intro.h

FINAL RESULTS:

data/rockdodger-1.1.4/SFont.c:225:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(tmp, "%s_", text);
data/rockdodger-1.1.4/datafun.c:105:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(name, sizeof(name), fname, i);
data/rockdodger-1.1.4/datafun.c:136:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(name, sizeof(name), fname, i);
data/rockdodger-1.1.4/globals.c:116: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(f, version_format, VERSION);
data/rockdodger-1.1.4/globals.c:117: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(f, resolution_format, xsize, ysize);
data/rockdodger-1.1.4/globals.c:121: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(f, spacedots_format, setupptr->values[setupptr->current]);
data/rockdodger-1.1.4/globals.c:125: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(f, fullscreen_format, setupptr->values[setupptr->current]);
data/rockdodger-1.1.4/globals.c:129: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(f, intro_format, setupptr->values[setupptr->current]);
data/rockdodger-1.1.4/globals.c:133: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(f, music_volume_format, setupptr->values[setupptr->current]);
data/rockdodger-1.1.4/globals.c:148:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    if(sscanf(buf, resolution_format, &x0, &x1) == 2) {
data/rockdodger-1.1.4/globals.c:153:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    } else if(sscanf(buf, spacedots_format, inpbuf) == 1) {
data/rockdodger-1.1.4/globals.c:158:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    } else if(sscanf(buf, fullscreen_format, inpbuf) == 1) {
data/rockdodger-1.1.4/globals.c:163:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    } else if(sscanf(buf, intro_format, inpbuf) == 1) {
data/rockdodger-1.1.4/globals.c:165:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    } else if(sscanf(buf, version_format, configuration_file_version) == 1) {
data/rockdodger-1.1.4/globals.c:167:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    } else if(sscanf(buf, music_volume_format, inpbuf) == 1) {
data/rockdodger-1.1.4/globals.c:254:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(txtbuf, "%-70s %12s", setupptr->entry_name, setupptr->values[setupptr->current]);
data/rockdodger-1.1.4/guru_meditation.c:259:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buf[0], "Software Failure. Press left mouse button to %s.", flags & GM_FLAGS_CHOICE ? "retry, right for abort." : "continue");
data/rockdodger-1.1.4/highscore_io.c:70:8:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    if(fscanf(f, HIGHSCORE_HEADER_FORMAT, &i) == 1) {
data/rockdodger-1.1.4/highscore_io.c:72: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.
      printf(HIGHSCORE_HEADER_FORMAT, i);
data/rockdodger-1.1.4/highscore_io.c:132:5:  [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(f, HIGHSCORE_HEADER_FORMAT, HIGHSCORE_VERSION);
data/rockdodger-1.1.4/intro.c:73:4:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	  snprintf(txtbuf, sizeof(txtbuf), intro_default_text, readbuf);
data/rockdodger-1.1.4/main.c:173:10:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcat(strcpy(buf, txts[SDL_GetTicks() % num_of_txts]), " Please enter your name using the keyboard and press enter!");
data/rockdodger-1.1.4/main.c:428:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buf, "Version %s - The %s edition  ( %s )", VERSION, edition_name, COMPILEDATE);
data/rockdodger-1.1.4/main.c:451:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(s, "%3s", high[i].name);
data/rockdodger-1.1.4/datafun.c:20:11:  [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.
    env = getenv("ROCKDODGER_DATADIR");
data/rockdodger-1.1.4/globals.c:110:52:  [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.
  snprintf(buf, sizeof(buf) - 1, "%s/.rockdodger", getenv("HOME"));
data/rockdodger-1.1.4/globals.c:144:52:  [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.
  snprintf(buf, sizeof(buf) - 1, "%s/.rockdodger", getenv("HOME"));
data/rockdodger-1.1.4/highscore_io.c:40:55:  [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.
    snprintf(s, sizeof(s) - 1, "%s/.rockdodger_high", getenv("HOME"));
data/rockdodger-1.1.4/main.c:1112:14:  [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.
  while((x = getopt(argc, argv, "P:Ifwskh?x:y:")) >= 0)
data/rockdodger-1.1.4/random_gen.c:25:18:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  return (float) random() / (float) RAND_MAX;
data/rockdodger-1.1.4/random_gen.c:33:5:  [3] (random) srandom:
  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.
    srandom((unsigned int) starttime);
data/rockdodger-1.1.4/rocks.c:93:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	rockptr->type_number = random() % surf_icerocks->num_surfaces;
data/rockdodger-1.1.4/rocks.c:98:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	rockptr->type_number = random() % surf_lithiumrocks->num_surfaces;
data/rockdodger-1.1.4/rocks.c:102:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	rockptr->type_number = random() % MAX_ROCK_IMAGESS;
data/rockdodger-1.1.4/SFont.c:9:1:  [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 tmp[1024];
data/rockdodger-1.1.4/blubats.c:166:10:  [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 buf[128];
data/rockdodger-1.1.4/blubats.c:170:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(buf, "(%.6e, %.6e), (%.6e, %.6e), (%.6e, %.6e), (%.6e, %.6e)",
data/rockdodger-1.1.4/blubats.c:557:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f = fopen("input.iff", "r");
data/rockdodger-1.1.4/datafun.c:13: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 buf[4096];
data/rockdodger-1.1.4/datafun.c:16:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy(buf, "./data");
data/rockdodger-1.1.4/datafun.c:39:10:  [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 retval[1024];
data/rockdodger-1.1.4/datafun.c:47:10:  [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 retval[4096];
data/rockdodger-1.1.4/datafun.c:100:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[256];
data/rockdodger-1.1.4/datafun.c:131:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[256];
data/rockdodger-1.1.4/globals.c:18: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 *values[12];
data/rockdodger-1.1.4/globals.c:57:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char configuration_file_version[14];
data/rockdodger-1.1.4/globals.c:107: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 buf[256];
data/rockdodger-1.1.4/globals.c:111:11:  [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(buf, "w")) == NULL) return;
data/rockdodger-1.1.4/globals.c:140: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 buf[256];
data/rockdodger-1.1.4/globals.c:141: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 inpbuf[32];
data/rockdodger-1.1.4/globals.c:145: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).
  if(!(f = fopen(buf, "r"))) return 0;
data/rockdodger-1.1.4/globals.c:168:22:  [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).
      music_volume = atoi(inpbuf);
data/rockdodger-1.1.4/globals.c:185: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 txtbuf[181];
data/rockdodger-1.1.4/globals.c:188: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 resolution_buf[10];
data/rockdodger-1.1.4/globals.c:211:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(resolution_buf, "%dx%d", xsize, ysize);
data/rockdodger-1.1.4/globals.c:289:20:  [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).
    music_volume = atoi(setupptr->values[setupptr->current]);
data/rockdodger-1.1.4/globals.c:306: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).
  if(!(f = fopen(fname, "r"))) {
data/rockdodger-1.1.4/globals.c:317: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 buf[33];
data/rockdodger-1.1.4/globals.c:324:20:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    edition_name = strcpy(buf, "#UNKNOWN#");
data/rockdodger-1.1.4/greeblies.c:34: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).
  if(mkstemp(debugname) == -1) {
data/rockdodger-1.1.4/greeblies.c:38:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f = fopen(debugname, "w+");
data/rockdodger-1.1.4/guru_meditation.c:255: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 buf[2][80];
data/rockdodger-1.1.4/guru_meditation.c:260:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  i = sprintf(buf[1], "Guru Meditation #%08X.", subsystem);
data/rockdodger-1.1.4/guru_meditation.c:264:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    i = sprintf(buf[1] + i, "%016lX", (unsigned long int)address);
data/rockdodger-1.1.4/guru_meditation.c:266:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    i = sprintf(buf[1] + i, "%08lX", (unsigned long int)address);
data/rockdodger-1.1.4/highscore_io.c:25:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char name_input_buf[512];
data/rockdodger-1.1.4/highscore_io.c:32: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 s[1024];
data/rockdodger-1.1.4/highscore_io.c:38:11:  [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(s, mode)) == NULL) {
data/rockdodger-1.1.4/highscore_io.c:41: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).
    if((f = fopen(s, mode)) == NULL) {
data/rockdodger-1.1.4/highscore_io.c:76: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 debugbuf[889];
data/rockdodger-1.1.4/highscore_io.c:85: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 s[1024];
data/rockdodger-1.1.4/intro.c:49:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char txtbuf[8001];
data/rockdodger-1.1.4/intro.c:57: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 readbuf[sizeof(txtbuf) - sizeof(intro_default_text) - 3];
data/rockdodger-1.1.4/intro.c:62:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(txtbuf, "Intro data is kaputt...    Game may be borked...           ");
data/rockdodger-1.1.4/main.c:85:1:  [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 topline[128];
data/rockdodger-1.1.4/main.c:162: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 buf[160];
data/rockdodger-1.1.4/main.c:173:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat(strcpy(buf, txts[SDL_GetTicks() % num_of_txts]), " Please enter your name using the keyboard and press enter!");
data/rockdodger-1.1.4/main.c:424: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 buf[120];
data/rockdodger-1.1.4/main.c:443: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 s[128];
data/rockdodger-1.1.4/main.c:447:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(s, "#%1d", i + 1);
data/rockdodger-1.1.4/main.c:449:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(s, "%4ld", high[i].score);
data/rockdodger-1.1.4/main.c:773: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 tempbuf[80];
data/rockdodger-1.1.4/main.c:774:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(tempbuf, "state_timeout=%g", state_timeout);
data/rockdodger-1.1.4/main.c:1076:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[21];
data/rockdodger-1.1.4/main.c:1078:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(buf, "snapshot.%02hX.bmp", screenshot_number++);
data/rockdodger-1.1.4/main.c:1121:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      xsize = atoi(optarg);
data/rockdodger-1.1.4/main.c:1125:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      ysize = atoi(optarg);
data/rockdodger-1.1.4/sekrit_lab.c:105:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[30][128];
data/rockdodger-1.1.4/sekrit_lab.c:121:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(buf[row], "button=%d state=%d x=$%04hX y=$%04hX", event.button.button, event.button.state, event.button.x, event.button.y);
data/rockdodger-1.1.4/sekrit_lab.c:125:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(buf[row], "state=%d sym=$%04X", event.key.state, event.key.keysym.sym);
data/rockdodger-1.1.4/sekrit_lab.c:132:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(buf[row], "event_nr = $%x, event.type = $%x", event_nr, (unsigned int)event.type);
data/rockdodger-1.1.4/ship.c:45: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 buf[256][256];
data/rockdodger-1.1.4/yellifish.h:15:12:  [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.
  unsigned char tentacleparts[YELLIFISH_TENTACLENO][YELLIFISH_TENTACLESEGMENTS]; //!< which tentaclepart
data/rockdodger-1.1.4/SFont.c:242: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).
      if(strlen(text) > 0) {
data/rockdodger-1.1.4/SFont.c:243: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).
	text[strlen(text) - 1] = '\0';
data/rockdodger-1.1.4/SFont.c:253: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).
      text[strlen(text) - 1] = '\0';
data/rockdodger-1.1.4/SFont.c:268: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).
    text[strlen(text)-1]='\0'; //Remove the CR character as this produces weird effects.
data/rockdodger-1.1.4/datafun.c:22:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buf, env, sizeof(buf) - 1);
data/rockdodger-1.1.4/globals.c:147: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).
    if(strlen(buf) == 0 || buf[0] == '#') continue;
data/rockdodger-1.1.4/guru_meditation.c:163: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).
  size_t slen = strlen(cptr);
data/rockdodger-1.1.4/highscore_io.c:37:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  mask = umask(0111);
data/rockdodger-1.1.4/highscore_io.c:39:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(0117);
data/rockdodger-1.1.4/highscore_io.c:47:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  umask(mask);
data/rockdodger-1.1.4/infoscreen.c:36:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    i = fgetc(iff.f);
data/rockdodger-1.1.4/infoscreen.c:38:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    i = fgetc(iff.f); //Padding
data/rockdodger-1.1.4/main.c:174: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).
  assert(strlen(buf) < sizeof(buf) - 1);
data/rockdodger-1.1.4/sparkles.c:69:25:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	splcls.clist[cidx].r = fgetc(iff.f);
data/rockdodger-1.1.4/sparkles.c:70:25:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	splcls.clist[cidx].g = fgetc(iff.f);
data/rockdodger-1.1.4/sparkles.c:71:25:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	splcls.clist[cidx].b = fgetc(iff.f);
data/rockdodger-1.1.4/u-iff.c:53:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc(inf);
data/rockdodger-1.1.4/u-iff.c:65:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = fgetc(inf);
data/rockdodger-1.1.4/u-iff.c:67:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = fgetc(inf);

ANALYSIS SUMMARY:

Hits = 112
Lines analyzed = 8389 in approximately 0.27 seconds (30995 lines/second)
Physical Source Lines of Code (SLOC) = 5871
Hits@level = [0] 134 [1]  19 [2]  59 [3]  10 [4]  24 [5]   0
Hits@level+ = [0+] 246 [1+] 112 [2+]  93 [3+]  34 [4+]  24 [5+]   0
Hits/KSLOC@level+ = [0+] 41.9009 [1+] 19.0768 [2+] 15.8406 [3+] 5.79118 [4+] 4.08789 [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.