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/phlipple-0.8.5/src/vertex.c
Examining data/phlipple-0.8.5/src/gradientrenderer.c
Examining data/phlipple-0.8.5/src/settings.c
Examining data/phlipple-0.8.5/src/renderstate.h
Examining data/phlipple-0.8.5/src/quadrenderer.c
Examining data/phlipple-0.8.5/src/interpolator.h
Examining data/phlipple-0.8.5/src/main.c
Examining data/phlipple-0.8.5/src/phlipplescenes.h
Examining data/phlipple-0.8.5/src/camera.h
Examining data/phlipple-0.8.5/src/levels.h
Examining data/phlipple-0.8.5/src/gradientrenderer.h
Examining data/phlipple-0.8.5/src/scenes.h
Examining data/phlipple-0.8.5/src/levels.c
Examining data/phlipple-0.8.5/src/phlipplerootscene.h
Examining data/phlipple-0.8.5/src/camera.c
Examining data/phlipple-0.8.5/src/quad.h
Examining data/phlipple-0.8.5/src/gfxconstants.c
Examining data/phlipple-0.8.5/src/interpolator.c
Examining data/phlipple-0.8.5/src/engine.c
Examining data/phlipple-0.8.5/src/osinterface.h
Examining data/phlipple-0.8.5/src/quadrenderer.h
Examining data/phlipple-0.8.5/src/texture.h
Examining data/phlipple-0.8.5/src/settings.h
Examining data/phlipple-0.8.5/src/textrenderer.c
Examining data/phlipple-0.8.5/src/scenes.c
Examining data/phlipple-0.8.5/src/vertex.h
Examining data/phlipple-0.8.5/src/texture.c
Examining data/phlipple-0.8.5/src/quad.c
Examining data/phlipple-0.8.5/src/game.c
Examining data/phlipple-0.8.5/src/osinterface_sdl.c
Examining data/phlipple-0.8.5/src/textrenderer.h
Examining data/phlipple-0.8.5/src/gfxconstants.h
Examining data/phlipple-0.8.5/src/mainscreen.c
Examining data/phlipple-0.8.5/src/phlipplerootscene.c
Examining data/phlipple-0.8.5/src/engine.h

FINAL RESULTS:

data/phlipple-0.8.5/src/game.c:115:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(phname, "%s", levels[levelToLoad]->phname);
data/phlipple-0.8.5/src/game.c:367:4:  [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(centreMsg, wellDoneMsgs[rand() % 7]);
data/phlipple-0.8.5/src/game.c:606:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(phname, "%s", levels[currLev]->phname);
data/phlipple-0.8.5/src/levels.c:63: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(levels[f]->phname, line);
data/phlipple-0.8.5/src/mainscreen.c:107:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buff, "%s", levels[l]->phname);
data/phlipple-0.8.5/src/mainscreen.c:248:13:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
				int i = system(LINUX_BROWSER_HOME);
data/phlipple-0.8.5/src/mainscreen.c:252:5:  [4] (shell) ShellExecute:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
				ShellExecute(NULL, "open", WIN32_BROWSER_HOME, NULL, NULL, SW_SHOWNORMAL);
