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/sgt-puzzles-20191231.79a5378/blackbox.c
Examining data/sgt-puzzles-20191231.79a5378/combi.c
Examining data/sgt-puzzles-20191231.79a5378/cube.c
Examining data/sgt-puzzles-20191231.79a5378/divvy.c
Examining data/sgt-puzzles-20191231.79a5378/dominosa.c
Examining data/sgt-puzzles-20191231.79a5378/drawing.c
Examining data/sgt-puzzles-20191231.79a5378/dsf.c
Examining data/sgt-puzzles-20191231.79a5378/emcc.c
Examining data/sgt-puzzles-20191231.79a5378/fifteen.c
Examining data/sgt-puzzles-20191231.79a5378/filling.c
Examining data/sgt-puzzles-20191231.79a5378/findloop.c
Examining data/sgt-puzzles-20191231.79a5378/flip.c
Examining data/sgt-puzzles-20191231.79a5378/flood.c
Examining data/sgt-puzzles-20191231.79a5378/galaxies.c
Examining data/sgt-puzzles-20191231.79a5378/grid.c
Examining data/sgt-puzzles-20191231.79a5378/grid.h
Examining data/sgt-puzzles-20191231.79a5378/guess.c
Examining data/sgt-puzzles-20191231.79a5378/inertia.c
Examining data/sgt-puzzles-20191231.79a5378/keen.c
Examining data/sgt-puzzles-20191231.79a5378/latin.c
Examining data/sgt-puzzles-20191231.79a5378/latin.h
Examining data/sgt-puzzles-20191231.79a5378/laydomino.c
Examining data/sgt-puzzles-20191231.79a5378/lightup.c
Examining data/sgt-puzzles-20191231.79a5378/loopgen.c
Examining data/sgt-puzzles-20191231.79a5378/loopgen.h
Examining data/sgt-puzzles-20191231.79a5378/loopy.c
Examining data/sgt-puzzles-20191231.79a5378/magnets.c
Examining data/sgt-puzzles-20191231.79a5378/malloc.c
Examining data/sgt-puzzles-20191231.79a5378/map.c
Examining data/sgt-puzzles-20191231.79a5378/matching.c
Examining data/sgt-puzzles-20191231.79a5378/matching.h
Examining data/sgt-puzzles-20191231.79a5378/midend.c
Examining data/sgt-puzzles-20191231.79a5378/mines.c
Examining data/sgt-puzzles-20191231.79a5378/misc.c
Examining data/sgt-puzzles-20191231.79a5378/nestedvm.c
Examining data/sgt-puzzles-20191231.79a5378/net.c
Examining data/sgt-puzzles-20191231.79a5378/netslide.c
Examining data/sgt-puzzles-20191231.79a5378/no-icon.c
Examining data/sgt-puzzles-20191231.79a5378/nullfe.c
Examining data/sgt-puzzles-20191231.79a5378/nullgame.c
Examining data/sgt-puzzles-20191231.79a5378/obfusc.c
Examining data/sgt-puzzles-20191231.79a5378/palisade.c
Examining data/sgt-puzzles-20191231.79a5378/pegs.c
Examining data/sgt-puzzles-20191231.79a5378/penrose.c
Examining data/sgt-puzzles-20191231.79a5378/penrose.h
Examining data/sgt-puzzles-20191231.79a5378/printing.c
Examining data/sgt-puzzles-20191231.79a5378/ps.c
Examining data/sgt-puzzles-20191231.79a5378/puzzles.h
Examining data/sgt-puzzles-20191231.79a5378/random.c
Examining data/sgt-puzzles-20191231.79a5378/range.c
Examining data/sgt-puzzles-20191231.79a5378/rect.c
Examining data/sgt-puzzles-20191231.79a5378/resource.h
Examining data/sgt-puzzles-20191231.79a5378/samegame.c
Examining data/sgt-puzzles-20191231.79a5378/signpost.c
Examining data/sgt-puzzles-20191231.79a5378/singles.c
Examining data/sgt-puzzles-20191231.79a5378/sixteen.c
Examining data/sgt-puzzles-20191231.79a5378/solo.c
Examining data/sgt-puzzles-20191231.79a5378/sort.c
Examining data/sgt-puzzles-20191231.79a5378/tdq.c
Examining data/sgt-puzzles-20191231.79a5378/tents.c
Examining data/sgt-puzzles-20191231.79a5378/tracks.c
Examining data/sgt-puzzles-20191231.79a5378/tree234.c
Examining data/sgt-puzzles-20191231.79a5378/tree234.h
Examining data/sgt-puzzles-20191231.79a5378/twiddle.c
Examining data/sgt-puzzles-20191231.79a5378/undead.c
Examining data/sgt-puzzles-20191231.79a5378/unequal.c
Examining data/sgt-puzzles-20191231.79a5378/unfinished/group.c
Examining data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c
Examining data/sgt-puzzles-20191231.79a5378/unfinished/path.c
Examining data/sgt-puzzles-20191231.79a5378/unfinished/separate.c
Examining data/sgt-puzzles-20191231.79a5378/unfinished/slide.c
Examining data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c
Examining data/sgt-puzzles-20191231.79a5378/untangle.c
Examining data/sgt-puzzles-20191231.79a5378/windows.c
Examining data/sgt-puzzles-20191231.79a5378/version.h
Examining data/sgt-puzzles-20191231.79a5378/pearl.c
Examining data/sgt-puzzles-20191231.79a5378/towers.c
Examining data/sgt-puzzles-20191231.79a5378/gtk.c
Examining data/sgt-puzzles-20191231.79a5378/slant.c
Examining data/sgt-puzzles-20191231.79a5378/version.c
Examining data/sgt-puzzles-20191231.79a5378/unruly.c
Examining data/sgt-puzzles-20191231.79a5378/bridges.c
Examining data/sgt-puzzles-20191231.79a5378/pattern.c

FINAL RESULTS:

data/sgt-puzzles-20191231.79a5378/blackbox.c:1321:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(str, "%s", reflect ? "R" : "H");
data/sgt-puzzles-20191231.79a5378/blackbox.c:1457:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(buf + strlen(buf), " (%d error%s)",
data/sgt-puzzles-20191231.79a5378/bridges.c:667:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s", ret->w, ret->h,
data/sgt-puzzles-20191231.79a5378/bridges.c:728:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, "%dx%di%de%dm%d%sd%d",
data/sgt-puzzles-20191231.79a5378/bridges.c:733:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, "%dx%dm%d%s", params->w, params->h,
data/sgt-puzzles-20191231.79a5378/bridges.c:872:5:  [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).
    strcpy(move + movelen, buf);                        \
data/sgt-puzzles-20191231.79a5378/cube.c:1691:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(statusbuf, "%sMoves: %d",
data/sgt-puzzles-20191231.79a5378/dominosa.c:155:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "Order %d, %s", params->n, dominosa_diffnames[params->diff]);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2580:13:  [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).
            strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2615:6:  [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).
	    strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/emcc.c:133:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), fmt, ap);
data/sgt-puzzles-20191231.79a5378/emcc.c:144:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf, sizeof(buf), fmt, ap);
data/sgt-puzzles-20191231.79a5378/emcc.c:393:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fontstyle, "%dpx %s", fontsize,
data/sgt-puzzles-20191231.79a5378/fifteen.c:263:9:  [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).
        strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/fifteen.c:418:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, "%*s", col, "");
data/sgt-puzzles-20191231.79a5378/fifteen.c:1040:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(statusbuf, "%sMoves: %d",
data/sgt-puzzles-20191231.79a5378/filling.c:76:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(fmt, va);
data/sgt-puzzles-20191231.79a5378/filling.c:1539:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buf, "%s%d", move ? "," : "", i);
data/sgt-puzzles-20191231.79a5378/filling.c:1542:21:  [4] (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).
                    strcat(move, buf);
data/sgt-puzzles-20191231.79a5378/filling.c:1545:21:  [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).
                    strcpy(move, buf);
data/sgt-puzzles-20191231.79a5378/filling.c:1554:9:  [4] (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).
        strcat(move, buf);
