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/hyperrogue-11.2b/3d-models.cpp
Examining data/hyperrogue-11.2b/achievement.cpp
Examining data/hyperrogue-11.2b/archimedean.cpp
Examining data/hyperrogue-11.2b/barriers.cpp
Examining data/hyperrogue-11.2b/bigstuff.cpp
Examining data/hyperrogue-11.2b/binary-tiling.cpp
Examining data/hyperrogue-11.2b/blizzard.cpp
Examining data/hyperrogue-11.2b/cell.cpp
Examining data/hyperrogue-11.2b/classes.cpp
Examining data/hyperrogue-11.2b/classes.h
Examining data/hyperrogue-11.2b/commandline.cpp
Examining data/hyperrogue-11.2b/complex.cpp
Examining data/hyperrogue-11.2b/complex2.cpp
Examining data/hyperrogue-11.2b/config.cpp
Examining data/hyperrogue-11.2b/content.cpp
Examining data/hyperrogue-11.2b/control.cpp
Examining data/hyperrogue-11.2b/crystal.cpp
Examining data/hyperrogue-11.2b/debug.cpp
Examining data/hyperrogue-11.2b/devmods/autoplay.cpp
Examining data/hyperrogue-11.2b/devmods/edit-shaders.cpp
Examining data/hyperrogue-11.2b/devmods/manual-animation.cpp
Examining data/hyperrogue-11.2b/devmods/solv-table.cpp
Examining data/hyperrogue-11.2b/dialogs.cpp
Examining data/hyperrogue-11.2b/direntx.h
Examining data/hyperrogue-11.2b/drawing.cpp
Examining data/hyperrogue-11.2b/earcut.hpp
Examining data/hyperrogue-11.2b/euclid.cpp
Examining data/hyperrogue-11.2b/expansion.cpp
Examining data/hyperrogue-11.2b/fake-mobile.cpp
Examining data/hyperrogue-11.2b/fieldpattern.cpp
Examining data/hyperrogue-11.2b/flags.cpp
Examining data/hyperrogue-11.2b/floorshapes.cpp
Examining data/hyperrogue-11.2b/game.cpp
Examining data/hyperrogue-11.2b/generators/bring.cpp
Examining data/hyperrogue-11.2b/generators/macbeath.cpp
Examining data/hyperrogue-11.2b/generators/patterngen.cpp
Examining data/hyperrogue-11.2b/generators/quartic.cpp
Examining data/hyperrogue-11.2b/generators/schmutz.cpp
Examining data/hyperrogue-11.2b/geom-exp.cpp
Examining data/hyperrogue-11.2b/geometry.cpp
Examining data/hyperrogue-11.2b/geometry2.cpp
Examining data/hyperrogue-11.2b/goldberg.cpp
Examining data/hyperrogue-11.2b/graph.cpp
Examining data/hyperrogue-11.2b/help.cpp
Examining data/hyperrogue-11.2b/heptagon.cpp
Examining data/hyperrogue-11.2b/history.cpp
Examining data/hyperrogue-11.2b/hprint.cpp
Examining data/hyperrogue-11.2b/hud.cpp
Examining data/hyperrogue-11.2b/hyper-main.cpp
Examining data/hyperrogue-11.2b/hyper.h
Examining data/hyperrogue-11.2b/hyper_function.h
Examining data/hyperrogue-11.2b/hyperpoint.cpp
Examining data/hyperrogue-11.2b/hyperweb.cpp
Examining data/hyperrogue-11.2b/hypgraph.cpp
Examining data/hyperrogue-11.2b/inventory.cpp
Examining data/hyperrogue-11.2b/irregular.cpp
Examining data/hyperrogue-11.2b/landgen.cpp
Examining data/hyperrogue-11.2b/landlock.cpp
Examining data/hyperrogue-11.2b/langen.cpp
Examining data/hyperrogue-11.2b/language-cz.cpp
Examining data/hyperrogue-11.2b/language-de.cpp
Examining data/hyperrogue-11.2b/language-pl.cpp
Examining data/hyperrogue-11.2b/language-ptbr.cpp
Examining data/hyperrogue-11.2b/language-ru.cpp
Examining data/hyperrogue-11.2b/language-tr.cpp
Examining data/hyperrogue-11.2b/language.cpp
Examining data/hyperrogue-11.2b/legacy.cpp
Examining data/hyperrogue-11.2b/locations.cpp
Examining data/hyperrogue-11.2b/makeh.cpp
Examining data/hyperrogue-11.2b/mapeditor.cpp
Examining data/hyperrogue-11.2b/menus.cpp
Examining data/hyperrogue-11.2b/mobile.cpp
Examining data/hyperrogue-11.2b/models.cpp
Examining data/hyperrogue-11.2b/monstergen.cpp
Examining data/hyperrogue-11.2b/multi.cpp
Examining data/hyperrogue-11.2b/multigame.cpp
Examining data/hyperrogue-11.2b/mymake.cpp
Examining data/hyperrogue-11.2b/netgen.cpp
Examining data/hyperrogue-11.2b/nofont.cpp
Examining data/hyperrogue-11.2b/nonisotropic.cpp
Examining data/hyperrogue-11.2b/orbgen.cpp
Examining data/hyperrogue-11.2b/orbs.cpp
Examining data/hyperrogue-11.2b/pattern2.cpp
Examining data/hyperrogue-11.2b/patterns.cpp
Examining data/hyperrogue-11.2b/penrose.cpp
Examining data/hyperrogue-11.2b/polygons.cpp
Examining data/hyperrogue-11.2b/quit.cpp
Examining data/hyperrogue-11.2b/quotient.cpp
Examining data/hyperrogue-11.2b/racing.cpp
Examining data/hyperrogue-11.2b/reg3.cpp
Examining data/hyperrogue-11.2b/renderbuffer.cpp
Examining data/hyperrogue-11.2b/rogueviz/banachtarski.cpp
Examining data/hyperrogue-11.2b/rogueviz/cvl.cpp
Examining data/hyperrogue-11.2b/rogueviz/flocking.cpp
Examining data/hyperrogue-11.2b/rogueviz/functions.cpp
Examining data/hyperrogue-11.2b/rogueviz/fundamental.cpp
Examining data/hyperrogue-11.2b/rogueviz/grigorchuk.cpp
Examining data/hyperrogue-11.2b/rogueviz/kohonen.cpp
Examining data/hyperrogue-11.2b/rogueviz/magiccube.cpp
Examining data/hyperrogue-11.2b/rogueviz/newconf.cpp
Examining data/hyperrogue-11.2b/rogueviz/pentagonal.cpp
Examining data/hyperrogue-11.2b/rogueviz/qtm.cpp
Examining data/hyperrogue-11.2b/rogueviz/rogueviz.cpp
Examining data/hyperrogue-11.2b/rogueviz/rogueviz.h
Examining data/hyperrogue-11.2b/rogueviz/staircase.cpp
Examining data/hyperrogue-11.2b/rogueviz/sunflower.cpp
Examining data/hyperrogue-11.2b/rogueviz/video.cpp
Examining data/hyperrogue-11.2b/rug.cpp
Examining data/hyperrogue-11.2b/savemem.cpp
Examining data/hyperrogue-11.2b/savepng.cpp
Examining data/hyperrogue-11.2b/savepng.h
Examining data/hyperrogue-11.2b/scores.cpp
Examining data/hyperrogue-11.2b/screenshot.cpp
Examining data/hyperrogue-11.2b/shaders.cpp
Examining data/hyperrogue-11.2b/shmup.cpp
Examining data/hyperrogue-11.2b/sound.cpp
Examining data/hyperrogue-11.2b/sphere.cpp
Examining data/hyperrogue-11.2b/surface.cpp
Examining data/hyperrogue-11.2b/sysconfig.h
Examining data/hyperrogue-11.2b/system.cpp
Examining data/hyperrogue-11.2b/textures.cpp
Examining data/hyperrogue-11.2b/tour.cpp
Examining data/hyperrogue-11.2b/usershapes.cpp
Examining data/hyperrogue-11.2b/util.cpp
Examining data/hyperrogue-11.2b/yendor.cpp
Examining data/hyperrogue-11.2b/basegraph.cpp
Examining data/hyperrogue-11.2b/hyper.cpp