data/phlipple-0.8.5/src/osinterface_sdl.c:153:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(wmcapt, "Phlipple ver %s", PACKAGE_VERSION);
data/phlipple-0.8.5/src/osinterface_sdl.c:334:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(ret, "%s%sdata%s%s", defDir, SEPARATOR, SEPARATOR, fileName);
data/phlipple-0.8.5/src/osinterface_sdl.c:338:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(ret, "%s/%s/%s", PACKAGE_DATA_DIR, PACKAGE, fileName);
data/phlipple-0.8.5/src/settings.c:82:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(defDir, "%s%s%s", dir, SEPARATOR, DEFAULT_DIRECTORY);
data/phlipple-0.8.5/src/settings.c:92:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(ret, "%s%s..%s..%sdata%ssettings", defDir, SEPARATOR, SEPARATOR, SEPARATOR, SEPARATOR);
data/phlipple-0.8.5/src/settings.c:108:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(defDir, "%s%s%s", mbpath, SEPARATOR, DEFAULT_DIRECTORY);
data/phlipple-0.8.5/src/settings.c:128:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s%s%s", getDefaultDir(), SEPARATOR, DEFAULT_FILENAME);
data/phlipple-0.8.5/src/settings.c:166: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(val, buff + sep + 1);
data/phlipple-0.8.5/src/settings.c:240: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((*s)->key, key);
data/phlipple-0.8.5/src/settings.c:241: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((*s)->value, value);
data/phlipple-0.8.5/src/settings.c:272: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(found->value, value);
data/phlipple-0.8.5/src/mainscreen.c:135:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		srand((int) t);
data/phlipple-0.8.5/src/settings.c:81:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *dir = getenv(ENVVAR);
data/phlipple-0.8.5/src/camera.c:160: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(cam->zOrderLists[ref], cam->eng->quads,
data/phlipple-0.8.5/src/engine.c:144: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 buff[4];
data/phlipple-0.8.5/src/engine.c:148:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		buff[3 - f] = ((char *) b)[f];
data/phlipple-0.8.5/src/engine.c:152: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(&i, buff, 4);
data/phlipple-0.8.5/src/engine.c:230: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(buff, *ptr, size * count);
data/phlipple-0.8.5/src/engine.c:261: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 magic[fmLen * 2];
data/phlipple-0.8.5/src/engine.c:262: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 buff[256];
data/phlipple-0.8.5/src/engine.c:352: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 b[4];
data/phlipple-0.8.5/src/engine.c:356: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.
			b[3 - f] = ((char *) buff)[f];
data/phlipple-0.8.5/src/engine.c:360: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(&fl, b, 4);
data/phlipple-0.8.5/src/game.c:58: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 phname[256];
data/phlipple-0.8.5/src/game.c:73: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 centreMsg[256];
data/phlipple-0.8.5/src/game.c:87: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 *wellDoneMsgs[7] = { "Well done!", "Level finished", "Not bad!",
data/phlipple-0.8.5/src/game.c:169: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(centreMsg, "Level %d", currLev + 1);
data/phlipple-0.8.5/src/game.c:378: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 ll = atoi(OS_getPref("last_level", "-1"));
data/phlipple-0.8.5/src/game.c:381: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 buff[256];
data/phlipple-0.8.5/src/game.c:382: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(buff, "%d", currLev);
data/phlipple-0.8.5/src/game.c:393: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(centreMsg, "Failed!");
data/phlipple-0.8.5/src/game.c:410: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(centreMsg, "Stuck!");
data/phlipple-0.8.5/src/game.c:514: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(centreMsg, "Level %d", currLev + 1);
data/phlipple-0.8.5/src/game.c:637: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(centreMsg, "Level %d", currLev + 1);
data/phlipple-0.8.5/src/levels.h:24: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 phname[32];
data/phlipple-0.8.5/src/mainscreen.c:92: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 browserLevTxt[256];
data/phlipple-0.8.5/src/mainscreen.c:97: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 buff[256];
data/phlipple-0.8.5/src/mainscreen.c:139: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).
		OS_sound_On = atoi(OS_getPref("sound", "1"));
data/phlipple-0.8.5/src/mainscreen.c:732: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(browserLevTxt, "%03d", l + 1);
data/phlipple-0.8.5/src/mainscreen.c:750: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).
	browserLlevel = atoi(OS_getPref("last_level", "-1"));
data/phlipple-0.8.5/src/osinterface_sdl.c:152: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 wmcapt[256];
data/phlipple-0.8.5/src/osinterface_sdl.c:326:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char ret[MAX_PATH];
data/phlipple-0.8.5/src/osinterface_sdl.c:328:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t defDirW[MAX_PATH *2];
data/phlipple-0.8.5/src/osinterface_sdl.c:329: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 defDir[MAX_PATH];
data/phlipple-0.8.5/src/osinterface_sdl.c:345:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *ph = fopen(OS_getFileName(fileName), "rb");
data/phlipple-0.8.5/src/quad.c:30: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(q->verts, v, sizeof(Vertex *) * 4);
data/phlipple-0.8.5/src/settings.c:41:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t wfn[MAX_PATH];
data/phlipple-0.8.5/src/settings.c:42:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t pthname[MAX_PATH];
data/phlipple-0.8.5/src/settings.c:43:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char shrt[MAX_PATH];
data/phlipple-0.8.5/src/settings.c:45:2:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
	MultiByteToWideChar(CP_UTF8, 0, phname, -1, wfn, MAX_PATH);