data/sgt-puzzles-20191231.79a5378/flip.c:97:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%dx%d %s", ret->w, ret->h,
data/sgt-puzzles-20191231.79a5378/flip.c:139:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(data, "%dx%d%s", params->w, params->h,
data/sgt-puzzles-20191231.79a5378/flip.c:588:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(ret, "%s,%s", mbmp, gbmp);
data/sgt-puzzles-20191231.79a5378/flip.c:1268:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%sMoves: %d",
data/sgt-puzzles-20191231.79a5378/flood.c:289:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(titlefmt, ap);
data/sgt-puzzles-20191231.79a5378/flood.c:310:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(titlefmt, ap);
data/sgt-puzzles-20191231.79a5378/flood.c:1261:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(status, "%s%d / %d moves",
data/sgt-puzzles-20191231.79a5378/galaxies.c:53:51:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define solvep(x) do { if (solver_show_working) { printf x; } } while(0)
data/sgt-puzzles-20191231.79a5378/galaxies.c:185:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s", ret->w, ret->h,
data/sgt-puzzles-20191231.79a5378/galaxies.c:713:31:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                        len = sprintf(buf, "%s%c%d,%d,%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/galaxies.c:717:27:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    len = sprintf(buf, "%sU%d,%d", sep, x, y);
data/sgt-puzzles-20191231.79a5378/galaxies.c:720:27:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    len = sprintf(buf, "%s%c%d,%d,%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/galaxies.c:725:27:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    len = sprintf(buf, "%sE%d,%d", sep, x, y);
data/sgt-puzzles-20191231.79a5378/galaxies.c:732:17:  [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).
                strcpy(move + movelen, buf);
data/sgt-puzzles-20191231.79a5378/galaxies.c:2604:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(buf + strlen(buf), "%sU%d,%d", sep, ui->srcx, ui->srcy);
data/sgt-puzzles-20191231.79a5378/galaxies.c:2623:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf + strlen(buf), "%sA%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/galaxies.c:2652:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buf, "%sU%d,%d", sep, ui->srcx, ui->srcy);
data/sgt-puzzles-20191231.79a5378/galaxies.c:2656:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buf + strlen(buf), "%sA%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/galaxies.c:3448:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buf, "Puzzle is %s.", galaxies_diffnames[state->cdiff]);
data/sgt-puzzles-20191231.79a5378/gtk.c:112:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buf, fmt, ap);
data/sgt-puzzles-20191231.79a5378/gtk.c:129:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/sgt-puzzles-20191231.79a5378/gtk.c:2988:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/sgt-puzzles/help/%.*s/%s.html",
data/sgt-puzzles-20191231.79a5378/gtk.c:2990:6:  [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.
	if (access(path, R_OK) == 0)
data/sgt-puzzles-20191231.79a5378/gtk.c:3471:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(item, "Help on %s", thegame.name);
data/sgt-puzzles-20191231.79a5378/gtk.c:3935:7:  [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).
		    strcpy(pstr, arg);
data/sgt-puzzles-20191231.79a5378/gtk.c:4019:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(realname, "%s%d%s", savefile, i, savesuffix);
data/sgt-puzzles-20191231.79a5378/guess.c:152:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(data, "c%dp%dg%d%s%s",
data/sgt-puzzles-20191231.79a5378/guess.c:456:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        p += sprintf(p, "%s%d%s", sep, ui->curr_pegs->pegs[i],
data/sgt-puzzles-20191231.79a5378/guess.c:631:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	p += sprintf(p, "%s%d%s", sep, ui->curr_pegs->pegs[i],
data/sgt-puzzles-20191231.79a5378/inertia.c:1456:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(board, "%*s+\n", len - 2, "");
data/sgt-puzzles-20191231.79a5378/keen.c:119:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s%s", ret->w, ret->w, keen_diffnames[ret->diff],
data/sgt-puzzles-20191231.79a5378/keen.c:171:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(ret + strlen(ret), "d%c%s", keen_diffchars[params->diff],
data/sgt-puzzles-20191231.79a5378/keen.c:472:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(prefix, "%*susing clue at (%d,%d):\n",
data/sgt-puzzles-20191231.79a5378/keen.c:500:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(prefix, "%*susing clue at (%d,%d):\n",
data/sgt-puzzles-20191231.79a5378/keen.c:515:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(prefix2, "%*s  this clue requires %d in"
data/sgt-puzzles-20191231.79a5378/keen.c:1919:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (str, "%ld%s", clueval,
data/sgt-puzzles-20191231.79a5378/keen.c:2326:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf (str, "%ld%s", clueval,
data/sgt-puzzles-20191231.79a5378/latin.c:113:17:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/latin.c:129:6:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/latin.c:254:7:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/latin.c:298:41:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                                        vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/lightup.c:63:18:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define debug(x) printf x
data/sgt-puzzles-20191231.79a5378/lightup.c:219:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s",
data/sgt-puzzles-20191231.79a5378/lightup.c:1751:17:  [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).
                strcpy(move + movelen, buf);
data/sgt-puzzles-20191231.79a5378/loopy.c:573:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s - %s", params->h, params->w,
data/sgt-puzzles-20191231.79a5378/loopy.c:1467:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(retval, "%s%c%s", grid_desc, (int)GRID_DESC_SEP, game_desc);
data/sgt-puzzles-20191231.79a5378/magnets.c:128:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s%s",
data/sgt-puzzles-20191231.79a5378/magnets.c:181:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf + strlen(buf), "d%c%s",
data/sgt-puzzles-20191231.79a5378/magnets.c:1430:5:  [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).
    strcpy(ret + retlen, buf); \
data/sgt-puzzles-20191231.79a5378/malloc.c:51:5:  [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).
    strcpy(r,s);
data/sgt-puzzles-20191231.79a5378/map.c:145:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%dx%d, %d regions, %s", ret->w, ret->h, ret->n,
data/sgt-puzzles-20191231.79a5378/map.c:928:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += sprintf(p, "%s%c", sep, colnames[i]);
data/sgt-puzzles-20191231.79a5378/map.c:1503:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            len = sprintf(buf, "%s%d:%d", i ? ";" : "S;", colouring[i], i);
data/sgt-puzzles-20191231.79a5378/map.c:1508:13:  [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).
            strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/map.c:2244:13:  [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).
            strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/midend.c:142:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s_TILESIZE", me->ourgame->name);
data/sgt-puzzles-20191231.79a5378/midend.c:185:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, "%s_DEFAULT", me->ourgame->name);
data/sgt-puzzles-20191231.79a5378/midend.c:1219:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buf, "%s_COLOUR_%d", me->ourgame->name, i);
data/sgt-puzzles-20191231.79a5378/midend.c:1409:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, "%s_PRESETS", me->ourgame->name);
data/sgt-puzzles-20191231.79a5378/midend.c:1490:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(titlebuf, "%s configuration", me->ourgame->name);
data/sgt-puzzles-20191231.79a5378/midend.c:1499:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(titlebuf, "%s %s selection", me->ourgame->name,
data/sgt-puzzles-20191231.79a5378/midend.c:1529:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(ret[0].u.string.sval, "%s%c%s", parstr, sep, rest);
data/sgt-puzzles-20191231.79a5378/midend.c:1739:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(ret, "%s:%s", parstr, me->desc);
data/sgt-puzzles-20191231.79a5378/midend.c:1754:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(ret, "%s#%s", parstr, me->seedstr);
data/sgt-puzzles-20191231.79a5378/midend.c:1902:2:  [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).
	strcpy(ret, timebuf);
data/sgt-puzzles-20191231.79a5378/midend.c:1903:2:  [4] (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).
	strcat(ret, text);
data/sgt-puzzles-20191231.79a5378/midend.c:1934:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(hbuf, "%s:%d:", lbuf, (int)strlen(str)); \
data/sgt-puzzles-20191231.79a5378/mines.c:1861:15:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    p = ret + sprintf(ret, "%d,%d,%s", x, y,
data/sgt-puzzles-20191231.79a5378/mines.c:1985:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(desc, "r%d,%c,%s", params->n, (char)(params->unique ? 'u' : 'a'), rsdesc);
data/sgt-puzzles-20191231.79a5378/mines.c:2575:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				p += sprintf(p, "%sO%d,%d", sep, cx+dx, cy+dy);
data/sgt-puzzles-20191231.79a5378/nestedvm.c:25:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/sgt-puzzles-20191231.79a5378/net.c:193:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%dx%d%s", ret->width, ret->height,
data/sgt-puzzles-20191231.79a5378/netslide.c:188:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%dx%d%s", ret->width, ret->height, netslide_presets[i].desc);
data/sgt-puzzles-20191231.79a5378/netslide.c:1781:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(statusbuf, "%sMoves: %d",
data/sgt-puzzles-20191231.79a5378/nullfe.c:60:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/sgt-puzzles-20191231.79a5378/nullfe.c:72:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stdout, fmt, ap);
data/sgt-puzzles-20191231.79a5378/palisade.c:39:9:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    m = vsprintf(snewa(ret, n + 1), fmt, va);
data/sgt-puzzles-20191231.79a5378/pattern.c:1152:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(board, "%*s\n", len - 2, "");
data/sgt-puzzles-20191231.79a5378/pearl.c:169:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s",
data/sgt-puzzles-20191231.79a5378/pearl.c:221:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf + strlen(buf), "d%c%s",
data/sgt-puzzles-20191231.79a5378/pearl.c:2129:30:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    tmplen = sprintf(tmpbuf, "%sF%d,%d,%d;F%d,%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/pearl.c:2135:21:  [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).
                    strcpy(buf + buflen, tmpbuf);
data/sgt-puzzles-20191231.79a5378/pegs.c:91:5:  [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).
    strcpy(str, pegs_titletypes[ret->type]);
data/sgt-puzzles-20191231.79a5378/pegs.c:139:2:  [4] (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).
	strcat(str, pegs_lowertypes[params->type]);
data/sgt-puzzles-20191231.79a5378/ps.c:27:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(ps->fp, fmt, ap);
data/sgt-puzzles-20191231.79a5378/range.c:73:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(ret, fmt, va);
data/sgt-puzzles-20191231.79a5378/rect.c:2088:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		    sprintf(buf, "%*s", col, "");
data/sgt-puzzles-20191231.79a5378/samegame.c:228:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(ret, "%dx%dc%ds%d%s",
data/sgt-puzzles-20191231.79a5378/samegame.c:937:2:  [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).
	strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/samegame.c:1127:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(buf, "%s%d", sep, i);
data/sgt-puzzles-20191231.79a5378/samegame.c:1133:6:  [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).
	    strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/samegame.c:1590:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(status, "COMPLETE! %s", score);
data/sgt-puzzles-20191231.79a5378/samegame.c:1592:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(status, "Cannot move! %s", score);
data/sgt-puzzles-20191231.79a5378/samegame.c:1594:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(status, "%s  Selected: %d (%d)",
data/sgt-puzzles-20191231.79a5378/samegame.c:1597:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(status, "%s", score);
data/sgt-puzzles-20191231.79a5378/signpost.c:333:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d%s", ret->w, ret->h,
data/sgt-puzzles-20191231.79a5378/signpost.c:374:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(data, "%dx%d%s", params->w, params->h,
data/sgt-puzzles-20191231.79a5378/signpost.c:571:9:  [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).
        strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/singles.c:162:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s", ret->w, ret->h, singles_diffnames[ret->diff]);
data/sgt-puzzles-20191231.79a5378/singles.c:593:17:  [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).
                strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/sixteen.c:389:9:  [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).
        strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/sixteen.c:1121:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(statusbuf, "%sMoves: %d",
data/sgt-puzzles-20191231.79a5378/slant.c:128:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%dx%d %s", ret->w, ret->h, slant_diffnames[ret->diff]);
data/sgt-puzzles-20191231.79a5378/slant.c:434:17:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                vprintf(reason, ap);
data/sgt-puzzles-20191231.79a5378/slant.c:1516:3:  [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).
		strcpy(move + movelen, buf);
data/sgt-puzzles-20191231.79a5378/solo.c:838:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf,3,4)));
data/sgt-puzzles-20191231.79a5378/solo.c:841:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf,4,5)));
data/sgt-puzzles-20191231.79a5378/solo.c:845:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf,4,5)));
data/sgt-puzzles-20191231.79a5378/solo.c:884:17:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/solo.c:899:6:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/solo.c:957:21:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                    vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/solo.c:1028:17:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/solo.c:1108:7:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/solo.c:1151:41:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                                        vprintf(fmt, ap);
data/sgt-puzzles-20191231.79a5378/solo.c:3216:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	p += sprintf(p, "%s%d", sep, grid[i]);
data/sgt-puzzles-20191231.79a5378/tents.c:315:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%dx%d %s", ret->w, ret->h, tents_diffnames[ret->diff]);
data/sgt-puzzles-20191231.79a5378/tents.c:1377:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(board, "%*s\n", len - 2, "");
data/sgt-puzzles-20191231.79a5378/tents.c:1619:30:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    tmplen = sprintf(tmpbuf, "%s%c%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/tents.c:1630:21:  [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).
                    strcpy(buf+buflen, tmpbuf);
data/sgt-puzzles-20191231.79a5378/tents.c:1658:28:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    len += sprintf(tmpbuf + len, "%sN%d,%d", len ? ";" : "",
data/sgt-puzzles-20191231.79a5378/towers.c:154:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s", ret->w, ret->w, towers_diffnames[ret->diff]);
data/sgt-puzzles-20191231.79a5378/towers.c:343:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(prefix, "%*sclue %s %d is nearly filled:\n",
data/sgt-puzzles-20191231.79a5378/towers.c:389:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(prefix, "%*slower bounds for clue %s %d:\n",
data/sgt-puzzles-20191231.79a5378/towers.c:533:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(prefix, "%*sexhaustive analysis of clue %s %d:\n",
data/sgt-puzzles-20191231.79a5378/tracks.c:85:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%dx%d %s", ret->w, ret->h, tracks_diffnames[ret->diff]);
data/sgt-puzzles-20191231.79a5378/tracks.c:136:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf + strlen(buf), "d%c%s",
data/sgt-puzzles-20191231.79a5378/tracks.c:774:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        p += sprintf(p, ",%s%d", x == state->numbers->col_s ? "S" : "",
data/sgt-puzzles-20191231.79a5378/tracks.c:778:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        p += sprintf(p, ",%s%d", y == state->numbers->row_s ? "S" : "",
data/sgt-puzzles-20191231.79a5378/tracks.c:1346:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                p += sprintf(p, "%s%c%c%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/tracks.c:1351:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                p += sprintf(p, "%s%c%c%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/tracks.c:1358:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += sprintf(p, "%s%cS%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/tracks.c:1363:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += sprintf(p, "%s%cS%d,%d", sep,
data/sgt-puzzles-20191231.79a5378/tree234.c:37:17:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define LOG(x) (printf x)
data/sgt-puzzles-20191231.79a5378/tree234.c:1493:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stdout, fmt, ap);
data/sgt-puzzles-20191231.79a5378/tree234.c:1521:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    len = sprintf(ctx->levels[0]+xpos, " %s%s%s",
data/sgt-puzzles-20191231.79a5378/tree234.c:1524:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    len = sprintf(ctx->levels[0]+xpos, " %s%s",
data/sgt-puzzles-20191231.79a5378/tree234.c:1527:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    len = sprintf(ctx->levels[0]+xpos, " %s",
data/sgt-puzzles-20191231.79a5378/tree234.c:1563:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    x += sprintf(ctx->levels[level]+x, ".%s.%s.%s.",
data/sgt-puzzles-20191231.79a5378/tree234.c:1566:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    x += sprintf(ctx->levels[level]+x, ".%s.%s.",
data/sgt-puzzles-20191231.79a5378/tree234.c:1569:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    x += sprintf(ctx->levels[level]+x, ".%s.",
data/sgt-puzzles-20191231.79a5378/twiddle.c:140:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%dn%d%s%s", params->w, params->h, params->n,
data/sgt-puzzles-20191231.79a5378/twiddle.c:416:9:  [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).
        strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/twiddle.c:1258:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(statusbuf, "%sMoves: %d",
data/sgt-puzzles-20191231.79a5378/undead.c:105:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s",
data/sgt-puzzles-20191231.79a5378/undead.c:1618:41:  [4] (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).
                sprintf(buf,"%2d", c);  strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1620:37:  [4] (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).
                sprintf(buf," \\"); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1622:36:  [4] (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).
                sprintf(buf," /"); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1625:55:  [4] (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).
                if (g == 1)      { sprintf(buf," G"); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1626:55:  [4] (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).
                else if (g == 2) { sprintf(buf," V"); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1627:55:  [4] (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).
                else if (g == 4) { sprintf(buf," Z"); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1628:55:  [4] (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).
                else             { sprintf(buf," ."); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1630:36:  [4] (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).
                sprintf(buf,"  "); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1633:28:  [4] (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).
        sprintf(buf,"\n"); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/unequal.c:146:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%s: %dx%d %s",
data/sgt-puzzles-20191231.79a5378/unequal.c:1188:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            k = sprintf(buf, "%d%s%s%s%s,",
data/sgt-puzzles-20191231.79a5378/unequal.c:1196:13:  [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).
            strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/unequal.c:2095:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buf, fmt, ap);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:147:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s%s", ret->w, ret->w, group_diffnames[ret->diff],
data/sgt-puzzles-20191231.79a5378/unfinished/path.c:780:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:2269:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(statusbuf, "%sMoves: %d",
data/sgt-puzzles-20191231.79a5378/unruly.c:170:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%dx%d %s", ret->w2, ret->h2, unruly_diffnames[ret->diff]);
data/sgt-puzzles-20191231.79a5378/untangle.c:681:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    k += sprintf(ret + k, "%s%d-%d", sep, ea[i].a, ea[i].b);
data/sgt-puzzles-20191231.79a5378/untangle.c:1017:9:  [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).
        strcpy(ret + retlen, buf);
data/sgt-puzzles-20191231.79a5378/windows.c:269:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buf, fmt, ap);
data/sgt-puzzles-20191231.79a5378/windows.c:606:9:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
        wcscpy(lf.lfFaceName, TEXT("Tahoma"));
data/sgt-puzzles-20191231.79a5378/windows.c:1074:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(doctitle, "Printed puzzles from %s (from Simon Tatham's"
data/sgt-puzzles-20191231.79a5378/windows.c:1190:5:  [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).
    strcpy(r, CHM_FILE_NAME);
data/sgt-puzzles-20191231.79a5378/windows.c:1214:5:  [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).
    strcpy(r, HELP_FILE_NAME);
data/sgt-puzzles-20191231.79a5378/windows.c:1224:2:  [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).
	strcpy(r, HELP_CNT_NAME);
data/sgt-puzzles-20191231.79a5378/windows.c:1253:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(str, "JI(`',`%s')", topic);
data/sgt-puzzles-20191231.79a5378/windows.c:1269:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(str, "%s::/%s.html>main", help_path, topic);
data/sgt-puzzles-20191231.79a5378/windows.c:1648:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(*error, "Supplied argument \"%s\" is neither a"
data/sgt-puzzles-20191231.79a5378/windows.c:1942:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(item, "&Help on %s", fe->game->name);
data/sgt-puzzles-20191231.79a5378/windows.c:1983:5:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
    wcscpy(lf.lfFaceName, TEXT("Tahoma"));
data/sgt-puzzles-20191231.79a5378/windows.c:2061:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(*wintitle, "%s print setup", fe->game->name);
data/sgt-puzzles-20191231.79a5378/fifteen.c:705:25:  [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.
            char *env = getenv("FIFTEEN_INVERT_CURSOR");
data/sgt-puzzles-20191231.79a5378/flood.c:235:32:  [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.
        const char *depthstr = getenv("FLOOD_DEPTH");
data/sgt-puzzles-20191231.79a5378/grid.c:232:17:  [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.
    char *svg = getenv("PUZZLES_SVG_GRID");
data/sgt-puzzles-20191231.79a5378/gtk.c:3009:13:  [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.
		command = getenv(buf + 1);
data/sgt-puzzles-20191231.79a5378/lightup.c:2146:15:  [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.
		char *env = getenv("LIGHTUP_LIT_BLOBS");
data/sgt-puzzles-20191231.79a5378/loopgen.c:28:19:  [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.
    unsigned long random;
data/sgt-puzzles-20191231.79a5378/loopgen.c:51:13:  [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.
    if (f1->random < f2->random)
data/sgt-puzzles-20191231.79a5378/loopgen.c:51:26:  [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.
    if (f1->random < f2->random)
data/sgt-puzzles-20191231.79a5378/loopgen.c:53: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.
    else if (f1->random > f2->random)
data/sgt-puzzles-20191231.79a5378/loopgen.c:53:31:  [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.
    else if (f1->random > f2->random)
data/sgt-puzzles-20191231.79a5378/loopy.c:3026:31:  [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.
            const char *env = getenv("LOOPY_AUTOFOLLOW");
data/sgt-puzzles-20191231.79a5378/loopy.c:3288: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.
	    char *env = getenv("LOOPY_FAINT_LINES");
data/sgt-puzzles-20191231.79a5378/map.c:3052: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.
	    char *env = getenv("MAP_ALTERNATIVE_FLASH");
data/sgt-puzzles-20191231.79a5378/midend.c:35:19:  [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.
    random_state *random;
data/sgt-puzzles-20191231.79a5378/midend.c:147: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.
	if ((e = getenv(buf)) != NULL && sscanf(e, "%d", &ts) == 1 && ts > 0)
data/sgt-puzzles-20191231.79a5378/midend.c:190: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.
        if ((e = getenv(buf)) != NULL)
data/sgt-puzzles-20191231.79a5378/midend.c:275:21:  [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.
    random_free(me->random);
data/sgt-puzzles-20191231.79a5378/midend.c:465:54:  [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.
            newseed[0] = '1' + (char)random_upto(me->random, 9);
data/sgt-puzzles-20191231.79a5378/midend.c:467:58:  [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.
                newseed[i] = '0' + (char)random_upto(me->random, 10);
data/sgt-puzzles-20191231.79a5378/midend.c:1224:22:  [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 ((e = getenv(buf)) != NULL &&
data/sgt-puzzles-20191231.79a5378/midend.c:1415: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.
        if ((e = getenv(buf)) != NULL) {
data/sgt-puzzles-20191231.79a5378/mines.c:1337:21:  [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.
    int x, y, type, random;
data/sgt-puzzles-20191231.79a5378/mines.c:1347:17:  [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.
    else if (a->random < b->random)
data/sgt-puzzles-20191231.79a5378/mines.c:1347:29:  [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.
    else if (a->random < b->random)
data/sgt-puzzles-20191231.79a5378/mines.c:1349:17:  [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.
    else if (a->random > b->random)
data/sgt-puzzles-20191231.79a5378/mines.c:1349:29:  [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.
    else if (a->random > b->random)
data/sgt-puzzles-20191231.79a5378/pearl.c:1877:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        char *env = getenv("PEARL_GUI_LOOPY");
data/sgt-puzzles-20191231.79a5378/pegs.c:38:21:  [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.
    A(RANDOM,Random,random)
data/sgt-puzzles-20191231.79a5378/range.c:1308:15:  [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.
		char *env = getenv("RANGE_SWAP_BUTTONS");
data/sgt-puzzles-20191231.79a5378/signpost.c:2143:37:  [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.
                        char *env = getenv("SIGNPOST_GEARS");
data/sgt-puzzles-20191231.79a5378/slant.c:1668:15:  [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.
		char *env = getenv("SLANT_SWAP_BUTTONS");
data/sgt-puzzles-20191231.79a5378/sort.c:118:5:  [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(seed);
data/sgt-puzzles-20191231.79a5378/towers.c:1585:20:  [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.
    ds->three_d = !getenv("TOWERS_2D");
data/sgt-puzzles-20191231.79a5378/windows.c:110: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.
LPCSTR getenv(LPCSTR buf)
data/sgt-puzzles-20191231.79a5378/windows.c:160:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        debugging = getenv("DEBUG_PUZZLES") ? 1 : 0;
data/sgt-puzzles-20191231.79a5378/windows.c:1197:11:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
	hh_dll = LoadLibrary("hhctrl.ocx");
data/sgt-puzzles-20191231.79a5378/blackbox.c:64: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[80];
data/sgt-puzzles-20191231.79a5378/blackbox.c:74: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(str, "%dx%d, %d balls",
data/sgt-puzzles-20191231.79a5378/blackbox.c:77: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(str, "%dx%d, %d-%d balls",
data/sgt-puzzles-20191231.79a5378/blackbox.c:107:25:  [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).
            params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/blackbox.c:112:25:  [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).
            params->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/blackbox.c:117: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).
            params->minballs = atoi(p);
data/sgt-puzzles-20191231.79a5378/blackbox.c:122: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).
            params->maxballs = atoi(p);
data/sgt-puzzles-20191231.79a5378/blackbox.c:134: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[256];
data/sgt-puzzles-20191231.79a5378/blackbox.c:136: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(str, "w%dh%dm%dM%d",
data/sgt-puzzles-20191231.79a5378/blackbox.c:144: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[80];
data/sgt-puzzles-20191231.79a5378/blackbox.c:150: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/blackbox.c:155: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/blackbox.c:161: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, "%d", params->minballs);
data/sgt-puzzles-20191231.79a5378/blackbox.c:163: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, "%d-%d", params->minballs, params->maxballs);
data/sgt-puzzles-20191231.79a5378/blackbox.c:176:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/blackbox.c:177:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/blackbox.c:182:41:  [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).
        ret->minballs = ret->maxballs = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/blackbox.c:440:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, (ret->w+2)*(ret->h+2) * sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/blackbox.c:442:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->exits, state->exits, ret->nlasers * sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/blackbox.c:510: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[80];
data/sgt-puzzles-20191231.79a5378/blackbox.c:514: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, "E%d", ui->errors);
data/sgt-puzzles-20191231.79a5378/blackbox.c:896: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[80], *nullret = NULL;
data/sgt-puzzles-20191231.79a5378/blackbox.c:958: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, "T%d,%d", gx, gy);
data/sgt-puzzles-20191231.79a5378/blackbox.c:962: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, "LB%d,%d", gx, gy);
data/sgt-puzzles-20191231.79a5378/blackbox.c:966: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, "LC%d", gx);
data/sgt-puzzles-20191231.79a5378/blackbox.c:970: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, "LR%d", gy);
data/sgt-puzzles-20191231.79a5378/blackbox.c:981: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, "F%d", rangeno);
data/sgt-puzzles-20191231.79a5378/blackbox.c:1317:13:  [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[32];
data/sgt-puzzles-20191231.79a5378/blackbox.c:1323:17:  [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(str, "%d", laserval);
data/sgt-puzzles-20191231.79a5378/blackbox.c:1430: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[256];
data/sgt-puzzles-20191231.79a5378/blackbox.c:1436:17:  [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, "CORRECT!");
data/sgt-puzzles-20191231.79a5378/blackbox.c:1438:17:  [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 wrong and %d missed balls.",
data/sgt-puzzles-20191231.79a5378/blackbox.c:1441:6:  [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, "Wrong! Guess again.");
data/sgt-puzzles-20191231.79a5378/blackbox.c:1444:17:  [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 too many balls marked.",
data/sgt-puzzles-20191231.79a5378/blackbox.c:1448:17:  [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, "Click button to verify guesses.");
data/sgt-puzzles-20191231.79a5378/blackbox.c:1450:17:  [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, "Balls marked: %d / %d",
data/sgt-puzzles-20191231.79a5378/blackbox.c:1453:17:  [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, "Balls marked: %d / %d-%d.",
data/sgt-puzzles-20191231.79a5378/bridges.c:658: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[80];
data/sgt-puzzles-20191231.79a5378/bridges.c:688:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    (x) = atoi(string); \
data/sgt-puzzles-20191231.79a5378/bridges.c:725: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[80];
data/sgt-puzzles-20191231.79a5378/bridges.c:742: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[80];
data/sgt-puzzles-20191231.79a5378/bridges.c:748: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/bridges.c:753: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/bridges.c:791:23:  [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).
    ret->w          = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/bridges.c:792:23:  [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).
    ret->h          = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/bridges.c:901:23:  [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.
                len = sprintf(buf, ";L%d,%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/bridges.c:908:23:  [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.
                len = sprintf(buf, ";N%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/bridges.c:915:19:  [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.
            len = sprintf(buf, ";M%d,%d", is_s->x, is_s->y);
data/sgt-puzzles-20191231.79a5378/bridges.c:1547:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ss->tmpdsf, ss->dsf, wh*sizeof(int));
data/sgt-puzzles-20191231.79a5378/bridges.c:1563:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ss->dsf, ss->tmpdsf, wh*sizeof(int));
data/sgt-puzzles-20191231.79a5378/bridges.c:1632:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ss->tmpdsf, ss->dsf, wh*sizeof(int));
data/sgt-puzzles-20191231.79a5378/bridges.c:1647:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ss->dsf, ss->tmpdsf, wh*sizeof(int));
data/sgt-puzzles-20191231.79a5378/bridges.c:1786:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, GRIDSZ(ret));
data/sgt-puzzles-20191231.79a5378/bridges.c:1789:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->wha, state->wha, wh*N_WH_ARRAYS*sizeof(char));
data/sgt-puzzles-20191231.79a5378/bridges.c:1798:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->islands, state->islands, state->n_islands * sizeof(struct island));
data/sgt-puzzles-20191231.79a5378/bridges.c:2301: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[80];
data/sgt-puzzles-20191231.79a5378/bridges.c:2309: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, "N%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/bridges.c:2313: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, "L%d,%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/bridges.c:2328: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[80], *ret;
data/sgt-puzzles-20191231.79a5378/bridges.c:2366:13:  [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, "M%d,%d", gx, gy);
data/sgt-puzzles-20191231.79a5378/bridges.c:2457:17:  [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, "M%d,%d", ui->cur_x, ui->cur_y);
data/sgt-puzzles-20191231.79a5378/bridges.c:2847: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 str[32];
data/sgt-puzzles-20191231.79a5378/bridges.c:2849: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(str, "%d", clue);
data/sgt-puzzles-20191231.79a5378/bridges.c:3220: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 str[32];
data/sgt-puzzles-20191231.79a5378/bridges.c:3228: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(str, "%d", is->count);
data/sgt-puzzles-20191231.79a5378/combi.c:97:9:  [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).
    r = atoi(argv[1]); n = atoi(argv[2]);
data/sgt-puzzles-20191231.79a5378/combi.c:97:28:  [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).
    r = atoi(argv[1]); n = atoi(argv[2]);
data/sgt-puzzles-20191231.79a5378/cube.c:299:25:  [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).
    ret->d1 = ret->d2 = atoi(string);
data/sgt-puzzles-20191231.79a5378/cube.c:303:19:  [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).
        ret->d2 = atoi(string);
data/sgt-puzzles-20191231.79a5378/cube.c:309: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 data[256];
data/sgt-puzzles-20191231.79a5378/cube.c:312: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(data, "%c%dx%d", "tcoi"[params->solid], params->d1, params->d2);
data/sgt-puzzles-20191231.79a5378/cube.c:488: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[80];
data/sgt-puzzles-20191231.79a5378/cube.c:497: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, "%d", params->d1);
data/sgt-puzzles-20191231.79a5378/cube.c:502: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, "%d", params->d2);
data/sgt-puzzles-20191231.79a5378/cube.c:516: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).
    ret->d1 = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/cube.c:517: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).
    ret->d2 = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/cube.c:691: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(p, ",%d", data.gridptrs[0][random_upto(rs, m)]);
data/sgt-puzzles-20191231.79a5378/cube.c:827:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(vmatrix2, vmatrix, sizeof(vmatrix));
data/sgt-puzzles-20191231.79a5378/cube.c:930:19:  [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).
	state->current = atoi(p);
data/sgt-puzzles-20191231.79a5378/cube.c:967:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->facecolours, state->facecolours,
data/sgt-puzzles-20191231.79a5378/cube.c:973:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->bluemask, state->bluemask, (ret->grid->nsquares + 31) / 32 *
data/sgt-puzzles-20191231.79a5378/cube.c:1689: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 statusbuf[256];
data/sgt-puzzles-20191231.79a5378/divvy.c:696:6:  [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).
	w = atoi(argv[1]);
data/sgt-puzzles-20191231.79a5378/divvy.c:698:6:  [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).
	h = atoi(argv[2]);
data/sgt-puzzles-20191231.79a5378/divvy.c:700:6:  [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).
	k = atoi(argv[3]);
data/sgt-puzzles-20191231.79a5378/divvy.c:702:10:  [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).
	tries = atoi(argv[4]);
data/sgt-puzzles-20191231.79a5378/dominosa.c:147: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[80];
data/sgt-puzzles-20191231.79a5378/dominosa.c:178:17:  [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).
    params->n = atoi(p);
data/sgt-puzzles-20191231.79a5378/dominosa.c:202: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[80];
data/sgt-puzzles-20191231.79a5378/dominosa.c:203:15:  [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.
    int len = sprintf(buf, "%d", params->n);
data/sgt-puzzles-20191231.79a5378/dominosa.c:205:16:  [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.
        len += sprintf(buf + len, "d%c", dominosa_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/dominosa.c:212: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[80];
data/sgt-puzzles-20191231.79a5378/dominosa.c:218: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, "%d", params->n);
data/sgt-puzzles-20191231.79a5378/dominosa.c:236:14:  [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).
    ret->n = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/dominosa.c:376:17:  [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/sgt-puzzles-20191231.79a5378/dominosa.c:377:17:  [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", hi, lo);
data/sgt-puzzles-20191231.79a5378/dominosa.c:396:17:  [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/sgt-puzzles-20191231.79a5378/dominosa.c:397:17:  [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)", x, y);
data/sgt-puzzles-20191231.79a5378/dominosa.c:412:17:  [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/sgt-puzzles-20191231.79a5378/dominosa.c:413:17:  [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-%d)", x, y, y+1);
data/sgt-puzzles-20191231.79a5378/dominosa.c:427:17:  [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/sgt-puzzles-20191231.79a5378/dominosa.c:428:17:  [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,%d)", x, x+1, y);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2384: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.
            j += sprintf(ret+j, "[%d]", k);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2432:21:  [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).
                j = atoi(desc);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2493:17:  [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).
            j = atoi(desc);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2517:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, wh * sizeof(int));
data/sgt-puzzles-20191231.79a5378/dominosa.c:2519:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->edges, state->edges, wh * sizeof(unsigned short));
data/sgt-puzzles-20191231.79a5378/dominosa.c:2558:13:  [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];
data/sgt-puzzles-20191231.79a5378/dominosa.c:2573: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.
            extra = sprintf(buf, ";%c%d,%d", type,
data/sgt-puzzles-20191231.79a5378/dominosa.c:2595: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[80];
data/sgt-puzzles-20191231.79a5378/dominosa.c:2605:11:  [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.
		extra = sprintf(buf, ";D%d,%d", i, i+1);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2607:11:  [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.
		extra = sprintf(buf, ";D%d,%d", i, i+w);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2759: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[80];
data/sgt-puzzles-20191231.79a5378/dominosa.c:2799: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, "%c%d,%d", (int)(button == RIGHT_BUTTON ? 'E' : 'D'), d1, d2);
data/sgt-puzzles-20191231.79a5378/dominosa.c:2822: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, "%c%d,%d", (int)(button == CURSOR_SELECT2 ? 'E' : 'D'), d1, d2);
data/sgt-puzzles-20191231.79a5378/dominosa.c:3114: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[80];
data/sgt-puzzles-20191231.79a5378/dominosa.c:3211: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(str, "%d", state->numbers->numbers[y*w+x]);
data/sgt-puzzles-20191231.79a5378/emcc.c:127: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[512];
data/sgt-puzzles-20191231.79a5378/emcc.c:130: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(buf, "puzzle fatal error: ");
data/sgt-puzzles-20191231.79a5378/emcc.c:141: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[512];
data/sgt-puzzles-20191231.79a5378/emcc.c:390: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 fontstyle[80];
data/sgt-puzzles-20191231.79a5378/emcc.c:794:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ctx->buffer + ctx->pos, buf, len);
data/sgt-puzzles-20191231.79a5378/emcc.c:837:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, ctx->buffer, len);
data/sgt-puzzles-20191231.79a5378/emcc.c:942: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 col[40];
data/sgt-puzzles-20191231.79a5378/emcc.c:943: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(col, "#%02x%02x%02x",
data/sgt-puzzles-20191231.79a5378/fifteen.c:87:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/fifteen.c:91:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/fifteen.c: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 data[256];
data/sgt-puzzles-20191231.79a5378/fifteen.c:99: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/fifteen.c:107: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[80];
data/sgt-puzzles-20191231.79a5378/fifteen.c:113: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/fifteen.c:118: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/fifteen.c:131:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/fifteen.c:132:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/fifteen.c:257: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[80];
data/sgt-puzzles-20191231.79a5378/fifteen.c:260:13:  [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.
        k = sprintf(buf, "%d,", tiles[i]);
data/sgt-puzzles-20191231.79a5378/fifteen.c:307:6:  [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).
	n = atoi(q);
data/sgt-puzzles-20191231.79a5378/fifteen.c:343:27:  [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).
        state->tiles[i] = atoi(p);
data/sgt-puzzles-20191231.79a5378/fifteen.c:367:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->tiles, state->tiles, state->w * state->h * sizeof(int));
data/sgt-puzzles-20191231.79a5378/fifteen.c:395: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 *ret, *p, buf[80];
data/sgt-puzzles-20191231.79a5378/fifteen.c:402:11:  [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.
    col = sprintf(buf, "%d", state->n-1);
data/sgt-puzzles-20191231.79a5378/fifteen.c:420: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", col, v);
data/sgt-puzzles-20191231.79a5378/fifteen.c:421:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(p, buf, col);
data/sgt-puzzles-20191231.79a5378/fifteen.c:484:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char move[120] = {
data/sgt-puzzles-20191231.79a5378/fifteen.c:693: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[80];
data/sgt-puzzles-20191231.79a5378/fifteen.c:723:2:  [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, "M%d,%d", nx, ny);
data/sgt-puzzles-20191231.79a5378/fifteen.c:865: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 str[40];
data/sgt-puzzles-20191231.79a5378/fifteen.c:883: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(str, "%d", tile);
data/sgt-puzzles-20191231.79a5378/fifteen.c:1027: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 statusbuf[256];
data/sgt-puzzles-20191231.79a5378/fifteen.c:1037:6:  [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(statusbuf, "Moves since auto-solve: %d",
data/sgt-puzzles-20191231.79a5378/fifteen.c:1136: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[80];
data/sgt-puzzles-20191231.79a5378/fifteen.c:1195: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, "M%d,%d", x, y);
data/sgt-puzzles-20191231.79a5378/filling.c:117: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[64];
data/sgt-puzzles-20191231.79a5378/filling.c:122: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, "%dx%d", filling_defaults[i].w, filling_defaults[i].h);
data/sgt-puzzles-20191231.79a5378/filling.c:142:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/filling.c:144:34:  [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 (*string == 'x') ret->h = atoi(++string);
data/sgt-puzzles-20191231.79a5378/filling.c:149: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[64];
data/sgt-puzzles-20191231.79a5378/filling.c:150: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/filling.c:157: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[64];
data/sgt-puzzles-20191231.79a5378/filling.c:163: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/filling.c:168: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/filling.c:181:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/filling.c:182:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/filling.c:244:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    for (i = 0; i < h; ++i) memcpy(repr + (2*i + 2) * chw, repr, chw);
data/sgt-puzzles-20191231.79a5378/filling.c:257:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    for (i = 1; i < h; ++i) memcpy(repr + (2*i + 1) * chw, repr + chw, chw);
data/sgt-puzzles-20191231.79a5378/filling.c:475:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dup, ptr, len * esz);
data/sgt-puzzles-20191231.79a5378/filling.c:1285:14:  [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.
	    int n = sprintf(s, "Invalid character '%1c' in game description",
data/sgt-puzzles-20191231.79a5378/filling.c:1534: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[32];
data/sgt-puzzles-20191231.79a5378/filling.c:1551: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[32];
data/sgt-puzzles-20191231.79a5378/filling.c:1552: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, "_%d", button);
data/sgt-puzzles-20191231.79a5378/filling.c:1756: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[2];
data/sgt-puzzles-20191231.79a5378/flip.c:89: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[80];
data/sgt-puzzles-20191231.79a5378/flip.c:119:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/flip.c:123:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/flip.c:137: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 data[256];
data/sgt-puzzles-20191231.79a5378/flip.c:148: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[80];
data/sgt-puzzles-20191231.79a5378/flip.c:152: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/flip.c:157: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/flip.c:175:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/flip.c:176:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/flip.c:650:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, ret->w * ret->h);
data/sgt-puzzles-20191231.79a5378/flip.c:813:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(shortest, solution, wh);
data/sgt-puzzles-20191231.79a5378/flip.c:943: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[80], *nullret = NULL;
data/sgt-puzzles-20191231.79a5378/flip.c:969:17:  [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, "M%d,%d", tx, ty);
data/sgt-puzzles-20191231.79a5378/flip.c:1266: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 buf[256];
data/sgt-puzzles-20191231.79a5378/flood.c:132:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/flood.c:136:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/flood.c:142:21:  [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).
	    ret->colours = atoi(string);
data/sgt-puzzles-20191231.79a5378/flood.c:146: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).
	    ret->leniency = atoi(string);
data/sgt-puzzles-20191231.79a5378/flood.c:155: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[256];
data/sgt-puzzles-20191231.79a5378/flood.c:156: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/flood.c:158: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 + strlen(buf), "c%dm%d",
data/sgt-puzzles-20191231.79a5378/flood.c:166: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[80];
data/sgt-puzzles-20191231.79a5378/flood.c:172: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/flood.c:177: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/flood.c:182: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, "%d", params->colours);
data/sgt-puzzles-20191231.79a5378/flood.c:187: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, "%d", params->leniency);
data/sgt-puzzles-20191231.79a5378/flood.c:200:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/flood.c:201:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/flood.c:202: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).
    ret->colours = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/flood.c:203:21:  [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).
    ret->leniency = atoi(cfg[3].u.string.sval);
data/sgt-puzzles-20191231.79a5378/flood.c:236:29:  [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).
        rdepth = depthstr ? atoi(depthstr) : 1;
data/sgt-puzzles-20191231.79a5378/flood.c:483:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tmpgrid, grid, wh * sizeof(*grid));
data/sgt-puzzles-20191231.79a5378/flood.c:561:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(scratch->grid2, scratch->grid, wh * sizeof(*scratch->grid2));
data/sgt-puzzles-20191231.79a5378/flood.c:585: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(desc+i, ",%d", moves);
data/sgt-puzzles-20191231.79a5378/flood.c:644:24:  [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).
    state->movelimit = atoi(desc);
data/sgt-puzzles-20191231.79a5378/flood.c:664:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, state->w * state->h * sizeof(*ret->grid));
data/sgt-puzzles-20191231.79a5378/flood.c:691: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[256];
data/sgt-puzzles-20191231.79a5378/flood.c:705:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(scratch->grid2, currstate->grid, wh * sizeof(*scratch->grid2));
data/sgt-puzzles-20191231.79a5378/flood.c:721:16:  [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.
        len += sprintf(buf, ",%d", moves[i]);
data/sgt-puzzles-20191231.79a5378/flood.c:725:14:  [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.
        p += sprintf(p, "%c%d", (i==0 ? 'S' : ','), moves[i]);
data/sgt-puzzles-20191231.79a5378/flood.c:855: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[256];
data/sgt-puzzles-20191231.79a5378/flood.c:856: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, "M%d", move);
data/sgt-puzzles-20191231.79a5378/flood.c:922:29:  [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).
            sol->moves[i] = atoi(p);
data/sgt-puzzles-20191231.79a5378/flood.c:1173:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(grid, state->grid, wh * sizeof(*grid));
data/sgt-puzzles-20191231.79a5378/flood.c:1259: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 status[255];
data/sgt-puzzles-20191231.79a5378/galaxies.c:177: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[80];
data/sgt-puzzles-20191231.79a5378/galaxies.c:214:29:  [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).
    params->h = params->w = atoi(string);
data/sgt-puzzles-20191231.79a5378/galaxies.c:219:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/galaxies.c:234: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[80];
data/sgt-puzzles-20191231.79a5378/galaxies.c:235: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(str, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/galaxies.c:237: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(str + strlen(str), "d%c", galaxies_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/galaxies.c:244: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[80];
data/sgt-puzzles-20191231.79a5378/galaxies.c:250: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/galaxies.c:255: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/galaxies.c:273:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/galaxies.c:274:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/galaxies.c:895:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid,
data/sgt-puzzles-20191231.79a5378/galaxies.c:2154:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ingrid, state->grid, gsz * sizeof(space));
data/sgt-puzzles-20191231.79a5378/galaxies.c:2157:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->grid, ingrid, gsz * sizeof(space));
data/sgt-puzzles-20191231.79a5378/galaxies.c:2172:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(outgrid, state->grid, gsz * sizeof(space));
data/sgt-puzzles-20191231.79a5378/galaxies.c:2204:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->grid, outgrid, gsz * sizeof(space));
data/sgt-puzzles-20191231.79a5378/galaxies.c:2441: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[80];
data/sgt-puzzles-20191231.79a5378/galaxies.c:2465: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, "%c%d,%d",
data/sgt-puzzles-20191231.79a5378/galaxies.c:2488: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[80];
data/sgt-puzzles-20191231.79a5378/galaxies.c:2514:13:  [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, "E%d,%d", px, py);
data/sgt-puzzles-20191231.79a5378/galaxies.c:2678:13:  [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, "E%d,%d", ui->cur_x, ui->cur_y);
data/sgt-puzzles-20191231.79a5378/galaxies.c:3446: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[256];
data/sgt-puzzles-20191231.79a5378/galaxies.c:3823:28:  [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).
            seed = (time_t)atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/galaxies.c:3920: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[4096];
data/sgt-puzzles-20191231.79a5378/galaxies.c:3952:12:  [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).
		par->w = atoi(num);
data/sgt-puzzles-20191231.79a5378/galaxies.c:3954:12:  [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).
		par->h = atoi(num);
data/sgt-puzzles-20191231.79a5378/grid.c:234:22:  [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 *svgf = fopen(svg, "w");
data/sgt-puzzles-20191231.79a5378/grid.c:1556:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int version = (desc == NULL ? -1 : atoi(desc));
data/sgt-puzzles-20191231.79a5378/grid.c:2907: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 gd[255];
data/sgt-puzzles-20191231.79a5378/grid.c:2937: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(gd, "G%d,%d,%d", xoff, yoff, aoff);
data/sgt-puzzles-20191231.79a5378/gtk.c:95:20:  [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).
        debug_fp = fopen("debug.log", "w");
data/sgt-puzzles-20191231.79a5378/gtk.c: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[4096];
data/sgt-puzzles-20191231.79a5378/gtk.c:399: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 css_buf[512];
data/sgt-puzzles-20191231.79a5378/gtk.c:400: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(css_buf, ".background { "
data/sgt-puzzles-20191231.79a5378/gtk.c:2842: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 ((fp = fopen(name, "r")) != NULL) {
data/sgt-puzzles-20191231.79a5378/gtk.c:2843:6:  [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 + FILENAME_MAX];
data/sgt-puzzles-20191231.79a5378/gtk.c:2847:6:  [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, "Are you sure you want to overwrite the"
data/sgt-puzzles-20191231.79a5378/gtk.c:2854: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).
	fp = fopen(name, "w");
data/sgt-puzzles-20191231.79a5378/gtk.c:2868: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 boxmsg[512];
data/sgt-puzzles-20191231.79a5378/gtk.c:2869: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(boxmsg, "Error writing save file: %.400s",
data/sgt-puzzles-20191231.79a5378/gtk.c:2889:20:  [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 *fp = fopen(name, "r");
data/sgt-puzzles-20191231.79a5378/gtk.c:2965: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 path[PATH_MAX + 1];
data/sgt-puzzles-20191231.79a5378/gtk.c:3000: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 buf[PATH_MAX + 1];
data/sgt-puzzles-20191231.79a5378/gtk.c:3002: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.
	const char *argv[3];
data/sgt-puzzles-20191231.79a5378/gtk.c:3006:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(buf, list, len);
data/sgt-puzzles-20191231.79a5378/gtk.c:3072: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 titlebuf[256];
data/sgt-puzzles-20191231.79a5378/gtk.c:3073: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 textbuf[1024];
data/sgt-puzzles-20191231.79a5378/gtk.c:3075: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(titlebuf, "About %.200s", thegame.name);
data/sgt-puzzles-20191231.79a5378/gtk.c:3076: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(textbuf,
data/sgt-puzzles-20191231.79a5378/gtk.c:3167: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 errbuf[1024];
data/sgt-puzzles-20191231.79a5378/gtk.c:3227: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(errbuf, "Invalid game ID: %.800s", err);
data/sgt-puzzles-20191231.79a5378/gtk.c:3230: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).
	    fp = fopen(arg, "r");
data/sgt-puzzles-20191231.79a5378/gtk.c:3232: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(errbuf, "Error opening file: %.800s", strerror(errno));
data/sgt-puzzles-20191231.79a5378/gtk.c:3236: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.
                    sprintf(errbuf, "Invalid save file: %.800s", err);
data/sgt-puzzles-20191231.79a5378/gtk.c:3251:14:  [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 *fp = fopen(arg, "r");
data/sgt-puzzles-20191231.79a5378/gtk.c:3253: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(errbuf, "Supplied argument is neither a game ID (%.400s)"
data/sgt-puzzles-20191231.79a5378/gtk.c:3258: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(errbuf, "%.800s", err);
data/sgt-puzzles-20191231.79a5378/gtk.c:3686: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 errbuf[500];
data/sgt-puzzles-20191231.79a5378/gtk.c:3720: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).
		ngenerate = atoi(*++av);
data/sgt-puzzles-20191231.79a5378/gtk.c:3849:6:  [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(errbuf, "%.100s: unrecognised option '%.100s'\n",
data/sgt-puzzles-20191231.79a5378/gtk.c:3937: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(pstr + strlen(pstr), "-%d", i);
data/sgt-puzzles-20191231.79a5378/gtk.c:4030: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).
		ctx.fp = fopen(realname, "w");
data/sgt-puzzles-20191231.79a5378/guess.c:112:25:  [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).
	    params->ncolours = atoi(p);
data/sgt-puzzles-20191231.79a5378/guess.c:117: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).
	    params->npegs = atoi(p);
data/sgt-puzzles-20191231.79a5378/guess.c:122:25:  [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).
	    params->nguesses = atoi(p);
data/sgt-puzzles-20191231.79a5378/guess.c:150: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 data[256];
data/sgt-puzzles-20191231.79a5378/guess.c:162: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[80];
data/sgt-puzzles-20191231.79a5378/guess.c:168: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, "%d", params->ncolours);
data/sgt-puzzles-20191231.79a5378/guess.c:173: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, "%d", params->npegs);
data/sgt-puzzles-20191231.79a5378/guess.c:178: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, "%d", params->nguesses);
data/sgt-puzzles-20191231.79a5378/guess.c:199:21:  [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).
    ret->ncolours = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/guess.c:200:18:  [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).
    ret->npegs = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/guess.c:201:21:  [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).
    ret->nguesses = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/guess.c:241:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(newpegs->pegs, pegs->pegs, newpegs->npegs * sizeof(int));
data/sgt-puzzles-20191231.79a5378/guess.c:242:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(newpegs->feedback, pegs->feedback, newpegs->npegs * sizeof(int));
data/sgt-puzzles-20191231.79a5378/guess.c:343:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->holds, state->holds, sizeof(bool) * state->params.npegs);
data/sgt-puzzles-20191231.79a5378/guess.c:470:34:  [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).
        ui->curr_pegs->pegs[i] = atoi(p);
data/sgt-puzzles-20191231.79a5378/guess.c:933:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    int val = atoi(p);
data/sgt-puzzles-20191231.79a5378/guess.c:939:45:  [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).
	    ret->guesses[from->next_go]->pegs[i] = atoi(p);
data/sgt-puzzles-20191231.79a5378/guess.c:1198: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[2];
data/sgt-puzzles-20191231.79a5378/inertia.c:127: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 namebuf[80];
data/sgt-puzzles-20191231.79a5378/inertia.c:134: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(namebuf, "%dx%d", ret->w, ret->h);
data/sgt-puzzles-20191231.79a5378/inertia.c:144:29:  [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).
    params->w = params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/inertia.c:148:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/inertia.c:154: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 data[256];
data/sgt-puzzles-20191231.79a5378/inertia.c:156: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/inertia.c:164: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[80];
data/sgt-puzzles-20191231.79a5378/inertia.c:170: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/inertia.c:175: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/inertia.c:188:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/inertia.c:189:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/inertia.c:626:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(state->grid, desc, wh);
data/sgt-puzzles-20191231.79a5378/inertia.c:665:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, wh);
data/sgt-puzzles-20191231.79a5378/inertia.c:1472:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		else memcpy(board + center - 1, ":-(", 3);
data/sgt-puzzles-20191231.79a5378/inertia.c:1515: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[80];
data/sgt-puzzles-20191231.79a5378/inertia.c:1519: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, "D%d", ui->deaths);
data/sgt-puzzles-20191231.79a5378/inertia.c:1575: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[80];
data/sgt-puzzles-20191231.79a5378/inertia.c:1641: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, "%d", dir);
data/sgt-puzzles-20191231.79a5378/inertia.c:1693:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    dir = atoi(move);
data/sgt-puzzles-20191231.79a5378/inertia.c:1989: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 status[256];
data/sgt-puzzles-20191231.79a5378/inertia.c:2109:2:  [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(status, "DEAD!");
data/sgt-puzzles-20191231.79a5378/inertia.c:2112:6:  [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(status, "Auto-solver used. ");
data/sgt-puzzles-20191231.79a5378/inertia.c:2115:2:  [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(status + strlen(status), "Gems: %d", gems);
data/sgt-puzzles-20191231.79a5378/inertia.c:2117:2:  [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(status, "Auto-solved.");
data/sgt-puzzles-20191231.79a5378/inertia.c:2119:2:  [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(status, "COMPLETED!");
data/sgt-puzzles-20191231.79a5378/inertia.c:2129:2:  [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(status + strlen(status), "   Deaths: %d", deaths);
data/sgt-puzzles-20191231.79a5378/keen.c:111: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[80];
data/sgt-puzzles-20191231.79a5378/keen.c:143:17:  [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).
    params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/keen.c:167: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 ret[80];
data/sgt-puzzles-20191231.79a5378/keen.c:169: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(ret, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/keen.c:180: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[80];
data/sgt-puzzles-20191231.79a5378/keen.c:186: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/keen.c:208:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/keen.c:469:6:  [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 prefix[256];
data/sgt-puzzles-20191231.79a5378/keen.c:497:6:  [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 prefix[256];
data/sgt-puzzles-20191231.79a5378/keen.c:512: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 prefix2[256];
data/sgt-puzzles-20191231.79a5378/keen.c:725:11:  [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.
	    q += sprintf(q, "%d", i);
data/sgt-puzzles-20191231.79a5378/keen.c:752:10:  [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).
		repn = atoi(*p)-1;
data/sgt-puzzles-20191231.79a5378/keen.c:1177:11:  [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.
	    p += sprintf(p, "%ld", clues[j] & ~CMASK);
data/sgt-puzzles-20191231.79a5378/keen.c:1319:14:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    clue |= atol(p);
data/sgt-puzzles-20191231.79a5378/keen.c:1351:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, a*sizeof(digit));
data/sgt-puzzles-20191231.79a5378/keen.c:1352:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->pencil, state->pencil, a*sizeof(int));
data/sgt-puzzles-20191231.79a5378/keen.c:1624: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[80];
data/sgt-puzzles-20191231.79a5378/keen.c:1693:2:  [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, "%c%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/keen.c:1855: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[64];
data/sgt-puzzles-20191231.79a5378/keen.c:2320: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[64];
data/sgt-puzzles-20191231.79a5378/keen.c:2347: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];
data/sgt-puzzles-20191231.79a5378/latin.c:769:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ingrid, solver->grid, o*o);
data/sgt-puzzles-20191231.79a5378/latin.c:798:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(outgrid, ingrid, o*o);
data/sgt-puzzles-20191231.79a5378/latin.c:842:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(solver->grid, outgrid, o*o);
data/sgt-puzzles-20191231.79a5378/latin.c:1022:15:  [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.
	    p += 1 + sprintf(p, "%d", i+1);
data/sgt-puzzles-20191231.79a5378/latin.c:1374:21:  [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).
	    seed = (time_t)atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/latin.c:1386:12:  [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).
	test_soak(atoi(*argv), rs);
data/sgt-puzzles-20191231.79a5378/latin.c:1390:7:  [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).
		gen(atoi(*argv++), rs, 1);
data/sgt-puzzles-20191231.79a5378/lightup.c:210: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[80];
data/sgt-puzzles-20191231.79a5378/lightup.c:241:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    (x) = atoi(string); \
data/sgt-puzzles-20191231.79a5378/lightup.c:279: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[80];
data/sgt-puzzles-20191231.79a5378/lightup.c:282: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, "%dx%db%ds%dd%d",
data/sgt-puzzles-20191231.79a5378/lightup.c:287: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/lightup.c:295: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[80];
data/sgt-puzzles-20191231.79a5378/lightup.c:301: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/lightup.c:306: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/lightup.c:311: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, "%d", params->blackpc);
data/sgt-puzzles-20191231.79a5378/lightup.c:336: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).
    ret->w =       atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/lightup.c:337: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).
    ret->h =       atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/lightup.c:338: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).
    ret->blackpc = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/lightup.c:390:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->lights, state->lights, ret->w * ret->h * sizeof(int));
data/sgt-puzzles-20191231.79a5378/lightup.c:394:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->flags, state->flags, ret->w * ret->h * sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/lightup.c:1402:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(state->lights, scopy->lights,
data/sgt-puzzles-20191231.79a5378/lightup.c:1404:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(state->flags, scopy->flags,
data/sgt-puzzles-20191231.79a5378/lightup.c:1743:23:  [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.
                len = sprintf(buf, ";L%d,%d", x, y);
data/sgt-puzzles-20191231.79a5378/lightup.c:1745:23:  [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.
                len = sprintf(buf, ";I%d,%d", x, y);
data/sgt-puzzles-20191231.79a5378/lightup.c:1891: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[80], *nullret = UI_UPDATE, *empty = UI_UPDATE, c;
data/sgt-puzzles-20191231.79a5378/lightup.c:1942: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, "%c%d,%d", (int)c, cx, cy);
data/sgt-puzzles-20191231.79a5378/lightup.c:2125:13:  [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[32];
data/sgt-puzzles-20191231.79a5378/lightup.c:2130:13:  [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(str, "%d", GRID(state, lights, x, y));
data/sgt-puzzles-20191231.79a5378/lightup.c:2279: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 str[32];
data/sgt-puzzles-20191231.79a5378/lightup.c:2280: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(str, "%d", GRID(state, lights, x, y));
data/sgt-puzzles-20191231.79a5378/loopy.c:346:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->clues, state->clues, state->game_grid->num_faces);
data/sgt-puzzles-20191231.79a5378/loopy.c:349:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->lines, state->lines, state->game_grid->num_edges);
data/sgt-puzzles-20191231.79a5378/loopy.c:352:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->line_errors, state->line_errors,
data/sgt-puzzles-20191231.79a5378/loopy.c:454:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->dotdsf, sstate->dotdsf,
data/sgt-puzzles-20191231.79a5378/loopy.c:456:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->looplen, sstate->looplen,
data/sgt-puzzles-20191231.79a5378/loopy.c:461:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->dot_solved, sstate->dot_solved, num_dots * sizeof(bool));
data/sgt-puzzles-20191231.79a5378/loopy.c:462:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->face_solved, sstate->face_solved, num_faces * sizeof(bool));
data/sgt-puzzles-20191231.79a5378/loopy.c:465:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->dot_yes_count, sstate->dot_yes_count, num_dots);
data/sgt-puzzles-20191231.79a5378/loopy.c:467:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->dot_no_count, sstate->dot_no_count, num_dots);
data/sgt-puzzles-20191231.79a5378/loopy.c:470:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->face_yes_count, sstate->face_yes_count, num_faces);
data/sgt-puzzles-20191231.79a5378/loopy.c:472:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->face_no_count, sstate->face_no_count, num_faces);
data/sgt-puzzles-20191231.79a5378/loopy.c:476:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ret->dlines, sstate->dlines,
data/sgt-puzzles-20191231.79a5378/loopy.c:484:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ret->linedsf, sstate->linedsf,
data/sgt-puzzles-20191231.79a5378/loopy.c:570: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[80];
data/sgt-puzzles-20191231.79a5378/loopy.c:605:29:  [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).
    params->h = params->w = atoi(string);
data/sgt-puzzles-20191231.79a5378/loopy.c:610:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/loopy.c:615:24:  [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).
        params->type = atoi(string);
data/sgt-puzzles-20191231.79a5378/loopy.c:630: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[80];
data/sgt-puzzles-20191231.79a5378/loopy.c:631: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(str, "%dx%dt%d", params->w, params->h, params->type);
data/sgt-puzzles-20191231.79a5378/loopy.c:633: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(str + strlen(str), "d%c", diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/loopy.c:640: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[80];
data/sgt-puzzles-20191231.79a5378/loopy.c:646: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/loopy.c:651: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/loopy.c:674:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/loopy.c:675:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/loopy.c:717:23:  [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.
                dp += sprintf(dp, "%c", (int)(empty_count + 'a' - 1));
data/sgt-puzzles-20191231.79a5378/loopy.c:723:23:  [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.
                dp += sprintf(dp, "%c", (int)(empty_count + 'a' - 1));
data/sgt-puzzles-20191231.79a5378/loopy.c:726:19:  [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.
            dp += sprintf(dp, "%c", (int)CLUE2CHAR(state->clues[i]));
data/sgt-puzzles-20191231.79a5378/loopy.c:731:15:  [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.
        dp += sprintf(dp, "%c", (int)(empty_count + 'a' - 1));
data/sgt-puzzles-20191231.79a5378/loopy.c:753:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(gd, *desc, gd_len);
data/sgt-puzzles-20191231.79a5378/loopy.c:840:11:  [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.
	    p += sprintf(p, "%dy", i);
data/sgt-puzzles-20191231.79a5378/loopy.c:843:11:  [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.
	    p += sprintf(p, "%dn", i);
data/sgt-puzzles-20191231.79a5378/loopy.c:3022:15:  [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.
    movelen = sprintf(movebuf, "%d%c", i, (int)button_char);
data/sgt-puzzles-20191231.79a5378/loopy.c:3087:32:  [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.
                    movelen += sprintf(movebuf+movelen, "%d%c",
data/sgt-puzzles-20191231.79a5378/loopy.c:3109:13:  [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).
        i = atoi(move);
data/sgt-puzzles-20191231.79a5378/loopy.c:3207: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 c[20];
data/sgt-puzzles-20191231.79a5378/loopy.c:3209: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(c, "%d", state->clues[i]);
data/sgt-puzzles-20191231.79a5378/loopy.c:3583:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char c[20];
data/sgt-puzzles-20191231.79a5378/loopy.c:3585:13:  [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(c, "%d", state->clues[i]);
data/sgt-puzzles-20191231.79a5378/magnets.c:58:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *cellnames[3] = { "neutral", "positive", "negative" };
data/sgt-puzzles-20191231.79a5378/magnets.c:120: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[64];
data/sgt-puzzles-20191231.79a5378/magnets.c:151:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/magnets.c:155:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/magnets.c:178: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[256];
data/sgt-puzzles-20191231.79a5378/magnets.c:179: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/magnets.c:190: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[64];
data/sgt-puzzles-20191231.79a5378/magnets.c:196: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/magnets.c:201: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/magnets.c:223:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/magnets.c:224:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/magnets.c:337:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest->grid, src->grid, dest->wh*sizeof(int));
data/sgt-puzzles-20191231.79a5378/magnets.c:340:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest->counts_done, src->counts_done,
data/sgt-puzzles-20191231.79a5378/magnets.c:344:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest->flags, src->flags, dest->wh*sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/magnets.c:1440: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.
                k = sprintf(buf, "%c%d,%d;", (int)c, x, y);
data/sgt-puzzles-20191231.79a5378/magnets.c:1643:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(grid_correct, new->grid, new->wh*sizeof(int));
data/sgt-puzzles-20191231.79a5378/magnets.c:1828: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, "D%d,%d", gx, gy);
data/sgt-puzzles-20191231.79a5378/magnets.c:1862: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, "%c%d,%d", movech, gx, gy);
data/sgt-puzzles-20191231.79a5378/magnets.c:2013: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[32];
data/sgt-puzzles-20191231.79a5378/magnets.c:2018: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, "%d", num);
data/sgt-puzzles-20191231.79a5378/magnets.c:2051: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 qu[2] = { '?', 0 };
data/sgt-puzzles-20191231.79a5378/magnets.c:2569: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).
            seed = atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/map.c:137: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[80];
data/sgt-puzzles-20191231.79a5378/map.c:169:17:  [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).
    params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/map.c:173:21:  [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).
        params->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/map.c:180:14:  [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).
	params->n = atoi(p);
data/sgt-puzzles-20191231.79a5378/map.c:197: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 ret[400];
data/sgt-puzzles-20191231.79a5378/map.c:199: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(ret, "%dx%dn%d", params->w, params->h, params->n);
data/sgt-puzzles-20191231.79a5378/map.c:201:2:  [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(ret + strlen(ret), "d%c", map_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/map.c:209: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[80];
data/sgt-puzzles-20191231.79a5378/map.c:215: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/map.c:220: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/map.c:225: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, "%d", params->n);
data/sgt-puzzles-20191231.79a5378/map.c:243:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/map.c:244:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/map.c:245:14:  [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).
    ret->n = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/map.c:871:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char colnames[FOUR] = { 'R', 'Y', 'G', 'B' };
data/sgt-puzzles-20191231.79a5378/map.c:1084: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.
                        char buf[80];
data/sgt-puzzles-20191231.79a5378/map.c:1219:37:  [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];
data/sgt-puzzles-20191231.79a5378/map.c:1318:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(origcolouring, colouring, n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:1327:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(rsc->possible, sc->possible, n);
data/sgt-puzzles-20191231.79a5378/map.c:1328:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(subcolouring, origcolouring, n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:1363:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(colouring, subcolouring, n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:1405: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 *ret, buf[80];
data/sgt-puzzles-20191231.79a5378/map.c:1540:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(colouring2, colouring, n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:1573:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(colouring2, colouring, n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2131:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->map->edgex, bestx, state->map->ngraph * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2132:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->map->edgey, besty, state->map->ngraph * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2136:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->map->regionx, bestx + state->map->ngraph, n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2137:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->map->regiony, besty + state->map->ngraph, n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2167:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->colouring, state->colouring, state->p.n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2169:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->pencil, state->pencil, state->p.n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2206: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 *ret, buf[80];
data/sgt-puzzles-20191231.79a5378/map.c:2210:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(colouring, state->colouring, state->map->n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/map.c:2239:19:  [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.
            len = sprintf(buf, ";%d:%d", colouring[i], i);
data/sgt-puzzles-20191231.79a5378/map.c:2395: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 *bufp, buf[256];
data/sgt-puzzles-20191231.79a5378/map.c:2511:14:  [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.
	    bufp += sprintf(bufp, ";%c:%d", (int)(c < 0 ? 'C' : '0' + c), r);
data/sgt-puzzles-20191231.79a5378/map.c:2519:15:  [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.
		    bufp += sprintf(bufp, ";p%c:%d", (int)('0' + i), r);
data/sgt-puzzles-20191231.79a5378/map.c:2655:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret + COL_0 * 3, map_colours[0], 3 * sizeof(float));
data/sgt-puzzles-20191231.79a5378/map.c:2656:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret + COL_1 * 3, map_colours[1], 3 * sizeof(float));
data/sgt-puzzles-20191231.79a5378/map.c:2657:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret + COL_2 * 3, map_colours[2], 3 * sizeof(float));
data/sgt-puzzles-20191231.79a5378/map.c:2658:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret + COL_3 * 3, map_colours[3], 3 * sizeof(float));
data/sgt-puzzles-20191231.79a5378/map.c:2844:17:  [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];
data/sgt-puzzles-20191231.79a5378/map.c:2845:17:  [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", j);
data/sgt-puzzles-20191231.79a5378/map.c:3054:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		flash_type = atoi(env);
data/sgt-puzzles-20191231.79a5378/matching.c:698:17:  [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/sgt-puzzles-20191231.79a5378/matching.c:699:27:  [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.
                int len = sprintf(buf, "%lu", (unsigned long)time(NULL));
data/sgt-puzzles-20191231.79a5378/matching.c:724:18:  [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).
            fp = fopen(infile, "r");
data/sgt-puzzles-20191231.79a5378/midend.c:139: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 buf[80], *e;
data/sgt-puzzles-20191231.79a5378/midend.c:183: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[80], *e;
data/sgt-puzzles-20191231.79a5378/midend.c:415:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ser->buf + ser->len, buf, len);
data/sgt-puzzles-20191231.79a5378/midend.c:462:13:  [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 newseed[16];
data/sgt-puzzles-20191231.79a5378/midend.c:577:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, rctx->ser->buf + rctx->pos, len);
data/sgt-puzzles-20191231.79a5378/midend.c:1215:13:  [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], *e;
data/sgt-puzzles-20191231.79a5378/midend.c:1406: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[80], *e;
data/sgt-puzzles-20191231.79a5378/midend.c:1893: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 timebuf[100], *ret;
data/sgt-puzzles-20191231.79a5378/midend.c:1899:2:  [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(timebuf, "[%d:%02d] ", min, sec);
data/sgt-puzzles-20191231.79a5378/midend.c:1930: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 hbuf[80]; \
data/sgt-puzzles-20191231.79a5378/midend.c:1932: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 lbuf[9];                               \
data/sgt-puzzles-20191231.79a5378/midend.c:1997:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(s1, me->aux_info, len);
data/sgt-puzzles-20191231.79a5378/midend.c:2022: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[80];
data/sgt-puzzles-20191231.79a5378/midend.c:2023: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, "%g", me->elapsed);
data/sgt-puzzles-20191231.79a5378/midend.c:2031: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[80];
data/sgt-puzzles-20191231.79a5378/midend.c:2032: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, "%d", me->nstates);
data/sgt-puzzles-20191231.79a5378/midend.c:2034: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, "%d", me->statepos);
data/sgt-puzzles-20191231.79a5378/midend.c:2100: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 key[9], c;
data/sgt-puzzles-20191231.79a5378/midend.c:2198:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(data.auxinfo, tmp, len);
data/sgt-puzzles-20191231.79a5378/midend.c:2208: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).
                data.nstates = atoi(val);
data/sgt-puzzles-20191231.79a5378/midend.c:2224:33:  [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).
                data.statepos = atoi(val);
data/sgt-puzzles-20191231.79a5378/midend.c:2469: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 key[9], c;
data/sgt-puzzles-20191231.79a5378/mines.c:120: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[80];
data/sgt-puzzles-20191231.79a5378/mines.c:128: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(str, "%dx%d, %d mines", ret->w, ret->h, ret->n);
data/sgt-puzzles-20191231.79a5378/mines.c:151:17:  [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).
    params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/mines.c:155:21:  [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).
        params->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/mines.c:162:14:  [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).
	params->n = atoi(p);
data/sgt-puzzles-20191231.79a5378/mines.c:179: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 ret[400];
data/sgt-puzzles-20191231.79a5378/mines.c:182:11:  [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.
    len = sprintf(ret, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/mines.c:188: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.
	len += sprintf(ret+len, "n%d", params->n);
data/sgt-puzzles-20191231.79a5378/mines.c:200: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[80];
data/sgt-puzzles-20191231.79a5378/mines.c:206: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/mines.c:211: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/mines.c:216: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, "%d", params->n);
data/sgt-puzzles-20191231.79a5378/mines.c:233:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/mines.c:234:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/mines.c:235:14:  [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).
    ret->n = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/mines.c:572:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			  open_cb open, void *openctx,
data/sgt-puzzles-20191231.79a5378/mines.c:594:14:  [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).
			grid[i] = open(openctx, x + xx, y + yy);
data/sgt-puzzles-20191231.79a5378/mines.c:642:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		     open_cb open,
data/sgt-puzzles-20191231.79a5378/mines.c:796:34:  [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).
		known_squares(w, h, std, grid, open, ctx,
data/sgt-puzzles-20191231.79a5378/mines.c:844:38:  [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).
		    known_squares(w, h, std, grid, open, ctx,
data/sgt-puzzles-20191231.79a5378/mines.c:847:38:  [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).
		    known_squares(w, h, std, grid, open, ctx,
data/sgt-puzzles-20191231.79a5378/mines.c:948:35:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			known_squares(w, h, std, grid, open, ctx,
data/sgt-puzzles-20191231.79a5378/mines.c:1081:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
						      open, ctx,
data/sgt-puzzles-20191231.79a5378/mines.c:1911: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.
	    unsigned char bmp2[50];
data/sgt-puzzles-20191231.79a5378/mines.c:1912: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.
	    unsigned char bmp2a[50];
data/sgt-puzzles-20191231.79a5378/mines.c:2013:10:  [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).
	    x = atoi(desc);
data/sgt-puzzles-20191231.79a5378/mines.c:2023:10:  [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).
	    y = atoi(desc);
data/sgt-puzzles-20191231.79a5378/mines.c:2189:21:  [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).
	state->layout->n = atoi(desc);
data/sgt-puzzles-20191231.79a5378/mines.c:2210:10:  [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).
	    x = atoi(desc);
data/sgt-puzzles-20191231.79a5378/mines.c:2214:10:  [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).
	    y = atoi(desc);
data/sgt-puzzles-20191231.79a5378/mines.c:2284:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, ret->w * ret->h);
data/sgt-puzzles-20191231.79a5378/mines.c:2375: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[80];
data/sgt-puzzles-20191231.79a5378/mines.c:2380: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, "D%d", ui->deaths);
data/sgt-puzzles-20191231.79a5378/mines.c:2423: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[256];
data/sgt-puzzles-20191231.79a5378/mines.c:2447:13:  [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, "F%d,%d", ui->cur_x, ui->cur_y);
data/sgt-puzzles-20191231.79a5378/mines.c:2456:13:  [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, "O%d,%d", ui->cur_x, ui->cur_y);
data/sgt-puzzles-20191231.79a5378/mines.c:2499:2:  [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, "F%d,%d", cx, cy);
data/sgt-puzzles-20191231.79a5378/mines.c:2527:6:  [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, "O%d,%d", cx, cy);
data/sgt-puzzles-20191231.79a5378/mines.c:2583: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, "C%d,%d", cx, cy);
data/sgt-puzzles-20191231.79a5378/mines.c:2914:6:  [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];
data/sgt-puzzles-20191231.79a5378/mines.c:3073: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 statusbar[512];
data/sgt-puzzles-20191231.79a5378/mines.c:3075:6:  [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(statusbar, "DEAD!");
data/sgt-puzzles-20191231.79a5378/mines.c:3078:17:  [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(statusbar, "Auto-solved.");
data/sgt-puzzles-20191231.79a5378/mines.c:3080:17:  [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(statusbar, "COMPLETED!");
data/sgt-puzzles-20191231.79a5378/mines.c:3083:6:  [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(statusbar, "Marked: %d / %d", markers, mines);
data/sgt-puzzles-20191231.79a5378/mines.c:3111: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.
                    sprintf(statusbar + strlen(statusbar),
data/sgt-puzzles-20191231.79a5378/mines.c:3114: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.
                    sprintf(statusbar + strlen(statusbar),
data/sgt-puzzles-20191231.79a5378/mines.c:3120:13:  [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(statusbar + strlen(statusbar),
data/sgt-puzzles-20191231.79a5378/mines.c:3273:9:  [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).
    x = atoi(desc);
data/sgt-puzzles-20191231.79a5378/mines.c:3276:9:  [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).
    y = atoi(desc);
data/sgt-puzzles-20191231.79a5378/misc.c:113: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.
	unsigned char digest[20];
data/sgt-puzzles-20191231.79a5378/misc.c:114: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 numberbuf[80];
data/sgt-puzzles-20191231.79a5378/misc.c:122: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(numberbuf, "%d", counter++);
data/sgt-puzzles-20191231.79a5378/misc.c:236: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 tmpbuf[512];
data/sgt-puzzles-20191231.79a5378/misc.c:241:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tmpbuf, a, thislen);
data/sgt-puzzles-20191231.79a5378/misc.c:242:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, b, thislen);
data/sgt-puzzles-20191231.79a5378/misc.c:243:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(b, tmpbuf, thislen);
data/sgt-puzzles-20191231.79a5378/misc.c:401:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, str, len);
data/sgt-puzzles-20191231.79a5378/misc.c:415: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 str[2];
data/sgt-puzzles-20191231.79a5378/nestedvm.c:412: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 titlebuf[256];
data/sgt-puzzles-20191231.79a5378/nestedvm.c:413: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 textbuf[1024];
data/sgt-puzzles-20191231.79a5378/nestedvm.c:415: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(titlebuf, "About %.200s", thegame.name);
data/sgt-puzzles-20191231.79a5378/nestedvm.c:416: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(textbuf,
data/sgt-puzzles-20191231.79a5378/net.c:185: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[80];
data/sgt-puzzles-20191231.79a5378/net.c:217:18:  [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).
    ret->width = atoi(p);
data/sgt-puzzles-20191231.79a5378/net.c:221:23:  [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).
        ret->height = atoi(p);
data/sgt-puzzles-20191231.79a5378/net.c:245: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 ret[400];
data/sgt-puzzles-20191231.79a5378/net.c:248:11:  [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.
    len = sprintf(ret, "%dx%d", params->width, params->height);
data/sgt-puzzles-20191231.79a5378/net.c:252:16:  [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.
        len += sprintf(ret+len, "b%g", params->barrier_probability);
data/sgt-puzzles-20191231.79a5378/net.c:264: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[80];
data/sgt-puzzles-20191231.79a5378/net.c:270: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, "%d", params->width);
data/sgt-puzzles-20191231.79a5378/net.c:275: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, "%d", params->height);
data/sgt-puzzles-20191231.79a5378/net.c:284: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, "%g", params->barrier_probability);
data/sgt-puzzles-20191231.79a5378/net.c:301:18:  [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).
    ret->width = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/net.c:302:19:  [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).
    ret->height = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/net.c:919:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(perim2, perimeter, nperim * sizeof(struct xyd));
data/sgt-puzzles-20191231.79a5378/net.c:1730:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->tiles, state->tiles, state->width * state->height);
data/sgt-puzzles-20191231.79a5378/net.c:1762:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tiles, state->tiles, state->width * state->height);
data/sgt-puzzles-20191231.79a5378/net.c:1800: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 buf[80], *p = buf;
data/sgt-puzzles-20191231.79a5378/net.c:1811:11:  [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.
	    p += sprintf(p, ";L%d,%d", x, y);
data/sgt-puzzles-20191231.79a5378/net.c:1824:11:  [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.
	    p += sprintf(p, ";%c%d,%d", chr, x, y);
data/sgt-puzzles-20191231.79a5378/net.c:1827:11:  [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.
	    p += sprintf(p, ";L%d,%d", x, y);
data/sgt-puzzles-20191231.79a5378/net.c:1834:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ret+retlen, buf, p - buf);
data/sgt-puzzles-20191231.79a5378/net.c:2036: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/sgt-puzzles-20191231.79a5378/net.c:2041: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, "O%d,%d;C%d,%d", ui->org_x, ui->org_y, ui->cx, ui->cy);
data/sgt-puzzles-20191231.79a5378/net.c:2265: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 buf[80];
data/sgt-puzzles-20191231.79a5378/net.c:2266:2:  [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, "L%d,%d", tx, ty);
data/sgt-puzzles-20191231.79a5378/net.c:2270: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 buf[80];
data/sgt-puzzles-20191231.79a5378/net.c:2283:2:  [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, "%c%d,%d", (int)(action == ROTATE_LEFT ? 'A' :
data/sgt-puzzles-20191231.79a5378/net.c:2309: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.
			p += sprintf(p, ";%c%d,%d", "AFC"[rot-1], jx, jy);
data/sgt-puzzles-20191231.79a5378/net.c:3009: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 statusbuf[256], *p;
data/sgt-puzzles-20191231.79a5378/net.c:3017: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.
            p += sprintf(p, "Auto-solved. ");
data/sgt-puzzles-20191231.79a5378/net.c:3020: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.
            p += sprintf(p, "COMPLETED! ");
data/sgt-puzzles-20191231.79a5378/net.c:3044:22:  [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.
                p += sprintf(p, "Active: %d/%d", a, n2);
data/sgt-puzzles-20191231.79a5378/netslide.c:176: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[80];
data/sgt-puzzles-20191231.79a5378/netslide.c:215:18:  [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).
    ret->width = atoi(p);
data/sgt-puzzles-20191231.79a5378/netslide.c:219:23:  [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).
        ret->height = atoi(p);
data/sgt-puzzles-20191231.79a5378/netslide.c:229:31:  [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).
            ret->movetarget = atoi(++p);
data/sgt-puzzles-20191231.79a5378/netslide.c:238: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 ret[400];
data/sgt-puzzles-20191231.79a5378/netslide.c:241:11:  [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.
    len = sprintf(ret, "%dx%d", params->width, params->height);
data/sgt-puzzles-20191231.79a5378/netslide.c:245:16:  [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.
        len += sprintf(ret+len, "b%g", params->barrier_probability);
data/sgt-puzzles-20191231.79a5378/netslide.c:249:16:  [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.
        len += sprintf(ret+len, "m%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/netslide.c:259: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[80];
data/sgt-puzzles-20191231.79a5378/netslide.c:265: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, "%d", params->width);
data/sgt-puzzles-20191231.79a5378/netslide.c:270: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, "%d", params->height);
data/sgt-puzzles-20191231.79a5378/netslide.c:279: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, "%g", params->barrier_probability);
data/sgt-puzzles-20191231.79a5378/netslide.c:284: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, "%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/netslide.c:297:18:  [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).
    ret->width = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/netslide.c:298:19:  [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).
    ret->height = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/netslide.c:301:23:  [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).
    ret->movetarget = atoi(cfg[4].u.string.sval);
data/sgt-puzzles-20191231.79a5378/netslide.c:868:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->tiles, state->tiles, state->width * state->height);
data/sgt-puzzles-20191231.79a5378/netslide.c:870:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->barriers, state->barriers, state->width * state->height);
data/sgt-puzzles-20191231.79a5378/netslide.c:1059: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[80];
data/sgt-puzzles-20191231.79a5378/netslide.c:1120:2:  [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, "C%d,%d", cx, dy);
data/sgt-puzzles-20191231.79a5378/netslide.c:1122:2:  [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, "R%d,%d", cy, dx);
data/sgt-puzzles-20191231.79a5378/netslide.c:1769: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 statusbuf[256];
data/sgt-puzzles-20191231.79a5378/netslide.c:1778:6:  [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(statusbuf, "Moves since auto-solve: %d",
data/sgt-puzzles-20191231.79a5378/netslide.c:1786:13:  [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(statusbuf + strlen(statusbuf), " (target %d)",
data/sgt-puzzles-20191231.79a5378/netslide.c:1789:2:  [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(statusbuf + strlen(statusbuf), " Active: %d/%d", a, n);
data/sgt-puzzles-20191231.79a5378/palisade.c:28:30:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define scopy(dst, src, len) memcpy((dst), (src), (len) * sizeof (dst)[0])
data/sgt-puzzles-20191231.79a5378/palisade.c:29:22:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define dupmem(p, n) memcpy(smalloc(n * sizeof (*p)), p, n * sizeof (*p))
data/sgt-puzzles-20191231.79a5378/palisade.c:100:41:  [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).
    params->w = params->h = params->k = atoi(string);
data/sgt-puzzles-20191231.79a5378/palisade.c:103:21:  [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).
        params->h = atoi(++string);
data/sgt-puzzles-20191231.79a5378/palisade.c:106:37:  [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 (*string == 'n') params->k = atoi(++string);
data/sgt-puzzles-20191231.79a5378/palisade.c:143:17:  [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).
    params->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/palisade.c:144:17:  [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).
    params->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/palisade.c:145:17:  [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).
    params->k = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/palisade.c:1140: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[2];
data/sgt-puzzles-20191231.79a5378/palisade.c:1175: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[40];
data/sgt-puzzles-20191231.79a5378/palisade.c:1188: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, "Region size: %d", state->shared->params.k);
data/sgt-puzzles-20191231.79a5378/palisade.c:1326:17:  [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/sgt-puzzles-20191231.79a5378/pattern.c:87: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[80];
data/sgt-puzzles-20191231.79a5378/pattern.c:95: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(str, "%dx%d", ret->w, ret->h);
data/sgt-puzzles-20191231.79a5378/pattern.c:118:14:  [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).
    ret->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/pattern.c:122:18:  [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).
        ret->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/pattern.c:131: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 ret[400];
data/sgt-puzzles-20191231.79a5378/pattern.c:134:11:  [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.
    len = sprintf(ret, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/pattern.c:144: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[80];
data/sgt-puzzles-20191231.79a5378/pattern.c:150: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/pattern.c:155: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/pattern.c:168:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/pattern.c:169:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/pattern.c:305:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(fgrid2, fgrid, w*h*sizeof(float));
data/sgt-puzzles-20191231.79a5378/pattern.c:476: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 buf[80];
data/sgt-puzzles-20191231.79a5378/pattern.c:480: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.
	    thiscluewid += sprintf(buf, " %d", data[i]);
data/sgt-puzzles-20191231.79a5378/pattern.c:535:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(rowdata, state->common->rowdata + state->common->rowsize*(w+i), max*sizeof(int));
data/sgt-puzzles-20191231.79a5378/pattern.c:560:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(rowdata, state->common->rowdata + state->common->rowsize*i, max*sizeof(int));
data/sgt-puzzles-20191231.79a5378/pattern.c:597:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(rowdata, state->common->rowdata + state->common->rowsize*(w+i), max*sizeof(int));
data/sgt-puzzles-20191231.79a5378/pattern.c:621:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(rowdata, state->common->rowdata + state->common->rowsize*i, max*sizeof(int));
data/sgt-puzzles-20191231.79a5378/pattern.c:730: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 intbuf[80], *desc;
data/sgt-puzzles-20191231.79a5378/pattern.c:744:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(grid, picture, params->w * params->h);
data/sgt-puzzles-20191231.79a5378/pattern.c:826:32:  [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.
                desclen += 1 + sprintf(intbuf, "%d", rowdata[j]);
data/sgt-puzzles-20191231.79a5378/pattern.c:842:27:  [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.
                int len = sprintf(desc+descpos, "%d", rowdata[j]);
data/sgt-puzzles-20191231.79a5378/pattern.c:910:21:  [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).
                n = atoi(p);
data/sgt-puzzles-20191231.79a5378/pattern.c:999:21:  [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).
                    atoi(p);
data/sgt-puzzles-20191231.79a5378/pattern.c:1036:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, ret->common->w * ret->common->h);
data/sgt-puzzles-20191231.79a5378/pattern.c:1163:16:  [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.
	    int nch = sprintf(board + cell, "%*d", cw - 1,
data/sgt-puzzles-20191231.79a5378/pattern.c:1174:11:  [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.
	    p += sprintf(p, "%d", state->common->rowdata[(i+w)*state->common->rowsize + j]);
data/sgt-puzzles-20191231.79a5378/pattern.c:1176:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(start - (p - buf), buf, p - buf);
data/sgt-puzzles-20191231.79a5378/pattern.c:1195:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(board + topleft + h*ch*lw, board + topleft, gw - 1);
data/sgt-puzzles-20191231.79a5378/pattern.c:1347:6:  [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];
data/sgt-puzzles-20191231.79a5378/pattern.c:1348:6:  [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, "%c%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/pattern.c:1359: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 buf[80];
data/sgt-puzzles-20191231.79a5378/pattern.c:1369:2:  [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, "%c%d,%d,%d,%d", control ? shift ? 'U' : 'F' : 'E',
data/sgt-puzzles-20191231.79a5378/pattern.c:1378: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[80];
data/sgt-puzzles-20191231.79a5378/pattern.c:1392: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, "%c%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/pattern.c:1772: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 str[80];
data/sgt-puzzles-20191231.79a5378/pattern.c:1784: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(str, "%d", rowdata[j]);
data/sgt-puzzles-20191231.79a5378/pattern.c:2100: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[80];
data/sgt-puzzles-20191231.79a5378/pattern.c:2102: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.
		    thiswid += sprintf
data/sgt-puzzles-20191231.79a5378/pattern.c:2174: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[4096];
data/sgt-puzzles-20191231.79a5378/pattern.c:2206:12:  [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).
		par->w = atoi(num);
data/sgt-puzzles-20191231.79a5378/pattern.c:2208:12:  [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).
		par->h = atoi(num);
data/sgt-puzzles-20191231.79a5378/pearl.c:161: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[64];
data/sgt-puzzles-20191231.79a5378/pearl.c:191:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/pearl.c:195:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/pearl.c:218: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[256];
data/sgt-puzzles-20191231.79a5378/pearl.c:219: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/pearl.c:230: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[64];
data/sgt-puzzles-20191231.79a5378/pearl.c:236: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/pearl.c:241: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/pearl.c:263:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/pearl.c:264:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/pearl.c:1143:6:  [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[5], *p = s;
data/sgt-puzzles-20191231.79a5378/pearl.c:1180: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[5], *p = s;
data/sgt-puzzles-20191231.79a5378/pearl.c:1488: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 nbits[16] = { 0, 1, 1, 2,
data/sgt-puzzles-20191231.79a5378/pearl.c:1717: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.
            p += sprintf(p, ";R%d,%d,%d", new_lines[i], i%w, i/w);
data/sgt-puzzles-20191231.79a5378/pearl.c:2029: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, "%c%d,%d,%d;%c%d,%d,%d", ch, dir, x, y, ch, dir2, x2, y2);
data/sgt-puzzles-20191231.79a5378/pearl.c:2044: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 tmpbuf[80];
data/sgt-puzzles-20191231.79a5378/pearl.c:2726: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).
            seed = atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/pegs.c: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 str[80];
data/sgt-puzzles-20191231.79a5378/pegs.c:93:2:  [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(str + strlen(str), " %dx%d", ret->w, ret->h);
data/sgt-puzzles-20191231.79a5378/pegs.c:117:17:  [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).
    params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/pegs.c:121:21:  [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).
        params->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/pegs.c:134: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[80];
data/sgt-puzzles-20191231.79a5378/pegs.c:136: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(str, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/pegs.c:147: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[80];
data/sgt-puzzles-20191231.79a5378/pegs.c:151: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/pegs.c:156: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/pegs.c:174:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/pegs.c:175:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/pegs.c:698:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, w*h);
data/sgt-puzzles-20191231.79a5378/pegs.c:828: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[80];
data/sgt-puzzles-20191231.79a5378/pegs.c:894:2:  [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-%d,%d", ui->sx, ui->sy, tx, ty);
data/sgt-puzzles-20191231.79a5378/pegs.c:927:17:  [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-%d,%d", ui->cur_x, ui->cur_y, jx, jy);
data/sgt-puzzles-20191231.79a5378/penrose.c:209: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[255];
data/sgt-puzzles-20191231.79a5378/penrose.c:210: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,
data/sgt-puzzles-20191231.79a5378/penrose.c:576:21:  [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).
    ps.start_size = atoi(argv[1]);
data/sgt-puzzles-20191231.79a5378/penrose.c:577: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).
    ps.max_depth = atoi(argv[2]);
data/sgt-puzzles-20191231.79a5378/puzzles.h:514:14:  [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 block[64];
data/sgt-puzzles-20191231.79a5378/random.c:127:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->block + s->blkused, q, len);
data/sgt-puzzles-20191231.79a5378/random.c:134:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(s->block + s->blkused, q, 64 - s->blkused);
data/sgt-puzzles-20191231.79a5378/random.c:148:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->block, q, len);
data/sgt-puzzles-20191231.79a5378/random.c:157:14:  [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 c[64];
data/sgt-puzzles-20191231.79a5378/random.c:205:14:  [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 seedbuf[40];
data/sgt-puzzles-20191231.79a5378/random.c:206:14:  [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 databuf[20];
data/sgt-puzzles-20191231.79a5378/random.c:295: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 retbuf[256];
data/sgt-puzzles-20191231.79a5378/random.c:299: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.
	len += sprintf(retbuf+len, "%02x", state->seedbuf[i]);
data/sgt-puzzles-20191231.79a5378/random.c:301: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.
	len += sprintf(retbuf+len, "%02x", state->databuf[i]);
data/sgt-puzzles-20191231.79a5378/random.c:302:12:  [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.
    len += sprintf(retbuf+len, "%02x", state->pos);
data/sgt-puzzles-20191231.79a5378/range.c:148:29:  [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).
    params->w = params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/range.c:152:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/range.c:159: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[80];
data/sgt-puzzles-20191231.79a5378/range.c:160: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(str, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/range.c:187:14:  [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).
    ret->w = atoi(configuration[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/range.c:188:14:  [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).
    ret->h = atoi(configuration[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/range.c:194:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dst, src, n * sizeof (type)); \
data/sgt-puzzles-20191231.79a5378/range.c:321: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 colour[2] = "BW";
data/sgt-puzzles-20191231.79a5378/range.c:326:20:  [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.
            str += sprintf(str, "%c,%d,%d", colour[it->colour],
data/sgt-puzzles-20191231.79a5378/range.c:1068:14:  [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.
		desclen += sprintf(desc+desclen, "%d", n);
data/sgt-puzzles-20191231.79a5378/range.c:1089:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            int val = atoi(desc-1);
data/sgt-puzzles-20191231.79a5378/range.c:1133:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            int val = atoi(p-1);
data/sgt-puzzles-20191231.79a5378/range.c:1189:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, gridline, w_string);
data/sgt-puzzles-20191231.79a5378/range.c:1198:24:  [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.
                buf += sprintf(buf, "|%*d", cellsize - 1, state->grid[i]);
data/sgt-puzzles-20191231.79a5378/range.c:1205:16:  [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.
        buf += sprintf(buf, "|\n");
data/sgt-puzzles-20191231.79a5378/range.c:1207:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, gridline, w_string);
data/sgt-puzzles-20191231.79a5378/rect.c:102: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[80];
data/sgt-puzzles-20191231.79a5378/rect.c:117: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, "%dx%d", w, h);
data/sgt-puzzles-20191231.79a5378/rect.c:141:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/rect.c:145:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/rect.c:162: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 data[256];
data/sgt-puzzles-20191231.79a5378/rect.c:164: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/rect.c:166: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(data + strlen(data), "e%g", params->expandfactor);
data/sgt-puzzles-20191231.79a5378/rect.c:176: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[80];
data/sgt-puzzles-20191231.79a5378/rect.c:182: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/rect.c:187: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/rect.c:192: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, "%g", params->expandfactor);
data/sgt-puzzles-20191231.79a5378/rect.c:209:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/rect.c:210:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/rect.c:1764:22:  [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.
                p += sprintf(p, "%d", n);
data/sgt-puzzles-20191231.79a5378/rect.c:1927: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).
            state->grid[i++] = atoi(desc-1);
data/sgt-puzzles-20191231.79a5378/rect.c:1960:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, state->w * state->h * sizeof(int));
data/sgt-puzzles-20191231.79a5378/rect.c:1961:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->vedge, state->vedge, state->w*state->h*sizeof(unsigned char));
data/sgt-puzzles-20191231.79a5378/rect.c:1962:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->hedge, state->hedge, state->w*state->h*sizeof(unsigned char));
data/sgt-puzzles-20191231.79a5378/rect.c:1964:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->correct, state->correct, state->w*state->h*sizeof(unsigned char));
data/sgt-puzzles-20191231.79a5378/rect.c:2054: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 *ret, *p, buf[80];
data/sgt-puzzles-20191231.79a5378/rect.c:2064:6:  [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.
	x = sprintf(buf, "%d", state->grid[i]);
data/sgt-puzzles-20191231.79a5378/rect.c:2086: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, "%*d", col, v);
data/sgt-puzzles-20191231.79a5378/rect.c:2089:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(p, buf, col);
data/sgt-puzzles-20191231.79a5378/rect.c:2383: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[80], *ret;
data/sgt-puzzles-20191231.79a5378/rect.c:2503: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, "%c%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/rect.c:2510: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, "H%d,%d", xc/2, yc/2);
data/sgt-puzzles-20191231.79a5378/rect.c:2514: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, "V%d,%d", xc/2, yc/2);
data/sgt-puzzles-20191231.79a5378/rect.c:2702: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[80];
data/sgt-puzzles-20191231.79a5378/rect.c:2710:2:  [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(str, "%d", grid(state,x,y));
data/sgt-puzzles-20191231.79a5378/rect.c:2765:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(hedge, state->hedge, state->w*state->h);
data/sgt-puzzles-20191231.79a5378/rect.c:2766:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(vedge, state->vedge, state->w*state->h);
data/sgt-puzzles-20191231.79a5378/rect.c:2840: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 buf[256];
data/sgt-puzzles-20191231.79a5378/rect.c:2845:6:  [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, "%dx%d ",
data/sgt-puzzles-20191231.79a5378/rect.c:2853:13:  [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(buf, "Auto-solved.");
data/sgt-puzzles-20191231.79a5378/rect.c:2855:13:  [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(buf, "COMPLETED!");
data/sgt-puzzles-20191231.79a5378/rect.c:2950: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[80];
data/sgt-puzzles-20191231.79a5378/rect.c:2951: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(str, "%d", grid(state,x,y));
data/sgt-puzzles-20191231.79a5378/samegame.c:164: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[80];
data/sgt-puzzles-20191231.79a5378/samegame.c:172: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(str, "%dx%d, %d colours", ret->w, ret->h, ret->ncols);
data/sgt-puzzles-20191231.79a5378/samegame.c:195:17:  [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).
    params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/samegame.c:199:14:  [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).
	params->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/samegame.c:206:18:  [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).
	params->ncols = atoi(p);
data/sgt-puzzles-20191231.79a5378/samegame.c:213:21:  [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).
	params->scoresub = atoi(p);
data/sgt-puzzles-20191231.79a5378/samegame.c:226: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 ret[80];
data/sgt-puzzles-20191231.79a5378/samegame.c:237: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[80];
data/sgt-puzzles-20191231.79a5378/samegame.c:243: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/samegame.c:248: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/samegame.c:253: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, "%d", params->ncols);
data/sgt-puzzles-20191231.79a5378/samegame.c:275:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/samegame.c:276:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/samegame.c:277:18:  [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).
    ret->ncols = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/samegame.c:431:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(grid2, grid, wh * sizeof(int));
data/sgt-puzzles-20191231.79a5378/samegame.c:809:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(grid, grid2, wh * sizeof(int));
data/sgt-puzzles-20191231.79a5378/samegame.c:932: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 buf[80];
data/sgt-puzzles-20191231.79a5378/samegame.c:935:6:  [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.
	k = sprintf(buf, "%d,", tiles[i]);
data/sgt-puzzles-20191231.79a5378/samegame.c:964:6:  [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).
	n = atoi(q);
data/sgt-puzzles-20191231.79a5378/samegame.c:986: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).
	state->tiles[i] = atoi(p);
data/sgt-puzzles-20191231.79a5378/samegame.c:1005:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->tiles, state->tiles, state->n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/samegame.c:1115: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 *ret, buf[80];
data/sgt-puzzles-20191231.79a5378/samegame.c:1327:10:  [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).
	    i = atoi(move);
data/sgt-puzzles-20191231.79a5378/samegame.c:1585: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 status[255], score[80];
data/sgt-puzzles-20191231.79a5378/samegame.c:1587:2:  [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(score, "Score: %d", state->score);
data/sgt-puzzles-20191231.79a5378/signpost.c:46:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *dirstrings[8] = { "N ", "NE", "E ", "SE", "S ", "SW", "W ", "NW" };
data/sgt-puzzles-20191231.79a5378/signpost.c:324: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[80];
data/sgt-puzzles-20191231.79a5378/signpost.c:354:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/signpost.c:358:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/signpost.c:371: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 data[256];
data/sgt-puzzles-20191231.79a5378/signpost.c:377: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/signpost.c:385: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[80];
data/sgt-puzzles-20191231.79a5378/signpost.c:391: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/signpost.c:396: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/signpost.c:413:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/signpost.c:414:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/signpost.c:471:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to->dirs, from->dirs, to->n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/signpost.c:472:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to->flags, from->flags, to->n*sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/signpost.c:473:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to->nums, from->nums, to->n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/signpost.c:475:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to->next, from->next, to->n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/signpost.c:476:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to->prev, from->prev, to->n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/signpost.c:478:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to->dsf, from->dsf, to->n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/signpost.c:479:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to->numsi, from->numsi, (to->n+1)*sizeof(int));
data/sgt-puzzles-20191231.79a5378/signpost.c:556: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 *ret, buf[80];
data/sgt-puzzles-20191231.79a5378/signpost.c:567:17:  [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.
            k = sprintf(buf, "%d%c", state->nums[i], (int)(state->dirs[i]+'a'));
data/sgt-puzzles-20191231.79a5378/signpost.c:569:17:  [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.
            k = sprintf(buf, "%c", (int)(state->dirs[i]+'a'));
data/sgt-puzzles-20191231.79a5378/signpost.c:1442: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[80];
data/sgt-puzzles-20191231.79a5378/signpost.c:1461:17:  [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, "L%d,%d-%d,%d", ui->sx, ui->sy, ui->cx, ui->cy);
data/sgt-puzzles-20191231.79a5378/signpost.c:1465:17:  [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, "L%d,%d-%d,%d", ui->cx, ui->cy, ui->sx, ui->sy);
data/sgt-puzzles-20191231.79a5378/signpost.c:1518:13:  [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, "%c%d,%d",
data/sgt-puzzles-20191231.79a5378/signpost.c:1526:13:  [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, "L%d,%d-%d,%d", ui->sx, ui->sy, x, y);
data/sgt-puzzles-20191231.79a5378/signpost.c:1530:13:  [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, "L%d,%d-%d,%d", x, y, ui->sx, ui->sy);
data/sgt-puzzles-20191231.79a5378/signpost.c:1539: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, "%c%d,%d",
data/sgt-puzzles-20191231.79a5378/signpost.c:1862: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/sgt-puzzles-20191231.79a5378/signpost.c:1964:13:  [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", num);
data/sgt-puzzles-20191231.79a5378/signpost.c:1970:17:  [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", n);  /* Just to get the length... */
data/sgt-puzzles-20191231.79a5378/signpost.c:1972:17:  [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(p, "+%d", n);
data/sgt-puzzles-20191231.79a5378/signpost.c:2298: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 newseed[16];
data/sgt-puzzles-20191231.79a5378/signpost.c:2414:17:  [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).
            n = atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/signpost.c:2427: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(newseed, "%lu", (unsigned long) time(NULL));
data/sgt-puzzles-20191231.79a5378/signpost.c:2486: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[4096];
data/sgt-puzzles-20191231.79a5378/singles.c:153: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[80];
data/sgt-puzzles-20191231.79a5378/singles.c:185:23:  [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).
    ret->w = ret->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/singles.c:189:18:  [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).
        ret->h = atoi(p);
data/sgt-puzzles-20191231.79a5378/singles.c:205: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 data[256];
data/sgt-puzzles-20191231.79a5378/singles.c:208: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(data, "%dx%dd%c", params->w, params->h, singles_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/singles.c:210: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/singles.c:218: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[80];
data/sgt-puzzles-20191231.79a5378/singles.c:224: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/singles.c:229: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/singles.c:247:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/singles.c:248:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/singles.c:301:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->nums, state->nums, state->n*sizeof(int));
data/sgt-puzzles-20191231.79a5378/singles.c:302:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->flags, state->flags, state->n*sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/singles.c:591: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.
                k = sprintf(buf, "%c%d,%d;", (int)c, x, y);
data/sgt-puzzles-20191231.79a5378/singles.c:1228:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(tosolve->nums, state->nums, state->n * sizeof(int));
data/sgt-puzzles-20191231.79a5378/singles.c:1496: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[80], c;
data/sgt-puzzles-20191231.79a5378/singles.c:1537: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, "%c%d,%d", (int)c, x, y);
data/sgt-puzzles-20191231.79a5378/singles.c:1659: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[32];
data/sgt-puzzles-20191231.79a5378/singles.c:1683: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, "%d", num);
data/sgt-puzzles-20191231.79a5378/singles.c:1786: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[32];
data/sgt-puzzles-20191231.79a5378/singles.c:1808:17:  [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", state->nums[i]);
data/sgt-puzzles-20191231.79a5378/singles.c:1944:28:  [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).
            seed = (time_t)atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/sixteen.c:69: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[80];
data/sgt-puzzles-20191231.79a5378/sixteen.c:80: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, "%dx%d", w, h);
data/sgt-puzzles-20191231.79a5378/sixteen.c:103:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/sixteen.c:108:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/sixteen.c:114:27:  [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).
        ret->movetarget = atoi(string);
data/sgt-puzzles-20191231.79a5378/sixteen.c:122: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 data[256];
data/sgt-puzzles-20191231.79a5378/sixteen.c:124: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/sixteen.c:128: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(data + strlen(data), "m%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/sixteen.c:136: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[80];
data/sgt-puzzles-20191231.79a5378/sixteen.c:142: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/sixteen.c:147: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/sixteen.c:152: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, "%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/sixteen.c:165:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/sixteen.c:166:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/sixteen.c:167:23:  [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).
    ret->movetarget = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/sixteen.c:383: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[80];
data/sgt-puzzles-20191231.79a5378/sixteen.c:386:13:  [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.
        k = sprintf(buf, "%d,", tiles[i]+1);
data/sgt-puzzles-20191231.79a5378/sixteen.c:432:6:  [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).
	n = atoi(q);
data/sgt-puzzles-20191231.79a5378/sixteen.c:467:27:  [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).
        state->tiles[i] = atoi(p);
data/sgt-puzzles-20191231.79a5378/sixteen.c:490:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->tiles, state->tiles, state->w * state->h * sizeof(int));
data/sgt-puzzles-20191231.79a5378/sixteen.c:519: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 *ret, *p, buf[80];
data/sgt-puzzles-20191231.79a5378/sixteen.c:526:11:  [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.
    col = sprintf(buf, "%d", state->n);
data/sgt-puzzles-20191231.79a5378/sixteen.c:541:6:  [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", col, v);
data/sgt-puzzles-20191231.79a5378/sixteen.c:542:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(p, buf, col);
data/sgt-puzzles-20191231.79a5378/sixteen.c:607: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[80];
data/sgt-puzzles-20191231.79a5378/sixteen.c:629:17:  [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, "R%d,%c1", y, x ? '+' : '-');
data/sgt-puzzles-20191231.79a5378/sixteen.c:631:17:  [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, "C%d,%c1", x, y ? '+' : '-');
data/sgt-puzzles-20191231.79a5378/sixteen.c:633:17:  [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, "C%d,%d", x, y - ui->cur_y);
data/sgt-puzzles-20191231.79a5378/sixteen.c:635:17:  [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, "R%d,%d", y, x - ui->cur_x);
data/sgt-puzzles-20191231.79a5378/sixteen.c:717:2:  [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, "R%d,%d", cy, dx);
data/sgt-puzzles-20191231.79a5378/sixteen.c:719:2:  [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, "C%d,%d", cx, dy);
data/sgt-puzzles-20191231.79a5378/sixteen.c:855: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 str[40];
data/sgt-puzzles-20191231.79a5378/sixteen.c:873: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(str, "%d", tile);
data/sgt-puzzles-20191231.79a5378/sixteen.c:1108: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 statusbuf[256];
data/sgt-puzzles-20191231.79a5378/sixteen.c:1118:6:  [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(statusbuf, "Moves since auto-solve: %d",
data/sgt-puzzles-20191231.79a5378/sixteen.c:1125:17:  [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(statusbuf+strlen(statusbuf), " (target %d)",
data/sgt-puzzles-20191231.79a5378/slant.c:120: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[80];
data/sgt-puzzles-20191231.79a5378/slant.c:149:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/slant.c:153:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/slant.c:168: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 data[256];
data/sgt-puzzles-20191231.79a5378/slant.c:170: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/slant.c:172:2:  [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(data + strlen(data), "d%c", slant_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/slant.c:180: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[80];
data/sgt-puzzles-20191231.79a5378/slant.c:186: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/slant.c:191: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/slant.c:209:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/slant.c:210:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/slant.c:1291:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->soln, state->soln, w*h);
data/sgt-puzzles-20191231.79a5378/slant.c:1294:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->errors, state->errors, W*H);
data/sgt-puzzles-20191231.79a5378/slant.c:1469: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 *move, buf[80];
data/sgt-puzzles-20191231.79a5378/slant.c:1511:13:  [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.
		int len = sprintf(buf, ";%c%d,%d", (int)(v < 0 ? '\\' : '/'), x, y);
data/sgt-puzzles-20191231.79a5378/slant.c:1652: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[80];
data/sgt-puzzles-20191231.79a5378/slant.c:1701:2:  [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, "%c%d,%d", button == '\b' ? 'C' : button, x, y);
data/sgt-puzzles-20191231.79a5378/slant.c:1722: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, "%c%d,%d", (int)(v==-1 ? '\\' : v==+1 ? '/' : 'C'), x, y);
data/sgt-puzzles-20191231.79a5378/slant.c:1850: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 p[2];
data/sgt-puzzles-20191231.79a5378/solo.c:338:23:  [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).
    ret->c = ret->r = atoi(string);
data/sgt-puzzles-20191231.79a5378/solo.c:344:18:  [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).
        ret->r = atoi(string);
data/sgt-puzzles-20191231.79a5378/solo.c:370:18:  [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).
            sn = atoi(string);
data/sgt-puzzles-20191231.79a5378/solo.c:405: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[80];
data/sgt-puzzles-20191231.79a5378/solo.c:408:2:  [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(str, "%dx%d", params->c, params->r);
data/sgt-puzzles-20191231.79a5378/solo.c:410:2:  [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(str, "%dj", params->c);
data/sgt-puzzles-20191231.79a5378/solo.c:418:27:  [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.
          case SYMM_REF8: strcat(str, "m8"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:419:27:  [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.
          case SYMM_REF4: strcat(str, "m4"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:420:28:  [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.
          case SYMM_REF4D: strcat(str, "md4"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:421:27:  [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.
          case SYMM_REF2: strcat(str, "m2"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:422:28:  [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.
          case SYMM_REF2D: strcat(str, "md2"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:423:27:  [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.
          case SYMM_ROT4: strcat(str, "r4"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:429:29:  [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.
          case DIFF_SIMPLE: strcat(str, "db"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:430:32:  [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.
          case DIFF_INTERSECT: strcat(str, "di"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:431:26:  [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.
          case DIFF_SET: strcat(str, "da"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:432:30:  [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.
          case DIFF_EXTREME: strcat(str, "de"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:433:32:  [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.
          case DIFF_RECURSIVE: strcat(str, "du"); break;
data/sgt-puzzles-20191231.79a5378/solo.c:442: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[80];
data/sgt-puzzles-20191231.79a5378/solo.c:448: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, "%d", params->c);
data/sgt-puzzles-20191231.79a5378/solo.c:453: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, "%d", params->r);
data/sgt-puzzles-20191231.79a5378/solo.c:490:14:  [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).
    ret->c = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/solo.c:491:14:  [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).
    ret->r = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/solo.c:573:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nb->nr_squares, b->nr_squares, b->nr_blocks * sizeof *b->nr_squares);
data/sgt-puzzles-20191231.79a5378/solo.c:574:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nb->whichblock, b->whichblock, b->area * sizeof *b->whichblock);
data/sgt-puzzles-20191231.79a5378/solo.c:575:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nb->blocks_data, b->blocks_data,
data/sgt-puzzles-20191231.79a5378/solo.c:581:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nb->blocknames, b->blocknames, b->c * b->r *(sizeof(char *)+80));
data/sgt-puzzles-20191231.79a5378/solo.c:1931:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(extra_list, region, cr * sizeof *extra_list);
data/sgt-puzzles-20191231.79a5378/solo.c:2533:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ingrid, grid, cr * cr);
data/sgt-puzzles-20191231.79a5378/solo.c:2558:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(outgrid, ingrid, cr * cr);
data/sgt-puzzles-20191231.79a5378/solo.c:2583:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(grid, outgrid, cr*cr);
data/sgt-puzzles-20191231.79a5378/solo.c:3344:8:  [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.
		p += sprintf(p, "%d", n);
data/sgt-puzzles-20191231.79a5378/solo.c:3423:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(b->blocks[n1] + b->nr_squares[n1], b->blocks[n2],
data/sgt-puzzles-20191231.79a5378/solo.c:3429:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(b->blocks[n2], b->blocks[n1],
data/sgt-puzzles-20191231.79a5378/solo.c:3736:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(grid2, grid, area);
data/sgt-puzzles-20191231.79a5378/solo.c:3836:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(grid2, grid, area);
data/sgt-puzzles-20191231.79a5378/solo.c:3849:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(grid2, grid, area);
data/sgt-puzzles-20191231.79a5378/solo.c:3890:25:  [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).
            grid[i++] = atoi(desc-1);
data/sgt-puzzles-20191231.79a5378/solo.c:3987:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            int val = atoi(desc-1);
data/sgt-puzzles-20191231.79a5378/solo.c:4209:16:  [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.
		    p += 1 + sprintf(p, "starting at (%d,%d)",
data/sgt-puzzles-20191231.79a5378/solo.c:4218:16:  [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.
		    p += 1 + sprintf(p, "(%d,%d)", bx+1, by+1);
data/sgt-puzzles-20191231.79a5378/solo.c:4247:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, area);
data/sgt-puzzles-20191231.79a5378/solo.c:4251:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret->kgrid, state->kgrid, area);
data/sgt-puzzles-20191231.79a5378/solo.c:4256:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->pencil, state->pencil, area * cr * sizeof(bool));
data/sgt-puzzles-20191231.79a5378/solo.c:4259:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->immutable, state->immutable, area * sizeof(bool));
data/sgt-puzzles-20191231.79a5378/solo.c:4296:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(grid, state->grid, cr*cr);
data/sgt-puzzles-20191231.79a5378/solo.c:4614: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[80];
data/sgt-puzzles-20191231.79a5378/solo.c:4698:2:  [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, "%c%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/solo.c:4726:21:  [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).
	    ret->grid[n] = atoi(p);
data/sgt-puzzles-20191231.79a5378/solo.c:4891: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[20];
data/sgt-puzzles-20191231.79a5378/solo.c:5033:2:  [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 (str, "%d", state->kgrid[y*cr+x]);
data/sgt-puzzles-20191231.79a5378/solo.c:5164:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ds->pencil+(y*cr+x)*cr, state->pencil+(y*cr+x)*cr, cr);
data/sgt-puzzles-20191231.79a5378/solo.c:5560: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 str[20];
data/sgt-puzzles-20191231.79a5378/solo.c:5561: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(str, "%d", state->kgrid[y*cr+x]);
data/sgt-puzzles-20191231.79a5378/solo.c:5577: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];
data/sgt-puzzles-20191231.79a5378/sort.c:14: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 t[4096];
data/sgt-puzzles-20191231.79a5378/sort.c:20:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(t, a, thissize);
data/sgt-puzzles-20191231.79a5378/sort.c:21:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(a, b, thissize);
data/sgt-puzzles-20191231.79a5378/sort.c:22:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(b, t, thissize);
data/sgt-puzzles-20191231.79a5378/sort.c:137:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(reset, data, sizeof(data));
data/sgt-puzzles-20191231.79a5378/tents.c:307: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[80];
data/sgt-puzzles-20191231.79a5378/tents.c:336:29:  [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).
    params->w = params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/tents.c:340:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/tents.c:355: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/sgt-puzzles-20191231.79a5378/tents.c:357: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/tents.c:359:2:  [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 + strlen(buf), "d%c",
data/sgt-puzzles-20191231.79a5378/tents.c:367: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[80];
data/sgt-puzzles-20191231.79a5378/tents.c:373: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/tents.c:378: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/tents.c:396:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/tents.c:397:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/tents.c:468:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(soln, grid, w*h);
data/sgt-puzzles-20191231.79a5378/tents.c:1160: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.
	p += sprintf(p, ",%d", numbers[i]);
data/sgt-puzzles-20191231.79a5378/tents.c:1172: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.
            p += sprintf(p, ";T%d,%d", i%w, i/w);
data/sgt-puzzles-20191231.79a5378/tents.c:1281:31:  [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).
	state->numbers->numbers[i] = atoi(desc);
data/sgt-puzzles-20191231.79a5378/tents.c:1297:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, w*h);
data/sgt-puzzles-20191231.79a5378/tents.c:1356:22:  [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.
                p += sprintf(p, ";T%d,%d", i%w, i/w);
data/sgt-puzzles-20191231.79a5378/tents.c:1389:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		case TENT: memcpy(board + center - 1, "//\\", 3); break;
data/sgt-puzzles-20191231.79a5378/tents.c:1391:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		default: memcpy(board + center - 1, "wtf", 3);
data/sgt-puzzles-20191231.79a5378/tents.c:1546: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 tmpbuf[80];
data/sgt-puzzles-20191231.79a5378/tents.c:1689:13:  [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(tmpbuf, "%c%d,%d", (int)rep, ui->cx, ui->cy);
data/sgt-puzzles-20191231.79a5378/tents.c:2448:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tmpgrid, state->grid, w*h);
data/sgt-puzzles-20191231.79a5378/tents.c:2498:6:  [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];
data/sgt-puzzles-20191231.79a5378/tents.c:2501:6:  [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", state->numbers->numbers[x]);
data/sgt-puzzles-20191231.79a5378/tents.c:2512:6:  [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];
data/sgt-puzzles-20191231.79a5378/tents.c:2515:6:  [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", state->numbers->numbers[w+y]);
data/sgt-puzzles-20191231.79a5378/towers.c: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[80];
data/sgt-puzzles-20191231.79a5378/towers.c:177:17:  [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).
    params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/towers.c:196: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 ret[80];
data/sgt-puzzles-20191231.79a5378/towers.c:198: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(ret, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/towers.c:200: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(ret + strlen(ret), "d%c", towers_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/towers.c:208: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[80];
data/sgt-puzzles-20191231.79a5378/towers.c:214: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/towers.c:232:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/towers.c:267: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 prefix[256];
data/sgt-puzzles-20191231.79a5378/towers.c:448: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 prefix[256];
data/sgt-puzzles-20191231.79a5378/towers.c:673:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(soln, grid, a);
data/sgt-puzzles-20191231.79a5378/towers.c:693:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(soln2, grid, a);
data/sgt-puzzles-20191231.79a5378/towers.c:708:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(soln2, grid, a);
data/sgt-puzzles-20191231.79a5378/towers.c:720:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(soln2, grid, a);
data/sgt-puzzles-20191231.79a5378/towers.c:740: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.
            p += sprintf(p, "%d", clues[i]);
data/sgt-puzzles-20191231.79a5378/towers.c:772:12:  [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.
		    p += sprintf(p, "%d", n);
data/sgt-puzzles-20191231.79a5378/towers.c:823:13:  [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).
	    clue = atoi(p);
data/sgt-puzzles-20191231.79a5378/towers.c:848:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		int val = atoi(p-1);
data/sgt-puzzles-20191231.79a5378/towers.c:918:31:  [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).
	    state->clues->clues[i] = atoi(p);
data/sgt-puzzles-20191231.79a5378/towers.c:934:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		int val = atoi(p-1);
data/sgt-puzzles-20191231.79a5378/towers.c:966:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, a*sizeof(digit));
data/sgt-puzzles-20191231.79a5378/towers.c:967:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->pencil, state->pencil, a*sizeof(int));
data/sgt-puzzles-20191231.79a5378/towers.c:968:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->clues_done, state->clues_done, 4*w*sizeof(bool));
data/sgt-puzzles-20191231.79a5378/towers.c:1001:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(soln, state->clues->immutable, a);
data/sgt-puzzles-20191231.79a5378/towers.c:1318: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[80];
data/sgt-puzzles-20191231.79a5378/towers.c:1396:13:  [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, "%c%d,%d", 'D', tx, ty);
data/sgt-puzzles-20191231.79a5378/towers.c:1410:17:  [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, "%c%d,%d", 'D', x, y);
data/sgt-puzzles-20191231.79a5378/towers.c:1447:2:  [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, "%c%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/towers.c:1609: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[64];
data/sgt-puzzles-20191231.79a5378/towers.c:1964: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 str[128];
data/sgt-puzzles-20191231.79a5378/towers.c:1971:2:  [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 (str, "%d", state->clues->clues[i]);
data/sgt-puzzles-20191231.79a5378/towers.c:1985: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];
data/sgt-puzzles-20191231.79a5378/towers.c:2095:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->grid, s->clues->immutable, p->w * p->w);
data/sgt-puzzles-20191231.79a5378/towers.c:2107:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(s->grid, s->clues->immutable, p->w * p->w);
data/sgt-puzzles-20191231.79a5378/tracks.c:77: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[80];
data/sgt-puzzles-20191231.79a5378/tracks.c:106:29:  [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).
    params->w = params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/tracks.c:110:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/tracks.c:132: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/sgt-puzzles-20191231.79a5378/tracks.c:134: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/tracks.c:145: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[80];
data/sgt-puzzles-20191231.79a5378/tracks.c:151: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/tracks.c:156: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/tracks.c:178:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/tracks.c:179:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/tracks.c:360:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest->sflags, src->sflags, w*h*sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/tracks.c:376:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->num_errors, state->num_errors, (w+h)*sizeof(int));
data/sgt-puzzles-20191231.79a5378/tracks.c:876: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).
        state->numbers->numbers[i] = atoi(desc);
data/sgt-puzzles-20191231.79a5378/tracks.c:1852: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, "%c%c%d,%d", c, MOVECHAR(dir), x, y);
data/sgt-puzzles-20191231.79a5378/tracks.c:1865: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, "%cS%d,%d", c, x, y);
data/sgt-puzzles-20191231.79a5378/tracks.c:1906: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 tmpbuf[80];
data/sgt-puzzles-20191231.79a5378/tracks.c:2431: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/sgt-puzzles-20191231.79a5378/tracks.c:2444: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, "%d", clue);
data/sgt-puzzles-20191231.79a5378/tree234.c:2119:48:  [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.
	printf("deleting string %s from index %d\n", (char *)array[j], j);
data/sgt-puzzles-20191231.79a5378/twiddle.c:107:23:  [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).
    ret->w = ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/twiddle.c:115:18:  [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).
        ret->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/twiddle.c:120:18:  [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).
        ret->n = atoi(string);
data/sgt-puzzles-20191231.79a5378/twiddle.c:130:24:  [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).
	    ret->movetarget = atoi(string);
data/sgt-puzzles-20191231.79a5378/twiddle.c:139: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[256];
data/sgt-puzzles-20191231.79a5378/twiddle.c:146: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 + strlen(buf), "m%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/twiddle.c:153: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[80];
data/sgt-puzzles-20191231.79a5378/twiddle.c:159: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/twiddle.c:164: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/twiddle.c:169: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, "%d", params->n);
data/sgt-puzzles-20191231.79a5378/twiddle.c:182: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, "%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/twiddle.c:195:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/twiddle.c:196:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/twiddle.c:197:14:  [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).
    ret->n = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/twiddle.c:200:23:  [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).
    ret->movetarget = atoi(cfg[5].u.string.sval);
data/sgt-puzzles-20191231.79a5378/twiddle.c:409: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[80];
data/sgt-puzzles-20191231.79a5378/twiddle.c:412:13:  [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.
        k = sprintf(buf, "%d%c", grid[i] / 4,
data/sgt-puzzles-20191231.79a5378/twiddle.c:478:23:  [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).
	state->grid[i] = 4 * atoi(p);
data/sgt-puzzles-20191231.79a5378/twiddle.c:513:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, ret->w * ret->h * sizeof(int));
data/sgt-puzzles-20191231.79a5378/twiddle.c:549: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 *ret, *p, buf[80];
data/sgt-puzzles-20191231.79a5378/twiddle.c:566:6:  [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.
	x = sprintf(buf, "%d", state->grid[i] / 4);
data/sgt-puzzles-20191231.79a5378/twiddle.c:588:6:  [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", col, v/4);
data/sgt-puzzles-20191231.79a5378/twiddle.c:589:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(p, buf, col);
data/sgt-puzzles-20191231.79a5378/twiddle.c:653: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[80];
data/sgt-puzzles-20191231.79a5378/twiddle.c:736: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, "M%d,%d,%d", x, y, dir);
data/sgt-puzzles-20191231.79a5378/twiddle.c:886: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[40];
data/sgt-puzzles-20191231.79a5378/twiddle.c:1011: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(str, "%d", tile / 4);
data/sgt-puzzles-20191231.79a5378/twiddle.c:1245: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 statusbuf[256];
data/sgt-puzzles-20191231.79a5378/twiddle.c:1255:6:  [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(statusbuf, "Moves since auto-solve: %d",
data/sgt-puzzles-20191231.79a5378/twiddle.c:1262:17:  [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(statusbuf+strlen(statusbuf), " (target %d)",
data/sgt-puzzles-20191231.79a5378/undead.c: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[64];
data/sgt-puzzles-20191231.79a5378/undead.c:125:29:  [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).
    params->w = params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/undead.c:130:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/undead.c:149: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[256];
data/sgt-puzzles-20191231.79a5378/undead.c:150: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, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/undead.c:152: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 + strlen(buf), "d%c", undead_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/undead.c:159: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[64];
data/sgt-puzzles-20191231.79a5378/undead.c:165: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/undead.c:170: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/undead.c:188:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/undead.c:189:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/undead.c:309:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ret->guess, state->guess, ret->common->num_total*sizeof(int));
data/sgt-puzzles-20191231.79a5378/undead.c:315:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ret->pencils, state->pencils,
data/sgt-puzzles-20191231.79a5378/undead.c:322:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ret->cell_errors, state->cell_errors,
data/sgt-puzzles-20191231.79a5378/undead.c:329:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ret->hint_errors, state->hint_errors,
data/sgt-puzzles-20191231.79a5378/undead.c:336:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ret->hints_done, state->hints_done,
data/sgt-puzzles-20191231.79a5378/undead.c:692:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(views.node->guess, path_guess.guess,
data/sgt-puzzles-20191231.79a5378/undead.c:719:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(single_views.node->guess, test_views.node->guess,
data/sgt-puzzles-20191231.79a5378/undead.c:738:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(test_entry.guess, single_views.node->guess,
data/sgt-puzzles-20191231.79a5378/undead.c:1266:10:  [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.
    e += sprintf(e, "%d,", new->common->num_ghosts);
data/sgt-puzzles-20191231.79a5378/undead.c:1267:10:  [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.
    e += sprintf(e, "%d,", new->common->num_vampires);
data/sgt-puzzles-20191231.79a5378/undead.c:1268:10:  [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.
    e += sprintf(e, "%d,", new->common->num_zombies);
data/sgt-puzzles-20191231.79a5378/undead.c:1298:14:  [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.
        e += sprintf(e, ",%d", new->common->grid[x+y*(new->common->params.w+2)]);
data/sgt-puzzles-20191231.79a5378/undead.c:1345:33:  [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).
    state->common->num_ghosts = atoi(desc);
data/sgt-puzzles-20191231.79a5378/undead.c:1348:35:  [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).
    state->common->num_vampires = atoi(desc);
data/sgt-puzzles-20191231.79a5378/undead.c:1351:34:  [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).
    state->common->num_zombies = atoi(desc);
data/sgt-puzzles-20191231.79a5378/undead.c:1433:18:  [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).
        sights = atoi(desc);
data/sgt-puzzles-20191231.79a5378/undead.c:1478: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).
        monster_count += atoi(desc);
data/sgt-puzzles-20191231.79a5378/undead.c:1582: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.
        if (solve_state->guess[i] == 1) c += sprintf(c, ";G%d", i);
data/sgt-puzzles-20191231.79a5378/undead.c:1583: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.
        if (solve_state->guess[i] == 2) c += sprintf(c, ";V%d", i);
data/sgt-puzzles-20191231.79a5378/undead.c:1584: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.
        if (solve_state->guess[i] == 4) c += sprintf(c, ";Z%d", i);
data/sgt-puzzles-20191231.79a5378/undead.c:1603: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/sgt-puzzles-20191231.79a5378/undead.c:1609: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(ret,"G: %d V: %d Z: %d\n\n",state->common->num_ghosts,
data/sgt-puzzles-20191231.79a5378/undead.c:1618:17:  [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,"%2d", c);  strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1620:17:  [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," \\"); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1622:17:  [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," /"); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1625:36:  [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.
                if (g == 1)      { sprintf(buf," G"); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1626:36:  [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.
                else if (g == 2) { sprintf(buf," V"); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1627:36:  [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.
                else if (g == 4) { sprintf(buf," Z"); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1628:36:  [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.
                else             { sprintf(buf," ."); strcat(ret,buf); }
data/sgt-puzzles-20191231.79a5378/undead.c:1630:17:  [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,"  "); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:1739: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[80]; 
data/sgt-puzzles-20191231.79a5378/undead.c:1758:17:  [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,"G%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1763:17:  [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,"V%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1768:17:  [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,"Z%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1774:17:  [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,"E%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1805:17:  [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,"g%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1813:17:  [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,"v%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1821:17:  [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,"z%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1830:17:  [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,"E%d",xi);
data/sgt-puzzles-20191231.79a5378/undead.c:1915:13:  [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,%d", gx, gy);
data/sgt-puzzles-20191231.79a5378/undead.c:2405: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[8];
data/sgt-puzzles-20191231.79a5378/undead.c:2406: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 bufm[8];
data/sgt-puzzles-20191231.79a5378/undead.c:2412: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,"%d",state->common->num_ghosts);
data/sgt-puzzles-20191231.79a5378/undead.c:2417: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,"%d",state->common->num_vampires); 
data/sgt-puzzles-20191231.79a5378/undead.c:2421: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,"%d",state->common->num_zombies); 
data/sgt-puzzles-20191231.79a5378/undead.c:2450: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[4];
data/sgt-puzzles-20191231.79a5378/undead.c:2473: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,"%d", hint);
data/sgt-puzzles-20191231.79a5378/undead.c:2513: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[10];
data/sgt-puzzles-20191231.79a5378/undead.c:2538: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[10];
data/sgt-puzzles-20191231.79a5378/unequal.c:138: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[80];
data/sgt-puzzles-20191231.79a5378/unequal.c:182:18:  [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).
    ret->order = atoi(p);
data/sgt-puzzles-20191231.79a5378/unequal.c:207: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 ret[80];
data/sgt-puzzles-20191231.79a5378/unequal.c:209: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(ret, "%d", params->order);
data/sgt-puzzles-20191231.79a5378/unequal.c:213: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(ret + strlen(ret), "d%c", unequal_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/unequal.c:221: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[80];
data/sgt-puzzles-20191231.79a5378/unequal.c:232: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, "%d", params->order);
data/sgt-puzzles-20191231.79a5378/unequal.c:251:18:  [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).
    ret->order = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unequal.c:306:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->nums, state->nums, o2 * sizeof(digit));
data/sgt-puzzles-20191231.79a5378/unequal.c:307:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->hints, state->hints, o3);
data/sgt-puzzles-20191231.79a5378/unequal.c:308:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->flags, state->flags, o2 * sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/unequal.c:832:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(state->hints, solver.cube, state->order*state->order*state->order);
data/sgt-puzzles-20191231.79a5378/unequal.c:1066:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(copy->nums,  new->nums,  o2 * sizeof(digit));
data/sgt-puzzles-20191231.79a5378/unequal.c:1067:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(copy->flags, new->flags, o2 * sizeof(unsigned int));
data/sgt-puzzles-20191231.79a5378/unequal.c:1122: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 *ret, buf[80];
data/sgt-puzzles-20191231.79a5378/unequal.c:1229:13:  [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).
        n = atoi(p);
data/sgt-puzzles-20191231.79a5378/unequal.c:1422: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[80];
data/sgt-puzzles-20191231.79a5378/unequal.c:1433: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, "F%d,%d,%d", x, y, F_SPENT_DOWN);
data/sgt-puzzles-20191231.79a5378/unequal.c:1435: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, "F%d,%d,%d", x, y + 1, F_SPENT_UP);
data/sgt-puzzles-20191231.79a5378/unequal.c:1442: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, "F%d,%d,%d", x, y, F_SPENT_RIGHT);
data/sgt-puzzles-20191231.79a5378/unequal.c:1444: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, "F%d,%d,%d", x + 1, y, F_SPENT_LEFT);
data/sgt-puzzles-20191231.79a5378/unequal.c:1504: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, "F%d,%d,%d", ui->hx, ui->hy,
data/sgt-puzzles-20191231.79a5378/unequal.c:1507: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, "F%d,%d,%d", nx, ny,
data/sgt-puzzles-20191231.79a5378/unequal.c:1539: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, "%c%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/unequal.c:1839: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];
data/sgt-puzzles-20191231.79a5378/unequal.c:1855: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];
data/sgt-puzzles-20191231.79a5378/unequal.c:1999: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];
data/sgt-puzzles-20191231.79a5378/unequal.c:2091: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[4096];
data/sgt-puzzles-20191231.79a5378/unequal.c:2263:28:  [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).
            seed = (time_t)atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:139: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[80];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:171:17:  [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).
    params->w = atoi(p);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:200: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 ret[80];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:202: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(ret, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:204: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(ret + strlen(ret), "d%c", group_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:214: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[80];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:220: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:242:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:373: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 *p, text[100], *names[50];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:431:8:  [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.
		p += sprintf(p, "%d", n);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:708:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(soln, grid, a);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:723:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(soln2, grid, a);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:736:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(soln2, grid, a);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:746:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(soln2, grid, a);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:797:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            int val = atoi(desc-1);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:838:25:  [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).
            grid[i++] = atoi(desc-1);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:898:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, a*sizeof(digit));
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:899:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->pencil, state->pencil, a*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:900:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->sequence, state->sequence, w*sizeof(digit));
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:901:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->dividers, state->dividers, w*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:933:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(soln, state->grid, a*sizeof(digit));
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1282: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[80];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1302:17:  [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,%d", ui->dragnum, ui->dragpos);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1307: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.
                    sprintf(buf, "V%d,%d",
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1441: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.
        buflen = sprintf(movebuf, "%c%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1446:23:  [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.
            buflen += sprintf(movebuf + buflen, "+%d,%d",
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1672: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[64];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1732:6:  [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[10];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1733:6:  [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, "(%c%c)%c", TOCHAR(a, ds->par.id),
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1743:6:  [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[10];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:1744:6:  [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, "%c(%c%c)", TOCHAR(a, ds->par.id),
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:2033: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 str[2];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:2066: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];
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:2179:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(grid, s->grid, p->w * p->w);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:2198:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(grid, s->grid, p->w * p->w);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:2203:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(s->grid, grid, p->w * p->w);
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1170:13:  [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).
			target = atoi(v);
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1177:45:  [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).
                                 rangemin = atoi(v);
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1178:45:  [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).
                                 rangemax = atoi(sep+1);
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1181:45:  [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).
                                 rangemax = atoi(v);
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1199:25:  [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).
		numbers[nnumbers++] = atoi(p);
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1258: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 buf[256];
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1262:2:  [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", o->number);
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1265:6:  [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 + strlen(buf), " [%d]", o->npaths);
data/sgt-puzzles-20191231.79a5378/unfinished/path.c:295:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->sparegrid, ctx->grid, w*h*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/path.c:296:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->sparegrid2, ctx->grid, w*h*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/path.c:297:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->sparepathends, ctx->pathends, ctx->npaths*2*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/path.c:328:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ctx->sparegrid3, ctx->sparegrid, w*h*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/path.c:444:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->grid, ctx->sparegrid, w*h*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/path.c:445:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->pathends, ctx->sparepathends, ctx->npaths*2*sizeof(int));
data/sgt-puzzles-20191231.79a5378/unfinished/separate.c:142:41:  [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).
    params->w = params->h = params->k = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/separate.c:146:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/separate.c:151:21:  [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).
        params->k = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/separate.c:158: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[256];
data/sgt-puzzles-20191231.79a5378/unfinished/separate.c:159: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, "%dx%dn%d", params->w, params->h, params->k);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:174: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[80];
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:182: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(str, "%dx%d", ret->w, ret->h);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:184:2:  [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(str + strlen(str), ", max %d moves", ret->maxmoves);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:186:2:  [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(str + strlen(str), ", no move limit");
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:207:29:  [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).
    params->w = params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:211:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:216:28:  [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).
        params->maxmoves = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:226: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 data[256];
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:228: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:230:2:  [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(data + strlen(data), "m%d", params->maxmoves);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:240: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[80];
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:246: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:251: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:256: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, "%d", params->maxmoves);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:269:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:270:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:271:21:  [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).
    ret->maxmoves = atoi(cfg[2].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:388:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(b->data, data, w*h);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:769:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(board2, board, wh);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:804:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(board, board2, wh);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:867:11:  [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.
	    p += sprintf(p, "d%d", board[i]);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:883:8:  [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.
		p += sprintf(p, "%d", count);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:886:10:  [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.
    p += sprintf(p, ",%d,%d,%d", tx, ty, minmoves);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:932:13:  [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).
	    dist = atoi(desc);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:959:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		count = atoi(desc);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1040:13:  [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).
	    dist = atoi(desc);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1052:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		count = atoi(desc);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1097:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->board, state->board, wh);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1163: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.
	p += sprintf(p, "%c%d-%d", sep, moves[i*2], moves[i*2+1]);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1387: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 data[256], *str;
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1395:6:  [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(data, "M%d-%d", ui->drag_anchor, ui->drag_currpos);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1410: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 data[256];
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:1418:2:  [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(data, "M%d-%d", a1, a2);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:2149:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(board, state->board, wh);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:2267: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 statusbuf[256];
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:2275:6:  [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(statusbuf+strlen(statusbuf), " (min %d)",
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:169: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 namebuf[80];
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:176: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(namebuf, "%dx%d", ret->w, ret->h);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:186:29:  [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).
    params->w = params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:190:21:  [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).
        params->h = atoi(string);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:196: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 data[256];
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:198: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(data, "%dx%d", params->w, params->h);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:206: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[80];
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:212: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, "%d", params->w);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:217: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, "%d", params->h);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:230:14:  [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).
    ret->w = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:231:14:  [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).
    ret->h = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:796:33:  [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.
            desclen = descpos + sprintf(desc+descpos, "%d", count);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:815:17:  [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).
            n = atoi(desc);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:860:17:  [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).
            n = atoi(desc);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:887:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, w*h);
data/sgt-puzzles-20191231.79a5378/unfinished/sokoban.c:1319:13:  [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];
data/sgt-puzzles-20191231.79a5378/unruly.c:162: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[80];
data/sgt-puzzles-20191231.79a5378/unruly.c:195:18:  [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).
    params->w2 = atoi(p);
data/sgt-puzzles-20191231.79a5378/unruly.c:199: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).
        params->h2 = atoi(p);
data/sgt-puzzles-20191231.79a5378/unruly.c:226: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[80];
data/sgt-puzzles-20191231.79a5378/unruly.c:228: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, "%dx%d", params->w2, params->h2);
data/sgt-puzzles-20191231.79a5378/unruly.c:232: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 + strlen(buf), "d%c", unruly_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/unruly.c:240: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[80];
data/sgt-puzzles-20191231.79a5378/unruly.c:246: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, "%d", params->w2);
data/sgt-puzzles-20191231.79a5378/unruly.c:251: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, "%d", params->h2);
data/sgt-puzzles-20191231.79a5378/unruly.c:273: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).
    ret->w2 = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unruly.c:274: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).
    ret->h2 = atoi(cfg[1].u.string.sval);
data/sgt-puzzles-20191231.79a5378/unruly.c:421:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->grid, state->grid, s);
data/sgt-puzzles-20191231.79a5378/unruly.c:1553: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[80];
data/sgt-puzzles-20191231.79a5378/unruly.c:1579: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, "P%c,%d,%d", c, hx, hy);
data/sgt-puzzles-20191231.79a5378/unruly.c:2000:29:  [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).
            seed = (time_t) atoi(*++argv);
data/sgt-puzzles-20191231.79a5378/untangle.c:132: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[80];
data/sgt-puzzles-20191231.79a5378/untangle.c:143: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, "%d points", n);
data/sgt-puzzles-20191231.79a5378/untangle.c:166:17:  [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).
    params->n = atoi(string);
data/sgt-puzzles-20191231.79a5378/untangle.c:171: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[80];
data/sgt-puzzles-20191231.79a5378/untangle.c:173: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, "%d", params->n);
data/sgt-puzzles-20191231.79a5378/untangle.c:181: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[80];
data/sgt-puzzles-20191231.79a5378/untangle.c:187: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, "%d", params->n);
data/sgt-puzzles-20191231.79a5378/untangle.c:200:14:  [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).
    ret->n = atoi(cfg[0].u.string.sval);
data/sgt-puzzles-20191231.79a5378/untangle.c:660: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 buf[80];
data/sgt-puzzles-20191231.79a5378/untangle.c:671:20:  [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.
	    retlen += 1 + sprintf(buf, "%d-%d", ea[i].a, ea[i].b);
data/sgt-puzzles-20191231.79a5378/untangle.c:693: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 buf[80];
data/sgt-puzzles-20191231.79a5378/untangle.c:708:16:  [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.
	    auxlen += sprintf(buf, ";P%d:%ld,%ld/%ld", i,
data/sgt-puzzles-20191231.79a5378/untangle.c:715:11:  [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.
	    k += sprintf(auxstr+k, ";P%d:%ld,%ld/%ld", i,
data/sgt-puzzles-20191231.79a5378/untangle.c:739:6:  [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).
	a = atoi(desc);
data/sgt-puzzles-20191231.79a5378/untangle.c:746:6:  [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).
	b = atoi(desc);
data/sgt-puzzles-20191231.79a5378/untangle.c:820:6:  [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).
	a = atoi(desc);
data/sgt-puzzles-20191231.79a5378/untangle.c:825:6:  [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).
	b = atoi(desc);
data/sgt-puzzles-20191231.79a5378/untangle.c:852:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->pts, state->pts, n * sizeof(point));
data/sgt-puzzles-20191231.79a5378/untangle.c:860:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->crosses, state->crosses,
data/sgt-puzzles-20191231.79a5378/untangle.c:888: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[80], *ret;
data/sgt-puzzles-20191231.79a5378/untangle.c:1011:17:  [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.
        extra = sprintf(buf, ";P%d:%ld,%ld/%ld", i,
data/sgt-puzzles-20191231.79a5378/untangle.c:1127: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 buf[80];
data/sgt-puzzles-20191231.79a5378/untangle.c:1145:2:  [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%d:%ld,%ld/%ld", p,
data/sgt-puzzles-20191231.79a5378/untangle.c:1393: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];
data/sgt-puzzles-20191231.79a5378/untangle.c:1394: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, "%d", i);
data/sgt-puzzles-20191231.79a5378/windows.c:93:5:  [2] (buffer) TCHAR:
  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.
    TCHAR wText[2048];
data/sgt-puzzles-20191231.79a5378/windows.c:94:5:  [2] (buffer) TCHAR:
  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.
    TCHAR wCaption[2048];
data/sgt-puzzles-20191231.79a5378/windows.c:96:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, lpText,    -1, wText,    2048);
data/sgt-puzzles-20191231.79a5378/windows.c:97:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, lpCaption, -1, wCaption, 2048);
data/sgt-puzzles-20191231.79a5378/windows.c:104:5:  [2] (buffer) TCHAR:
  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.
    TCHAR wText[256];
data/sgt-puzzles-20191231.79a5378/windows.c:106:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, lpString, -1, wText, 256);
data/sgt-puzzles-20191231.79a5378/windows.c:120:8:  [2] (buffer) TCHAR:
  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 TCHAR wClassName[256], wGameName[256];
data/sgt-puzzles-20191231.79a5378/windows.c:155: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[4096];
data/sgt-puzzles-20191231.79a5378/windows.c:265: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[2048];
data/sgt-puzzles-20191231.79a5378/windows.c:312:5:  [2] (buffer) TCHAR:
  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.
    TCHAR wText[255];
data/sgt-puzzles-20191231.79a5378/windows.c:317:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, text, -1, wText, 255);
data/sgt-puzzles-20191231.79a5378/windows.c:620:2:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
	MultiByteToWideChar (CP_UTF8, 0, text, -1, wText, 256);
data/sgt-puzzles-20191231.79a5378/windows.c:1004: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 doctitle[256];
data/sgt-puzzles-20191231.79a5378/windows.c:1152:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(lock, data2, len);
data/sgt-puzzles-20191231.79a5378/windows.c:1153:16:  [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 *) lock)[len] = 0;
data/sgt-puzzles-20191231.79a5378/windows.c:1172: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 b[2048], *p, *q, *r;
data/sgt-puzzles-20191231.79a5378/windows.c:1191: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).
    if ( (fp = fopen(b, "r")) != NULL) {
data/sgt-puzzles-20191231.79a5378/windows.c:1215: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).
    if ( (fp = fopen(b, "r")) != NULL) {
data/sgt-puzzles-20191231.79a5378/windows.c:1225: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 ( (fp = fopen(b, "r")) != NULL) {
data/sgt-puzzles-20191231.79a5378/windows.c:1506:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, nogame, -1, wGameName, 256);
data/sgt-puzzles-20191231.79a5378/windows.c:1598:38:  [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 (maybe_save_file && (fp = fopen(arg, "r")) != NULL) {
data/sgt-puzzles-20191231.79a5378/windows.c:1701:13:  [2] (buffer) TCHAR:
  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.
            TCHAR wName[255];
data/sgt-puzzles-20191231.79a5378/windows.c:1702:13:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
            MultiByteToWideChar(CP_ACP, 0, entry->title, -1, wName, 255);
data/sgt-puzzles-20191231.79a5378/windows.c:1796:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, fe->game->name, -1, wGameName, 256);
data/sgt-puzzles-20191231.79a5378/windows.c:2010:6:  [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 title[256];
data/sgt-puzzles-20191231.79a5378/windows.c:2014:6:  [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(title, "About %.250s", fe->game->name);
data/sgt-puzzles-20191231.79a5378/windows.c:2121:24:  [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 ((fe->printcount = atoi(cfg[0].u.string.sval)) <= 0)
data/sgt-puzzles-20191231.79a5378/windows.c:2123: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).
	if ((fe->printw = atoi(cfg[1].u.string.sval)) <= 0)
data/sgt-puzzles-20191231.79a5378/windows.c:2125: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).
	if ((fe->printh = atoi(cfg[2].u.string.sval)) <= 0)
data/sgt-puzzles-20191231.79a5378/windows.c:2148:5:  [2] (buffer) TCHAR:
  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.
    TCHAR wwtext[256];
data/sgt-puzzles-20191231.79a5378/windows.c:2155:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, wtext, -1, wwtext, 256);
data/sgt-puzzles-20191231.79a5378/windows.c:2233:4:  [2] (buffer) TCHAR:
  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.
			TCHAR ws[50];
data/sgt-puzzles-20191231.79a5378/windows.c:2234:4:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
			MultiByteToWideChar (CP_ACP, 0, str, -1, ws, 50);
data/sgt-puzzles-20191231.79a5378/windows.c:2323:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char buffer[4096];
data/sgt-puzzles-20191231.79a5378/windows.c:2325:6:  [2] (buffer) TCHAR:
  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.
	    TCHAR wBuffer[4096];
data/sgt-puzzles-20191231.79a5378/windows.c:2383: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 *strings[16];
data/sgt-puzzles-20191231.79a5378/windows.c:2386: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 titlebuf[512];
data/sgt-puzzles-20191231.79a5378/windows.c:2388: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(titlebuf, "About %.250s", fe->game->name);
data/sgt-puzzles-20191231.79a5378/windows.c:3062: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 filename[FILENAME_MAX];
data/sgt-puzzles-20191231.79a5378/windows.c:3094:14:  [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 ((fp = fopen(filename, "r")) != NULL) {
data/sgt-puzzles-20191231.79a5378/windows.c:3095: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.
			    char buf[256 + FILENAME_MAX];
data/sgt-puzzles-20191231.79a5378/windows.c:3099:8:  [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, "Are you sure you want to overwrite"
data/sgt-puzzles-20191231.79a5378/windows.c:3108: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).
			fp = fopen(filename, "w");
data/sgt-puzzles-20191231.79a5378/windows.c:3120: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 *fp = fopen(filename, "r");
data/sgt-puzzles-20191231.79a5378/windows.c:3727:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar (CP_ACP, 0, CLASSNAME, -1, wClassName, 256);
data/sgt-puzzles-20191231.79a5378/windows.c:3799: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 buf[128];
data/sgt-puzzles-20191231.79a5378/windows.c:3801:2:  [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, "Puzzles Error");
data/sgt-puzzles-20191231.79a5378/windows.c:3803:2:  [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, "%.100s Error", gg->name);
data/sgt-puzzles-20191231.79a5378/blackbox.c:252:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int nballs, dlen = strlen(desc), i;
data/sgt-puzzles-20191231.79a5378/blackbox.c:396:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int dlen = strlen(desc), i;
data/sgt-puzzles-20191231.79a5378/blackbox.c:987:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(buf, "R");
data/sgt-puzzles-20191231.79a5378/blackbox.c:1052: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).
            if (strlen(move) < 2) goto badmove;
data/sgt-puzzles-20191231.79a5378/blackbox.c:1457:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(buf + strlen(buf), " (%d error%s)",
data/sgt-puzzles-20191231.79a5378/dominosa.c:2551:14:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
    retlen = sprintf(ret, "S");
data/sgt-puzzles-20191231.79a5378/dominosa.c:2601:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	retlen = sprintf(ret, "S");
data/sgt-puzzles-20191231.79a5378/emcc.c:133:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    vsnprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), fmt, ap);
data/sgt-puzzles-20191231.79a5378/emcc.c:133:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    vsnprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), fmt, ap);
data/sgt-puzzles-20191231.79a5378/filling.c:1541:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    move = srealloc(move, strlen(move)+strlen(buf)+1);
data/sgt-puzzles-20191231.79a5378/filling.c:1541:56:  [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).
                    move = srealloc(move, strlen(move)+strlen(buf)+1);
data/sgt-puzzles-20191231.79a5378/filling.c:1544:36:  [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).
                    move = smalloc(strlen(buf)+1);
data/sgt-puzzles-20191231.79a5378/filling.c:1553:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        move = srealloc(move, strlen(move)+strlen(buf)+1);
data/sgt-puzzles-20191231.79a5378/filling.c:1553:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        move = srealloc(move, strlen(move)+strlen(buf)+1);
data/sgt-puzzles-20191231.79a5378/flip.c:587: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).
    ret = snewn(strlen(mbmp) + strlen(gbmp) + 2, char);
data/sgt-puzzles-20191231.79a5378/flip.c:587:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ret = snewn(strlen(mbmp) + strlen(gbmp) + 2, char);
data/sgt-puzzles-20191231.79a5378/flip.c:1001:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (move[0] == 'S' && strlen(move) == wh+1) {
data/sgt-puzzles-20191231.79a5378/flood.c:158:23:  [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).
        sprintf(buf + strlen(buf), "c%dm%d",
data/sgt-puzzles-20191231.79a5378/galaxies.c:237:23:  [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).
        sprintf(str + strlen(str), "d%c", galaxies_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/galaxies.c:2604:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(buf + strlen(buf), "%sU%d,%d", sep, ui->srcx, ui->srcy);
data/sgt-puzzles-20191231.79a5378/galaxies.c:2623: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).
		sprintf(buf + strlen(buf), "%sA%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/galaxies.c:2656:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                sprintf(buf + strlen(buf), "%sA%d,%d,%d,%d",
data/sgt-puzzles-20191231.79a5378/galaxies.c:3942:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    char *num = buf + strlen(buf);
data/sgt-puzzles-20191231.79a5378/gtk.c:1059:41:  [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).
    pango_layout_set_text(layout, text, strlen(text));
data/sgt-puzzles-20191231.79a5378/gtk.c:1845: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).
	titles += strlen(titles)+1;
data/sgt-puzzles-20191231.79a5378/gtk.c:2094:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    strncpy(name, p, q-p);
data/sgt-puzzles-20191231.79a5378/gtk.c:2388: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).
    fe->paste_data_len = strlen(data);
data/sgt-puzzles-20191231.79a5378/gtk.c:3470: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).
	item = snewn(9+strlen(thegame.name), char); /*ick*/
data/sgt-puzzles-20191231.79a5378/gtk.c:3933:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    pstr = snewn(strlen(arg) + 40, char);
data/sgt-puzzles-20191231.79a5378/gtk.c:3937:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			sprintf(pstr + strlen(pstr), "-%d", i);
data/sgt-puzzles-20191231.79a5378/gtk.c:4017:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		char *realname = snewn(40 + strlen(savefile) +
data/sgt-puzzles-20191231.79a5378/gtk.c:4018: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).
				       strlen(savesuffix), char);
data/sgt-puzzles-20191231.79a5378/guess.c:291:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(desc) != params->npegs * 2)
data/sgt-puzzles-20191231.79a5378/inertia.c:625: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).
    assert(strlen(desc) == wh);
data/sgt-puzzles-20191231.79a5378/inertia.c:1653:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sol->len = strlen(move);
data/sgt-puzzles-20191231.79a5378/inertia.c:2115:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(status + strlen(status), "Gems: %d", gems);
data/sgt-puzzles-20191231.79a5378/inertia.c:2129:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(status + strlen(status), "   Deaths: %d", deaths);
data/sgt-puzzles-20191231.79a5378/keen.c:171:23:  [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).
        sprintf(ret + strlen(ret), "d%c%s", keen_diffchars[params->diff],
data/sgt-puzzles-20191231.79a5378/loopy.c:633:23:  [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).
        sprintf(str + strlen(str), "d%c", diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/loopy.c:835:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
    p += sprintf(p, "S");
data/sgt-puzzles-20191231.79a5378/loopy.c:849: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).
    assert(strlen(ret) <= (size_t)len);
data/sgt-puzzles-20191231.79a5378/loopy.c:1466:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        retval = snewn(strlen(grid_desc) + 1 + strlen(game_desc) + 1, char);
data/sgt-puzzles-20191231.79a5378/loopy.c:1466:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        retval = snewn(strlen(grid_desc) + 1 + strlen(game_desc) + 1, char);
data/sgt-puzzles-20191231.79a5378/magnets.c:181:23:  [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).
        sprintf(buf + strlen(buf), "d%c%s",
data/sgt-puzzles-20191231.79a5378/magnets.c:1452: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).
    assert(strlen(aux) == state->wh);
data/sgt-puzzles-20191231.79a5378/magnets.c:1466:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (aux && strlen(aux) == state->wh) {
data/sgt-puzzles-20191231.79a5378/magnets.c:2019: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).
    tsz = (strlen(buf) == 1) ? (7*TILE_SIZE/10) : (9*TILE_SIZE/10)/strlen(buf);
data/sgt-puzzles-20191231.79a5378/magnets.c:2019:68:  [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).
    tsz = (strlen(buf) == 1) ? (7*TILE_SIZE/10) : (9*TILE_SIZE/10)/strlen(buf);
data/sgt-puzzles-20191231.79a5378/malloc.c:50:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *r = smalloc(1+strlen(s));
data/sgt-puzzles-20191231.79a5378/map.c:201:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(ret + strlen(ret), "d%c", map_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/map.c:1889:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        random_state *rs = random_new(desc, strlen(desc));
data/sgt-puzzles-20191231.79a5378/map.c:2228:9:  [1] (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 character.
        strcpy(ret, "S");
data/sgt-puzzles-20191231.79a5378/matching.c:608:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    rs = random_new(seed, strlen(seed));
data/sgt-puzzles-20191231.79a5378/midend.c:125:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    midend *me, bool (*read)(void *ctx, void *buf, int len), void *rctx,
data/sgt-puzzles-20191231.79a5378/midend.c:481:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        rs = random_new(me->seedstr, strlen(me->seedstr));
data/sgt-puzzles-20191231.79a5378/midend.c:1486:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    titlebuf = snewn(40 + strlen(me->ourgame->name), char);
data/sgt-puzzles-20191231.79a5378/midend.c:1528:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        ret[0].u.string.sval = snewn(strlen(parstr) + strlen(rest) + 2, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1528:55:  [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).
        ret[0].u.string.sval = snewn(strlen(parstr) + strlen(rest) + 2, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1560:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(par, id, desc-id);
data/sgt-puzzles-20191231.79a5378/midend.c:1571:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(par, id, seed-id);
data/sgt-puzzles-20191231.79a5378/midend.c:1738: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).
    ret = snewn(strlen(parstr) + strlen(me->desc) + 2, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1738:34:  [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).
    ret = snewn(strlen(parstr) + strlen(me->desc) + 2, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1753: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).
    ret = snewn(strlen(parstr) + strlen(me->seedstr) + 2, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1753:34:  [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).
    ret = snewn(strlen(parstr) + strlen(me->seedstr) + 2, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1901:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	ret = snewn(strlen(timebuf) + strlen(text) + 1, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1901:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	ret = snewn(strlen(timebuf) + strlen(text) + 1, char);
data/sgt-puzzles-20191231.79a5378/midend.c:1934:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(hbuf, "%s:%d:", lbuf, (int)strlen(str)); \
data/sgt-puzzles-20191231.79a5378/midend.c:1935:23:  [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).
    write(wctx, hbuf, strlen(hbuf)); \
data/sgt-puzzles-20191231.79a5378/midend.c:1936:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    write(wctx, str, strlen(str)); \
data/sgt-puzzles-20191231.79a5378/midend.c:1995:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(me->aux_info);
data/sgt-puzzles-20191231.79a5378/midend.c:2071:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    midend *me, bool (*read)(void *ctx, void *buf, int len), void *rctx,
data/sgt-puzzles-20191231.79a5378/midend.c:2104:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (!read(rctx, key, 1)) {
data/sgt-puzzles-20191231.79a5378/midend.c:2110:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!read(rctx, key+1, 8)) {
data/sgt-puzzles-20191231.79a5378/midend.c:2126:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (!read(rctx, &c, 1)) {
data/sgt-puzzles-20191231.79a5378/midend.c:2144:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!read(rctx, val, len)) {
data/sgt-puzzles-20191231.79a5378/midend.c:2192:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                int len = strlen(val) / 2;   /* length in bytes */
data/sgt-puzzles-20191231.79a5378/midend.c:2439:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    midend *me, bool (*read)(void *ctx, void *buf, int len), void *rctx)
data/sgt-puzzles-20191231.79a5378/midend.c:2441:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return midend_deserialise_internal(me, read, rctx, NULL, NULL);
data/sgt-puzzles-20191231.79a5378/midend.c:2452:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                          bool (*read)(void *ctx, void *buf, int len),
data/sgt-puzzles-20191231.79a5378/midend.c:2473:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (!read(rctx, key, 1)) {
data/sgt-puzzles-20191231.79a5378/midend.c:2479:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!read(rctx, key+1, 8)) {
data/sgt-puzzles-20191231.79a5378/midend.c:2495:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (!read(rctx, &c, 1)) {
data/sgt-puzzles-20191231.79a5378/midend.c:2513:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!read(rctx, val, len)) {
data/sgt-puzzles-20191231.79a5378/mines.c:1984:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	desc = snewn(strlen(rsdesc) + 100, char);
data/sgt-puzzles-20191231.79a5378/mines.c:2036: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(desc) != (wh+3)/4)
data/sgt-puzzles-20191231.79a5378/mines.c:2382:2:  [1] (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 character.
	strcat(buf, "C");
data/sgt-puzzles-20191231.79a5378/mines.c:3111:41:  [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).
                    sprintf(statusbar + strlen(statusbar),
data/sgt-puzzles-20191231.79a5378/mines.c:3114:41:  [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).
                    sprintf(statusbar + strlen(statusbar),
data/sgt-puzzles-20191231.79a5378/mines.c:3120:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            sprintf(statusbar + strlen(statusbar),
data/sgt-puzzles-20191231.79a5378/misc.c:124:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		SHA_Bytes(&final, numberbuf, strlen(numberbuf));
data/sgt-puzzles-20191231.79a5378/misc.c:186:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len += strlen(ret + len);
data/sgt-puzzles-20191231.79a5378/misc.c:397:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(str);
data/sgt-puzzles-20191231.79a5378/netslide.c:1137:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	       strlen(move) == from->width * from->height + 1) {
data/sgt-puzzles-20191231.79a5378/netslide.c:1786:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            sprintf(statusbuf + strlen(statusbuf), " (target %d)",
data/sgt-puzzles-20191231.79a5378/netslide.c:1789:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(statusbuf + strlen(statusbuf), " Active: %d/%d", a, n);
data/sgt-puzzles-20191231.79a5378/obfusc.c:91: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).
	datalen = strlen(inhex) / 2;
data/sgt-puzzles-20191231.79a5378/pattern.c:1409:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        strlen(move) == from->common->w * from->common->h + 1) {
data/sgt-puzzles-20191231.79a5378/pattern.c:2196:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    char *num = buf + strlen(buf);
data/sgt-puzzles-20191231.79a5378/pearl.c:221:23:  [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).
        sprintf(buf + strlen(buf), "d%c%s",
data/sgt-puzzles-20191231.79a5378/pegs.c:93:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(str + strlen(str), " %dx%d", ret->w, ret->h);
data/sgt-puzzles-20191231.79a5378/pegs.c:663:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (len != strlen(desc))
data/sgt-puzzles-20191231.79a5378/ps.c:256: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).
	int len = strlen(strings[i]);
data/sgt-puzzles-20191231.79a5378/puzzles.h:344:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                               bool (*read)(void *ctx, void *buf, int len),
data/sgt-puzzles-20191231.79a5378/puzzles.h:347:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                          bool (*read)(void *ctx, void *buf, int len),
data/sgt-puzzles-20191231.79a5378/rect.c:166:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        sprintf(data + strlen(data), "e%g", params->expandfactor);
data/sgt-puzzles-20191231.79a5378/rect.c:168:9:  [1] (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 character.
        strcat(data, "a");
data/sgt-puzzles-20191231.79a5378/samegame.c:1129:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (retlen + (int)strlen(buf) >= retsize) {
data/sgt-puzzles-20191231.79a5378/samegame.c:1130:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		retsize = retlen + strlen(buf) + 256;
data/sgt-puzzles-20191231.79a5378/samegame.c:1134:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    retlen += strlen(buf);
data/sgt-puzzles-20191231.79a5378/signpost.c:1971:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                p -= strlen(buf);
data/sgt-puzzles-20191231.79a5378/signpost.c:1983:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        textsz = min(2*asz, (TILE_SIZE - 2 * cb) / (int)strlen(p));
data/sgt-puzzles-20191231.79a5378/signpost.c:2321:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
       rs = random_new(seedstr, strlen(seedstr));
data/sgt-puzzles-20191231.79a5378/signpost.c:2467:60:  [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).
                    random_state *rs = random_new(seedstr, strlen(seedstr));
data/sgt-puzzles-20191231.79a5378/singles.c:341:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(desc) != state->n) {
data/sgt-puzzles-20191231.79a5378/singles.c:1684:13:  [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) == 1)
data/sgt-puzzles-20191231.79a5378/singles.c:1687:34:  [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).
            tsz = (CRAD*2 - 1) / strlen(buf);
data/sgt-puzzles-20191231.79a5378/singles.c:1810:34:  [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).
                          TEXTSZ/strlen(buf), ALIGN_VCENTRE | ALIGN_HCENTRE,
data/sgt-puzzles-20191231.79a5378/sixteen.c:128:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        sprintf(data + strlen(data), "m%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/sixteen.c:1125:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                sprintf(statusbuf+strlen(statusbuf), " (target %d)",
data/sgt-puzzles-20191231.79a5378/slant.c:172: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).
	sprintf(data + strlen(data), "d%c", slant_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/solo.c:412:2:  [1] (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 character.
	strcat(str, "x");
data/sgt-puzzles-20191231.79a5378/solo.c:414:2:  [1] (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 character.
	strcat(str, "k");
data/sgt-puzzles-20191231.79a5378/solo.c:425:27:  [1] (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 character.
          case SYMM_NONE: strcat(str, "a"); break;
data/sgt-puzzles-20191231.79a5378/tents.c:359:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(buf + strlen(buf), "d%c",
data/sgt-puzzles-20191231.79a5378/towers.c:200:23:  [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).
        sprintf(ret + strlen(ret), "d%c", towers_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/tracks.c:136:23:  [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).
        sprintf(buf + strlen(buf), "d%c%s",
data/sgt-puzzles-20191231.79a5378/tree234.c:1517:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int xpos = strlen(ctx->levels[0]);
data/sgt-puzzles-20191231.79a5378/tree234.c:1557: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).
	x = strlen(ctx->levels[level]);
data/sgt-puzzles-20191231.79a5378/tree234.c:1575: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).
	x = strlen(ctx->levels[level-1]);
data/sgt-puzzles-20191231.79a5378/tree234.c:1596: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).
	x = strlen(ctx->levels[level-2]);
data/sgt-puzzles-20191231.79a5378/twiddle.c:146:23:  [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).
        sprintf(buf + strlen(buf), "m%d", params->movetarget);
data/sgt-puzzles-20191231.79a5378/twiddle.c:1262:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                sprintf(statusbuf+strlen(statusbuf), " (target %d)",
data/sgt-puzzles-20191231.79a5378/undead.c:152:23:  [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).
        sprintf(buf + strlen(buf), "d%c", undead_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/undead.c:1633:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(buf,"\n"); strcat(ret,buf);
data/sgt-puzzles-20191231.79a5378/undead.c:2413:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(bufm,"G");
data/sgt-puzzles-20191231.79a5378/undead.c:2418:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(bufm,"V");
data/sgt-puzzles-20191231.79a5378/undead.c:2422:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(bufm,"Z");
data/sgt-puzzles-20191231.79a5378/undead.c:2517:27:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        if (monster == 1) sprintf(buf,"G");
data/sgt-puzzles-20191231.79a5378/undead.c:2518:32:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        else if (monster == 2) sprintf(buf,"V");
data/sgt-puzzles-20191231.79a5378/undead.c:2519:32:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        else if (monster == 4) sprintf(buf,"Z");
data/sgt-puzzles-20191231.79a5378/undead.c:2520:14:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        else sprintf(buf," ");
data/sgt-puzzles-20191231.79a5378/undead.c:2558:31:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
                      case 1: sprintf(buf,"G"); break;
data/sgt-puzzles-20191231.79a5378/undead.c:2559:31:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
                      case 2: sprintf(buf,"V"); break;
data/sgt-puzzles-20191231.79a5378/undead.c:2560:31:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
                      case 4: sprintf(buf,"Z"); break;
data/sgt-puzzles-20191231.79a5378/unequal.c:211:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(ret + strlen(ret), "a");
data/sgt-puzzles-20191231.79a5378/unequal.c:211:23:  [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).
        sprintf(ret + strlen(ret), "a");
data/sgt-puzzles-20191231.79a5378/unequal.c:213:23:  [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).
        sprintf(ret + strlen(ret), "d%c", unequal_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:204:23:  [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).
        sprintf(ret + strlen(ret), "d%c", group_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:206:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(ret + strlen(ret), "i");
data/sgt-puzzles-20191231.79a5378/unfinished/group.c:206:23:  [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).
        sprintf(ret + strlen(ret), "i");
data/sgt-puzzles-20191231.79a5378/unfinished/numgame.c:1265:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(buf + strlen(buf), " [%d]", o->npaths);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:184:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(str + strlen(str), ", max %d moves", ret->maxmoves);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:186:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(str + strlen(str), ", no move limit");
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:230: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).
	sprintf(data + strlen(data), "m%d", params->maxmoves);
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:232:2:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	sprintf(data + strlen(data), "u");
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:232: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).
	sprintf(data + strlen(data), "u");
data/sgt-puzzles-20191231.79a5378/unfinished/slide.c:2275:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(statusbuf+strlen(statusbuf), " (min %d)",
data/sgt-puzzles-20191231.79a5378/unruly.c:230:9:  [1] (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 character.
        strcat(buf, "u");
data/sgt-puzzles-20191231.79a5378/unruly.c:232:23:  [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).
        sprintf(buf + strlen(buf), "d%c", unruly_diffchars[params->diff]);
data/sgt-puzzles-20191231.79a5378/windows.c:629:44:  [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).
	if (GetTextExtentPoint32W(fe->hdc, wText, wcslen(wText), &size))
data/sgt-puzzles-20191231.79a5378/windows.c:638:51:  [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).
	ExtTextOutW(fe->hdc, xy.x, xy.y, 0, NULL, wText, wcslen(wText), NULL);
data/sgt-puzzles-20191231.79a5378/windows.c:1252:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    str = snewn(10+strlen(topic), char);
data/sgt-puzzles-20191231.79a5378/windows.c:1268:23:  [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).
	    str = snewn(20 + strlen(topic) + strlen(help_path), char);
data/sgt-puzzles-20191231.79a5378/windows.c:1268:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    str = snewn(20 + strlen(topic) + strlen(help_path), char);
data/sgt-puzzles-20191231.79a5378/windows.c:1646:42:  [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).
                    *error = snewn(256 + strlen(arg) + strlen(err_param) +
data/sgt-puzzles-20191231.79a5378/windows.c:1646:56:  [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).
                    *error = snewn(256 + strlen(arg) + strlen(err_param) +
data/sgt-puzzles-20191231.79a5378/windows.c:1647:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                   strlen(err_load), char);
data/sgt-puzzles-20191231.79a5378/windows.c:1941:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            item = snewn(10+strlen(fe->game->name), char); /*ick*/
data/sgt-puzzles-20191231.79a5378/windows.c:2060:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	*wintitle = snewn(40 + strlen(fe->game->name), char);
data/sgt-puzzles-20191231.79a5378/windows.c:2230:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    strncpy(str, p, q-p);
data/sgt-puzzles-20191231.79a5378/windows.c:2435:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (GetTextExtentPoint32(hdc, strings[i], strlen(strings[i]), &size))
data/sgt-puzzles-20191231.79a5378/windows.c:2599:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (GetTextExtentPoint32(hdc, i->name, strlen(i->name), &size) &&
data/sgt-puzzles-20191231.79a5378/windows.c:2609:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (GetTextExtentPoint32(hdc, i->name, strlen(i->name), &size) &&
data/sgt-puzzles-20191231.79a5378/windows.c:2728:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    strncpy(str, p, q-p);
data/sgt-puzzles-20191231.79a5378/windows.c:3637: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).
    outputline = snewn(1+strlen(cmdline), char);
data/sgt-puzzles-20191231.79a5378/windows.c:3638:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    outputargv = snewn(strlen(cmdline)+1 / 2, char *);
data/sgt-puzzles-20191231.79a5378/windows.c:3639:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    outputargstart = snewn(strlen(cmdline)+1 / 2, char *);

ANALYSIS SUMMARY:

Hits = 1775
Lines analyzed = 128620 in approximately 3.38 seconds (38039 lines/second)
Physical Source Lines of Code (SLOC) = 89908
Hits@level = [0] 929 [1] 177 [2] 1366 [3]  36 [4] 196 [5]   0
Hits@level+ = [0+] 2704 [1+] 1775 [2+] 1598 [3+] 232 [4+] 196 [5+]   0
Hits/KSLOC@level+ = [0+] 30.0752 [1+] 19.7424 [2+] 17.7737 [3+] 2.58042 [4+] 2.18001 [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.