FINAL RESULTS:

data/hyperrogue-11.2b/debug.cpp:23:5:  [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(args...);
data/hyperrogue-11.2b/devmods/manual-animation.cpp:220:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        system("mkdir addons/possaver/");
data/hyperrogue-11.2b/dialogs.cpp:829:9:  [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.
        sscanf(ne.s.c_str(), LDF, ne.editwhat);
data/hyperrogue-11.2b/history.cpp:431:15:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
              sprintf(buf, "bandmodel-%s-%03d" IMAGEEXT, timebuf, segid++);
data/hyperrogue-11.2b/history.cpp:454:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(buf, "bandmodel-%s-%03d" IMAGEEXT, timebuf, segid++);
data/hyperrogue-11.2b/hprint.cpp:233:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(buf, 1000, fmt, ap);
data/hyperrogue-11.2b/mobile.cpp:31:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf2, " %s (%d)", t.c_str(), items[i]);
data/hyperrogue-11.2b/mobile.cpp:38:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf2, " %s (%d)", t.c_str(), kills[i]);
data/hyperrogue-11.2b/mymake.cpp:48:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
int system(string cmdline) {
data/hyperrogue-11.2b/mymake.cpp:49:10:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  return system(cmdline.c_str());
data/hyperrogue-11.2b/mymake.cpp:53:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  return access(fname.c_str(), F_OK) != -1;
data/hyperrogue-11.2b/mymake.cpp:59:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      system("make -f " + fname + " language-data.cpp autohdr.h savepng-loc.o");
data/hyperrogue-11.2b/mymake.cpp:95:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  system("mkdir -p " + obj_dir);
data/hyperrogue-11.2b/mymake.cpp:117:6:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  if(system(preprocessor + " "+obj_dir+"/hyper.cpp -o "+obj_dir+"/hyper.E")) { printf("preprocessing error\n"); exit(1); }
data/hyperrogue-11.2b/mymake.cpp:132:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if(system(compiler + " -DREM " + obj_dir + "/hyper.cpp -c -o " + obj_dir + "/hyper.o")) { printf("error\n"); exit(1); }
data/hyperrogue-11.2b/mymake.cpp:152:10:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      if(system(compiler + " " + src + " -o " + obj)) { printf("error\n"); exit(1); }
data/hyperrogue-11.2b/mymake.cpp:162:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  system(linker + allobj + libs);
data/hyperrogue-11.2b/netgen.cpp:419:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(buf, "papermodel-page%d%d" IMAGEEXT, iy, ix);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1874:14:  [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.
    shift(); sscanf(argcs(), LDF ",%d", &mul, &N);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1890:14:  [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.
    shift(); sscanf(argcs(), LDF "," LDF, &shft, &mul);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1898:14:  [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.
    shift(); sscanf(argcs(), LDF "," LDF, &period, &start);
data/hyperrogue-11.2b/rogueviz/video.cpp:105:7:  [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(buf, 500, fname.c_str(), i);
data/hyperrogue-11.2b/rogueviz/video.cpp:120: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(buf, 500, fname.c_str(), i);
data/hyperrogue-11.2b/scores.cpp:303:11:  [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(fscanf(f, "%s", buf) <= 0) break;} sc.ver = buf;
data/hyperrogue-11.2b/screenshot.cpp:760: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(buf, 1000, animfile.c_str(), i);
data/hyperrogue-11.2b/system.cpp:964: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, VER);
data/hyperrogue-11.2b/system.cpp:1036:10:  [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(fscanf(f, "%s", buf) <= 0) break;
data/hyperrogue-11.2b/commandline.cpp:54:6:  [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.
  if(getenv("HOME")) {
data/hyperrogue-11.2b/commandline.cpp:55:12:  [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.
    sbuf = getenv("HOME"); sbuf += "/."; sbuf += scorefile;
data/hyperrogue-11.2b/commandline.cpp:56:12:  [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.
    cbuf = getenv("HOME"); cbuf += "/."; cbuf += conffile;
data/hyperrogue-11.2b/racing.cpp:109:8:  [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.
    if(getenv("HOME")) {
data/hyperrogue-11.2b/racing.cpp:110:18:  [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.
      string s = getenv("HOME");
data/hyperrogue-11.2b/sound.cpp:188:27:  [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.
    || loadMusicInfo(s0 + getenv("HOME") + "/.hyperrogue-music.txt")
data/hyperrogue-11.2b/system.cpp:1448: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(time(NULL));
data/hyperrogue-11.2b/achievement.cpp:142: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).
  FILE *f = fopen(scorefile, "at");
data/hyperrogue-11.2b/achievement.cpp:148: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[128]; strftime(buf, 128, "%c", localtime(&timer));
data/hyperrogue-11.2b/basegraph.cpp:615: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 tpix[3000];
data/hyperrogue-11.2b/basegraph.cpp:663: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 str[2]; str[1] = 0;
data/hyperrogue-11.2b/basegraph.cpp:1007: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];
data/hyperrogue-11.2b/cell.cpp:613: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 rpm_memoize[3][256][RANDITER+1];
data/hyperrogue-11.2b/commandline.cpp:80:26:  [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).
  EX int argi() { return atoi(argcs()); }
data/hyperrogue-11.2b/commandline.cpp:170:21:  [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).
        debugfile = fopen(argcs(), "at");  
data/hyperrogue-11.2b/commandline.cpp:176:21:  [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).
        debugfile = fopen(argcs(), "wt");  
data/hyperrogue-11.2b/config.cpp:55:42:  [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).
  void load(const string& s) { val = (T) atoi(s.c_str()); }
data/hyperrogue-11.2b/config.cpp:72:38:  [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).
  void load(const string& s) { val = atoi(s.c_str()); }
data/hyperrogue-11.2b/config.cpp:78:38:  [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).
  void load(const string& s) { val = atoi(s.c_str()); }
data/hyperrogue-11.2b/config.cpp:708: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).
  FILE *f = fopen(conffile, "wt");
data/hyperrogue-11.2b/config.cpp:780: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).
  FILE *f = fopen(conffile, "rt");
data/hyperrogue-11.2b/config.cpp:1245: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 *glyphsortnames[6] = {
data/hyperrogue-11.2b/config.cpp:1255: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 *glyphmodenames[3] = {"letters", "auto", "images"};
data/hyperrogue-11.2b/crystal.cpp:1024: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[20];
data/hyperrogue-11.2b/crystal.cpp:1025: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, "{%d,4}", sides);
data/hyperrogue-11.2b/debug.cpp:358: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[200];
data/hyperrogue-11.2b/debug.cpp:359: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, "%p", what);
data/hyperrogue-11.2b/devmods/edit-shaders.cpp:14: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[1000000];
data/hyperrogue-11.2b/devmods/edit-shaders.cpp:15: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).
  FILE *f = fopen(fname, "rb");
data/hyperrogue-11.2b/devmods/edit-shaders.cpp:22: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).
  FILE *f = fopen(fname, "wb");
data/hyperrogue-11.2b/devmods/solv-table.cpp:187: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).
  FILE *f = fopen(fname, "wb");    
data/hyperrogue-11.2b/devmods/solv-table.cpp:197: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).
  FILE *f = fopen(fname, "rb");    
data/hyperrogue-11.2b/direntx.h:230:5:  [2] (buffer) wchar_t:
  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.
    wchar_t d_name[PATH_MAX+1];
data/hyperrogue-11.2b/direntx.h:270: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 d_name[PATH_MAX+1];
data/hyperrogue-11.2b/direntx.h:680:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wname[PATH_MAX + 1];
data/hyperrogue-11.2b/euclid.cpp:200:11:  [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 *quonames[4] = {"torus", "Klein bottle", "cylinder", "Möbius band"};
data/hyperrogue-11.2b/geom-exp.cpp:915:32:  [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).
  if(numeric) return eGeometry(atoi(ss.c_str()));
data/hyperrogue-11.2b/graph.cpp:6007:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[64];
data/hyperrogue-11.2b/graph.cpp:6008: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.
        sprintf(buf, "%3.1f", float(dist0));
data/hyperrogue-11.2b/help.cpp:502: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[100]; sprintf(buf, " (%d/%d)", current, req);
data/hyperrogue-11.2b/help.cpp:502:18:  [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.
  char buf[100]; sprintf(buf, " (%d/%d)", current, req);
data/hyperrogue-11.2b/help.cpp:802: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[80]; sprintf(buf, " %p H=%d M=%d", c, c->landparam, c->mpdist); out += buf;
data/hyperrogue-11.2b/help.cpp:802:21:  [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.
      char buf[80]; sprintf(buf, " %p H=%d M=%d", c, c->landparam, c->mpdist); out += buf;
data/hyperrogue-11.2b/help.cpp:918:46:  [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).
    dialog::init(help.substr(iv+1, id-iv-1), atoi(help.c_str()+1), 120, 100);
data/hyperrogue-11.2b/history.cpp:99: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[128]; 
data/hyperrogue-11.2b/history.cpp:359: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 timebuf[128]; 
data/hyperrogue-11.2b/history.cpp:430:15:  [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[154];
data/hyperrogue-11.2b/history.cpp:453: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[154];
data/hyperrogue-11.2b/hprint.cpp:35:24:  [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.
EX string its(int i) { char buf[64]; sprintf(buf, "%d", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:35:38:  [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.
EX string its(int i) { char buf[64]; sprintf(buf, "%d", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:37:32:  [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.
EX string itsh8(int i) {static char buf[16]; sprintf(buf, "%08X", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:37:46:  [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.
EX string itsh8(int i) {static char buf[16]; sprintf(buf, "%08X", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:108:59:  [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).
  fhstream(const string pathname, const char *mode) { f = fopen(pathname.c_str(), mode); vernum = VERNUM_HEX; }
data/hyperrogue-11.2b/hprint.cpp:230: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[1000];
data/hyperrogue-11.2b/hprint.cpp:269:38:  [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.
bool scan(fhstream& hs, string& s) { char t[10000]; t[0] = 0; int err = fscanf(hs.f, "%9500s", t); s = t; return err == 1 && t[0]; }
data/hyperrogue-11.2b/hprint.cpp:270:33:  [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.
string scanline(fhstream& hs) { char buf[10000]; buf[0] = 0; ignore(fgets(buf, 10000, hs.f)); return buf; }
data/hyperrogue-11.2b/hprint.cpp:295:25:  [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.
EX string cts(char c) { char buf[8]; buf[0] = c; buf[1] = 0; return buf; }
data/hyperrogue-11.2b/hprint.cpp:302:40:  [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.
EX string itsh(unsigned int i) {static char buf[16]; sprintf(buf, "%03X", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:302:54:  [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.
EX string itsh(unsigned int i) {static char buf[16]; sprintf(buf, "%03X", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:303:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
EX string itsh(int i) {static char buf[16]; sprintf(buf, "%03X", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:303:45:  [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.
EX string itsh(int i) {static char buf[16]; sprintf(buf, "%03X", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:304:32:  [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.
EX string itsh2(int i) {static char buf[16]; sprintf(buf, "%02X", i); return buf; }
data/hyperrogue-11.2b/hprint.cpp:304:46:  [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.
EX string itsh2(int i) {static char buf[16]; sprintf(buf, "%02X", i); return buf; }
data/hyperrogue-11.2b/hyperweb.cpp:65:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    window.open(UTF8ToString($0, 1000));
data/hyperrogue-11.2b/locations.cpp:83: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 bytes[4]; 
data/hyperrogue-11.2b/menus.cpp:348: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 *wdmodes[6] = {"ASCII", "black", "plain", "Escher", "plain/3D", "Escher/3D"};
data/hyperrogue-11.2b/menus.cpp:351: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 *mdmodes[6] = {"ASCII", "items only", "items and monsters", "high contrast",
data/hyperrogue-11.2b/menus.cpp:974: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[128]; 
data/hyperrogue-11.2b/mobile.cpp: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 buf[128]; strftime(buf, 128, "%c", localtime(&timer));
data/hyperrogue-11.2b/mobile.cpp:19: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 buf2[128];
data/hyperrogue-11.2b/multi.cpp:20: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 keyaction[512];
data/hyperrogue-11.2b/multi.cpp:21: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 joyaction[MAXJOY][MAXBUTTON];
data/hyperrogue-11.2b/multi.cpp:22: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 axeaction[MAXJOY][MAXAXE];
data/hyperrogue-11.2b/multi.cpp:23: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 hataction[MAXJOY][MAXHAT][4];
data/hyperrogue-11.2b/multi.cpp:191: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[64];
data/hyperrogue-11.2b/multi.cpp:192: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, " (%d $$$, %d kills, %d deaths)", 
data/hyperrogue-11.2b/multi.cpp:410:15:  [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 *axmodes[5] = {"OFF", "auto", "light", "heavy", "arrows"};
data/hyperrogue-11.2b/netgen.cpp:65: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 patek[MAXCELLS][MAX_EDGE];
data/hyperrogue-11.2b/netgen.cpp:235: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 str[2]; str[0] = c; str[1] = 0;
data/hyperrogue-11.2b/netgen.cpp:418: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[64];
data/hyperrogue-11.2b/nonisotropic.cpp:51: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 *f = fopen(solfname.c_str(), "rb");
data/hyperrogue-11.2b/quit.cpp:26: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[20];
data/hyperrogue-11.2b/quit.cpp:27: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, "%d:%02d", timespent/60, timespent % 60);
data/hyperrogue-11.2b/racing.cpp:165:9:  [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.f = fopen(ghost_filename(seed, mcode).c_str(), "wb");
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:888: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).
  FILE *f = fopen(fname.c_str(), "wt");
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:927: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).
  FILE *f = fopen(fname.c_str(), "wt");
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:940: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).
  FILE *f = fopen(fname.c_str(), "rt");
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:984: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).
  FILE *f = fopen(fname.c_str(), "wb");
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:990: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).
  FILE *f = fopen(fname.c_str(), "rb");
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:1077: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 *f = fopen(fname_classify.c_str(), "wt");  
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:1137: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 *f = fopen(fname_samples.c_str(), "wt");  
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:1169: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).
  FILE *f = fopen(name.c_str(), "wt");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:537: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 *f = fopen(fname.c_str(), "rt");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:589: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 *sagmodes[3] = {"off", "HC", "SA"};
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:813:16:  [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 *sf = fopen(fname.c_str(), "rt");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:913: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 *f = fopen(fname.c_str(), "wt");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1604: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).
  FILE *f = fopen(cfname.c_str(), "rt");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1650: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[600];
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1658: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[600];
data/hyperrogue-11.2b/rogueviz/video.cpp:104: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[500];
data/hyperrogue-11.2b/rogueviz/video.cpp:119: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[500];
data/hyperrogue-11.2b/rogueviz/video.cpp:132:23:  [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.
string its05(int i) { char buf[64]; sprintf(buf, "%05d", i); return buf; }
data/hyperrogue-11.2b/rogueviz/video.cpp:132:37:  [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.
string its05(int i) { char buf[64]; sprintf(buf, "%05d", i); return buf; }
data/hyperrogue-11.2b/scores.cpp:97: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[20];
data/hyperrogue-11.2b/scores.cpp:108: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[128]; strftime(buf, 128, "%c", localtime(&tim));
data/hyperrogue-11.2b/scores.cpp:291: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).
  FILE *f = fopen(scorefile, "rt");
data/hyperrogue-11.2b/scores.cpp:298: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[120];
data/hyperrogue-11.2b/screenshot.cpp:45: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.
    static char buf[10][20];
data/hyperrogue-11.2b/screenshot.cpp:49: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[id], "%d", val); return buf[id];
data/hyperrogue-11.2b/screenshot.cpp:52: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[id], "%.1f", val*1./divby); return buf[id];
data/hyperrogue-11.2b/screenshot.cpp:55: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[id], "%.2f", val*1./divby); return buf[id];
data/hyperrogue-11.2b/screenshot.cpp:62: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.
    static char buf[600];
data/hyperrogue-11.2b/screenshot.cpp:74: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(buf, "style=\"stroke:#%06x;stroke-opacity:%.3" PLDF ";stroke-width:%" PLDF "px;fill:#%06x;fill-opacity:%.3" PLDF "\"",
data/hyperrogue-11.2b/screenshot.cpp:174: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).
    f.f = fopen(fname.c_str(), "wt");
data/hyperrogue-11.2b/screenshot.cpp:185:20:  [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).
      var x=window.open();
data/hyperrogue-11.2b/screenshot.cpp:186:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      x.document.open();
data/hyperrogue-11.2b/screenshot.cpp:759: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[1000];
data/hyperrogue-11.2b/sound.cpp:141: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).
  FILE *f = fopen(dir.c_str(), "rt");
data/hyperrogue-11.2b/sound.cpp:146: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[1000];
data/hyperrogue-11.2b/system.cpp:907: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).
  FILE *f = fopen(scorefile, "at");
data/hyperrogue-11.2b/system.cpp:924: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 sbuf[128]; strftime(sbuf, 128, "%c", localtime(&timerstart));
data/hyperrogue-11.2b/system.cpp:925: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[128]; strftime(buf, 128, "%c", localtime(&timer));
data/hyperrogue-11.2b/system.cpp:1024: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).
  FILE *f = fopen(scorefile, "rt");
data/hyperrogue-11.2b/system.cpp:1032: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[120];
data/hyperrogue-11.2b/system.cpp:1061: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 buf1[80], buf2[80];
data/hyperrogue-11.2b/system.cpp:1070: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 buf1[80], ver[10];
data/hyperrogue-11.2b/system.cpp:1094: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 buf1[80], ver[10];
data/hyperrogue-11.2b/textures.cpp:250: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).
  FILE *f = fopen(tn.c_str(), "rb");
data/hyperrogue-11.2b/textures.cpp:995: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).
  FILE *f = fopen(configname.c_str(), "wt");
data/hyperrogue-11.2b/textures.cpp:1030: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).
  FILE *f = fopen(configname.c_str(), "rt");
data/hyperrogue-11.2b/basegraph.cpp:919: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(str) == 0) return false;
data/hyperrogue-11.2b/basegraph.cpp:1371:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    arg::read(2);
data/hyperrogue-11.2b/basegraph.cpp:1407:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  arg::read(2);
data/hyperrogue-11.2b/commandline.cpp:127:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  EX void read(int phase);
data/hyperrogue-11.2b/commandline.cpp:151:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      for(int i=0; i<int(strlen(DF_KEYS)); i++) {
data/hyperrogue-11.2b/commandline.cpp:343:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  void read(int phase) { 
data/hyperrogue-11.2b/complex.cpp:1196:8:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  bool equal(heptspin h1, heptspin h2, int lev) {
data/hyperrogue-11.2b/complex.cpp:1202:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if(!equal(h11, h21, lev-1)) return false;
data/hyperrogue-11.2b/complex.cpp:1212:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if(hs1.at != hs0.at && equal(hs1, hs0, 3)) {
data/hyperrogue-11.2b/config.cpp:765:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int c = fgetc(f);
data/hyperrogue-11.2b/direntx.h:372:17:  [1] (buffer) wcslen:
  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).
            n = wcslen(dirname);
data/hyperrogue-11.2b/fake-mobile.cpp:57: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(str) == 0) return false;
data/hyperrogue-11.2b/hprint.cpp:57:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  template<class T> void read(T& t) { hread(*this, t); }
data/hyperrogue-11.2b/hprint.cpp:269:73:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
bool scan(fhstream& hs, string& s) { char t[10000]; t[0] = 0; int err = fscanf(hs.f, "%9500s", t); s = t; return err == 1 && t[0]; }
data/hyperrogue-11.2b/hyper-main.cpp:52:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  arg::read(3);
data/hyperrogue-11.2b/mapeditor.cpp:251:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if(f.vernum >= 11008) f.read(ds.zlevel);
data/hyperrogue-11.2b/mapeditor.cpp:253:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(ds.sym); f.read(ds.rots); f.read(ds.color);
data/hyperrogue-11.2b/mapeditor.cpp:253:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(ds.sym); f.read(ds.rots); f.read(ds.color);
data/hyperrogue-11.2b/mapeditor.cpp:253:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(ds.sym); f.read(ds.rots); f.read(ds.color);
data/hyperrogue-11.2b/mapeditor.cpp:272:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(i);
data/hyperrogue-11.2b/mapeditor.cpp:275:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    else if(f.vernum >= 7400) f.read(patterns::whichPattern);
data/hyperrogue-11.2b/mapeditor.cpp:278:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(geometry);
data/hyperrogue-11.2b/mapeditor.cpp:280:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(nbtype);
data/hyperrogue-11.2b/mapeditor.cpp:284:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(gp::param.first);
data/hyperrogue-11.2b/mapeditor.cpp:285:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(gp::param.second);
data/hyperrogue-11.2b/mapeditor.cpp:289:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(torusconfig::qty);
data/hyperrogue-11.2b/mapeditor.cpp:290:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(torusconfig::dx);
data/hyperrogue-11.2b/mapeditor.cpp:291:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(torusconfig::dy);
data/hyperrogue-11.2b/mapeditor.cpp:293:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          f.read(torusconfig::sdx);
data/hyperrogue-11.2b/mapeditor.cpp:294:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          f.read(torusconfig::sdy);
data/hyperrogue-11.2b/mapeditor.cpp:295:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          f.read(torusconfig::torus_mode);
data/hyperrogue-11.2b/mapeditor.cpp:302:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(sides);
data/hyperrogue-11.2b/mapeditor.cpp:309:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          f.read(vertices);          
data/hyperrogue-11.2b/mapeditor.cpp:320:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(quotient_field_changed);
data/hyperrogue-11.2b/mapeditor.cpp:322:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          f.read(current_extra);
data/hyperrogue-11.2b/mapeditor.cpp:323:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          f.read(fgeomextras[current_extra].current_prime_id);
data/hyperrogue-11.2b/mapeditor.cpp:350:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(safety);
data/hyperrogue-11.2b/mapeditor.cpp:352:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(b); if(b) autocheat = true;
data/hyperrogue-11.2b/mapeditor.cpp:353:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(gen_wandering);
data/hyperrogue-11.2b/mapeditor.cpp:354:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(reptilecheat);
data/hyperrogue-11.2b/mapeditor.cpp:355:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(timerghost);
data/hyperrogue-11.2b/mapeditor.cpp:356:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(patterns::canvasback);
data/hyperrogue-11.2b/mapeditor.cpp:357:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(patterns::whichShape);
data/hyperrogue-11.2b/mapeditor.cpp:358:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(patterns::subpattern_flags);
data/hyperrogue-11.2b/mapeditor.cpp:359:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(patterns::whichCanvas);
data/hyperrogue-11.2b/mapeditor.cpp:360:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(patterns::displaycodes);
data/hyperrogue-11.2b/mapeditor.cpp:361:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(mapeditor::drawplayer);
data/hyperrogue-11.2b/mapeditor.cpp:362:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if(patterns::whichCanvas == 'f') f.read(patterns::color_formula);
data/hyperrogue-11.2b/mapeditor.cpp:365:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(i); if(i > ittypes || i < 0) throw hstream_exception();
data/hyperrogue-11.2b/mapeditor.cpp:366:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      for(int k=0; k<i; k++) f.read(items[k]);
data/hyperrogue-11.2b/mapeditor.cpp:367:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(i); if(i > motypes || i < 0) throw hstream_exception();
data/hyperrogue-11.2b/mapeditor.cpp:368:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      for(int k=0; k<i; k++) f.read(kills[k]);    
data/hyperrogue-11.2b/mapeditor.cpp:403:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(tortoise::emap[c]);
data/hyperrogue-11.2b/mapeditor.cpp:409:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(tortoise::babymap[c]);
data/hyperrogue-11.2b/mapeditor.cpp:415:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f.read(z);
data/hyperrogue-11.2b/mapeditor.cpp:418:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      else f.read(c->wparam);
data/hyperrogue-11.2b/mapeditor.cpp:419:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(c->landparam);
data/hyperrogue-11.2b/mapeditor.cpp:461:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if(f.vernum >= 0xA616) { f.read(vid.always3); geom3::apply_always3(); }
data/hyperrogue-11.2b/mapeditor.cpp:466:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(mutantphase);
data/hyperrogue-11.2b/mapeditor.cpp:467:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(rosewave);
data/hyperrogue-11.2b/mapeditor.cpp:468:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(rosephase);
data/hyperrogue-11.2b/mapeditor.cpp:469:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(turncount);
data/hyperrogue-11.2b/mapeditor.cpp:470:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int i; f.read(i);
data/hyperrogue-11.2b/mapeditor.cpp:473:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int cid; int val; f.read(cid); f.read(val); 
data/hyperrogue-11.2b/mapeditor.cpp:473:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int cid; int val; f.read(cid); f.read(val); 
data/hyperrogue-11.2b/mapeditor.cpp:476:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(multi::players);
data/hyperrogue-11.2b/mapeditor.cpp:533:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    f.read(f.vernum);
data/hyperrogue-11.2b/mapeditor.cpp:538:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      f.read(ds);
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:97:5:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    fgetc(f.f);
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:99:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int c = fgetc(f.f);
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:949:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int c = fgetc(f);
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:1282:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  f.read(columns);
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:1284:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for(int i=0; i<columns; i++) f.read(colnames[i]);
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:1305:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    f.read(d.name);
data/hyperrogue-11.2b/rogueviz/kohonen.cpp:1321:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    f.read(et->color);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:417:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  void read(string fn, bool subdiv, bool doRebase, bool doStore) {
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:505:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int c = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:514:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int c = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:532:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  void read(string fn) {
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:539:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if(fgetc(f) != '(') {
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:818:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = fgetc(sf);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:963:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = fgetc(f.f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:970:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = fgetc(f.f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:988:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  void read(string fn) {
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1609:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int c = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1617:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int c2 = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1623:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c2 = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1629:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c2 = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1633:52:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while(c2 != 10 && c2 != 13 && c2 != -1) c2 = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1639:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = fgetc(f);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1651:17:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      int err = fscanf(f, "%500s", buf);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1659:17:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      int err = fscanf(f, "%500s", buf);
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1768:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    PHASE(3); shift(); tree::read(args());
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1803:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    shift(); sag::read(args());
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:1829:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    PHASE(3); shift(); anygraph::read(args());
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:2242:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      rogueviz::sag::read(RVPATH "roguelikes/edges.csv");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:2262:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      rogueviz::sag::read(RVPATH "lang/edges.csv");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:2283:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      rogueviz::sag::read(RVPATH "boardgames/edges.csv");
data/hyperrogue-11.2b/rogueviz/rogueviz.cpp:2302:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      rogueviz::tree::read(RVPATH "treeoflife/tol.txt");
data/hyperrogue-11.2b/rogueviz/rogueviz.h:74:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(string fn, bool subdiv = true, bool doRebase = true, bool doStore = true);
data/hyperrogue-11.2b/rogueviz/rogueviz.h:119:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  namespace tree { void read(string fn); }
data/hyperrogue-11.2b/rogueviz/rogueviz.h:121:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(string fn);  
data/hyperrogue-11.2b/system.cpp:1062:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      sscanf(buf, "%70s%70s", buf1, buf2);
data/hyperrogue-11.2b/system.cpp:1073:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      sscanf(buf, "%70s%10s%d%d%d%d%d%d%d%d",
data/hyperrogue-11.2b/system.cpp:1096:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      sscanf(buf, "%70s%10s%d%d%d%d%d%d%d%d",
data/hyperrogue-11.2b/system.cpp:1446:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  arg::read(1);

ANALYSIS SUMMARY:

Hits = 263
Lines analyzed = 153572 in approximately 6.15 seconds (24970 lines/second)
Physical Source Lines of Code (SLOC) = 121630
Hits@level = [0] 695 [1] 106 [2] 123 [3]   7 [4]  27 [5]   0
Hits@level+ = [0+] 958 [1+] 263 [2+] 157 [3+]  34 [4+]  27 [5+]   0
Hits/KSLOC@level+ = [0+] 7.87635 [1+] 2.1623 [2+] 1.2908 [3+] 0.279536 [4+] 0.221985 [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.