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/pushover-0.0.5+git20180909/src/dominoes/pngsaver.h
Examining data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/ant.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/leveldata.h
Examining data/pushover-0.0.5+git20180909/src/pushover/leveldata_oldsave.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/sha1/sha1.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/sha1/sha1.hpp
Examining data/pushover-0.0.5+git20180909/src/pushover/recorder.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/graphics.h
Examining data/pushover-0.0.5+git20180909/src/pushover/window_input.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/levelplayer.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/levelset.h
Examining data/pushover-0.0.5+git20180909/src/pushover/tools.h
Examining data/pushover-0.0.5+git20180909/src/pushover/window_help.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/recorder.h
Examining data/pushover-0.0.5+git20180909/src/pushover/check.h
Examining data/pushover-0.0.5+git20180909/src/pushover/check.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/textsections.h
Examining data/pushover-0.0.5+git20180909/src/pushover/window_about.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/textsections.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/levelplayer.h
Examining data/pushover-0.0.5+git20180909/src/pushover/screen.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/tools.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/pngloader.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/leveldata.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/editor.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/luaclass.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/colors.h
Examining data/pushover-0.0.5+git20180909/src/pushover/graphicsn.h
Examining data/pushover-0.0.5+git20180909/src/pushover/pngloader.h
Examining data/pushover-0.0.5+git20180909/src/pushover/linebreak/linebreak.c
Examining data/pushover-0.0.5+git20180909/src/pushover/linebreak/linebreakdef.h
Examining data/pushover-0.0.5+git20180909/src/pushover/linebreak/linebreakdef.c
Examining data/pushover-0.0.5+git20180909/src/pushover/linebreak/linebreakdata.c
Examining data/pushover-0.0.5+git20180909/src/pushover/linebreak/linebreak.h
Examining data/pushover-0.0.5+git20180909/src/pushover/ant.h
Examining data/pushover-0.0.5+git20180909/src/pushover/solvedmap.h
Examining data/pushover-0.0.5+git20180909/src/pushover/levelset.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/solvedmap.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/editor.h
Examining data/pushover-0.0.5+git20180909/src/pushover/graphicsn.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/main.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/screen.h
Examining data/pushover-0.0.5+git20180909/src/pushover/soundsys.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/soundsys.h
Examining data/pushover-0.0.5+git20180909/src/pushover/window.cpp
Examining data/pushover-0.0.5+git20180909/src/pushover/window.h
Examining data/pushover-0.0.5+git20180909/src/pushover/luaclass.h

FINAL RESULTS:

data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:72:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
      sscanf(str, "%d %d %d %s", &i.xs, &i.ys, &i.yclip, i.file);
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:123:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(s, "%s", args[1]);
data/pushover-0.0.5+git20180909/src/pushover/tools.cpp:58: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(getTime());
data/pushover-0.0.5+git20180909/src/pushover/tools.cpp:88:34:  [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.
  std::string home = std::string(getenv("HOME"))+"/.pushover/";
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:33: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 file[200] ;
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:45: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 height = atoi(args[2]);
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:46: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 gap = atoi(args[3]);
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:47: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).
  int outwidth = atoi(args[4]);
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:49: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 * in = fopen(args[5], "r");
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:59: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[1000];
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:119: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[500];
data/pushover-0.0.5+git20180909/src/dominoes/pngsaver.h:43: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 *fi = fopen(fname, "wb");
data/pushover-0.0.5+git20180909/src/dominoes/pngsaver.h:108: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(png_rows[y], &((Uint8*)surf->pixels)[y*surf->pitch], surf->w);
data/pushover-0.0.5+git20180909/src/pushover/ant.cpp:45: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.
const unsigned char numAntAnimationsImages[AntAnimNothing] = {
data/pushover-0.0.5+git20180909/src/pushover/editor.cpp:321: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.
          char number[10];
data/pushover-0.0.5+git20180909/src/pushover/graphicsn.cpp:1112: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 number[10];
data/pushover-0.0.5+git20180909/src/pushover/graphicsn.cpp:1601: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 time[6];
data/pushover-0.0.5+git20180909/src/pushover/levelplayer.h:83:29:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void openEntryDoor(bool open) { openDoorEntry = open; }
data/pushover-0.0.5+git20180909/src/pushover/levelplayer.h:83:53:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void openEntryDoor(bool open) { openDoorEntry = open; }
data/pushover-0.0.5+git20180909/src/pushover/levelplayer.h:84:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void openExitDoor(bool open) { openDoorExit = open; }
data/pushover-0.0.5+git20180909/src/pushover/levelplayer.h:84:51:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void openExitDoor(bool open) { openDoorExit = open; }
data/pushover-0.0.5+git20180909/src/pushover/levelset.cpp:45:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/pushover-0.0.5+git20180909/src/pushover/linebreak/linebreak.c:732: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 brks[2];
data/pushover-0.0.5+git20180909/src/pushover/pngloader.cpp:31:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f = fopen(fname.c_str(), "rb");
data/pushover-0.0.5+git20180909/src/pushover/screen.cpp:913: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 breaks[ucsLength];
data/pushover-0.0.5+git20180909/src/pushover/sha1/sha1.cpp:237: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 sbuf[BLOCK_BYTES];
data/pushover-0.0.5+git20180909/src/pushover/tools.cpp:65:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char userHome[MAX_PATH+1];
data/pushover-0.0.5+git20180909/src/pushover/window_about.cpp:32: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 title[200];
data/pushover-0.0.5+git20180909/src/pushover/window_input.cpp:176: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 utf8[10];
data/pushover-0.0.5+git20180909/src/dominoes/assembler.cpp:64: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).
    int len = strlen(str)-1;
data/pushover-0.0.5+git20180909/src/pushover/sha1/sha1.cpp:238:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        is.read(sbuf, BLOCK_BYTES - buffer.size());
data/pushover-0.0.5+git20180909/src/pushover/tools.cpp:81:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size = strlen(userHome);

ANALYSIS SUMMARY:

Hits = 32
Lines analyzed = 19186 in approximately 0.53 seconds (36305 lines/second)
Physical Source Lines of Code (SLOC) = 14427
Hits@level = [0]  46 [1]   3 [2]  25 [3]   2 [4]   2 [5]   0
Hits@level+ = [0+]  78 [1+]  32 [2+]  29 [3+]   4 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 5.40653 [1+] 2.21806 [2+] 2.01012 [3+] 0.277258 [4+] 0.138629 [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.