data/phlipple-0.8.5/src/settings.c:63:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		wchar_t wfn[MAX_PATH];
data/phlipple-0.8.5/src/settings.c:64:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		wchar_t wb[16];
data/phlipple-0.8.5/src/settings.c:66:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
		MultiByteToWideChar(CP_UTF8, 0, phname, -1, wfn, MAX_PATH);
data/phlipple-0.8.5/src/settings.c:67:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
		MultiByteToWideChar(CP_UTF8, 0, "wb", -1, wb, 16);
data/phlipple-0.8.5/src/settings.c:78:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char defDir[MAX_PATH];
data/phlipple-0.8.5/src/settings.c:87:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t defDirW[MAX_PATH *2];
data/phlipple-0.8.5/src/settings.c:88:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char ret[MAX_PATH];
data/phlipple-0.8.5/src/settings.c:98: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 mbpath[MAX_PATH *2];
data/phlipple-0.8.5/src/settings.c:99:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t path[MAX_PATH *2];
data/phlipple-0.8.5/src/settings.c:127:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char fn[1024];
data/phlipple-0.8.5/src/settings.c:181:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t wd[MAX_PATH];
data/phlipple-0.8.5/src/settings.c:182:2:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
	MultiByteToWideChar(CP_UTF8, 0, getDefaultDir(), -1, wd, MAX_PATH);
data/phlipple-0.8.5/src/settings.c:186: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 *inph = fopen(getSettingsFileName(), "rb");
data/phlipple-0.8.5/src/settings.c:189: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 buff[1024];
data/phlipple-0.8.5/src/settings.c:201:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *outph = fopen(getSettingsFileName(), "wb");
data/phlipple-0.8.5/src/settings.c:205:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *outph = fopen(w32_getFileName(getSettingsFileName()), "wb");
data/phlipple-0.8.5/src/textrenderer.c:33:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char line[MAXLINE];
data/phlipple-0.8.5/src/textrenderer.c:42: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(line, *buff, l);
data/phlipple-0.8.5/src/textrenderer.c:64: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).
			ints[nints++] = atoi(line + c);
data/phlipple-0.8.5/src/textrenderer.h:36: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 valid[256];
data/phlipple-0.8.5/src/engine.c:260:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int fmLen = strlen(FILE_MAGIC);
data/phlipple-0.8.5/src/levels.c:48:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(line) > 2)
data/phlipple-0.8.5/src/settings.c:134: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).
	while(!isalnum(b[0]) && strlen(b))
data/phlipple-0.8.5/src/settings.c:136: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 ll = strlen(b);
data/phlipple-0.8.5/src/settings.c:143: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).
	while(!isalnum(b[strlen(b) - 1]) && strlen(b))
data/phlipple-0.8.5/src/settings.c:143: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).
	while(!isalnum(b[strlen(b) - 1]) && strlen(b))
data/phlipple-0.8.5/src/settings.c:144:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		b[strlen(b) - 1] = 0;
data/phlipple-0.8.5/src/settings.c:150:11:  [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 ll = strlen(buff);
data/phlipple-0.8.5/src/settings.c:164:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(key, buff, sep);
data/phlipple-0.8.5/src/settings.c:170: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(key) && strlen(val))
data/phlipple-0.8.5/src/settings.c:170: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).
	if (strlen(key) && strlen(val))
data/phlipple-0.8.5/src/settings.c:238: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).
	(*s)->key = malloc(strlen(key) + 1);
data/phlipple-0.8.5/src/settings.c:239: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).
	(*s)->value = malloc(strlen(value) + 1);
data/phlipple-0.8.5/src/settings.c:271: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).
		found->value = realloc(found->value, strlen(value) + 1);

ANALYSIS SUMMARY:

Hits = 91
Lines analyzed = 7508 in approximately 0.18 seconds (40655 lines/second)
Physical Source Lines of Code (SLOC) = 5465
Hits@level = [0]   7 [1]  14 [2]  57 [3]   2 [4]  18 [5]   0
Hits@level+ = [0+]  98 [1+]  91 [2+]  77 [3+]  20 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 17.9323 [1+] 16.6514 [2+] 14.0897 [3+] 3.65965 [4+] 3.29369 [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.