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/wing-0.7/constants.h
Examining data/wing-0.7/additional/apvector.h
Examining data/wing-0.7/additional/apvector.cpp
Examining data/wing-0.7/additional/apstring.h
Examining data/wing-0.7/additional/apstring.cpp
Examining data/wing-0.7/util.h
Examining data/wing-0.7/enemytype.h
Examining data/wing-0.7/scorelisttype.h
Examining data/wing-0.7/animationtype.cpp
Examining data/wing-0.7/enemytype.cpp
Examining data/wing-0.7/collision.h
Examining data/wing-0.7/animationtype.h
Examining data/wing-0.7/star.cpp
Examining data/wing-0.7/main.cpp
Examining data/wing-0.7/bullettype.h
Examining data/wing-0.7/sound.cpp
Examining data/wing-0.7/planetype.cpp
Examining data/wing-0.7/planetype.h
Examining data/wing-0.7/star.h
Examining data/wing-0.7/scorelisttype.cpp
Examining data/wing-0.7/collision.cpp
Examining data/wing-0.7/bullettype.cpp
Examining data/wing-0.7/util.cpp
Examining data/wing-0.7/sound.h

FINAL RESULTS:

data/wing-0.7/additional/apstring.cpp:41: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(mCstring, s);
data/wing-0.7/additional/apstring.cpp:54: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(mCstring, str.mCstring);
data/wing-0.7/additional/apstring.cpp:87: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(mCstring, str.mCstring);
data/wing-0.7/additional/apstring.cpp:109: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(mCstring, s);
data/wing-0.7/additional/apstring.cpp:186: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(newBuffer, mCstring);
data/wing-0.7/additional/apstring.cpp:193: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(mCstring + lastLocation, copyStr.c_str());
data/wing-0.7/main.cpp:367:73:  [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).
      textprintf_ex(option_menu_buffer, font, 320 , 250, 15, -1, "%s",  strcpy (temp,NumToString (sample_vol).c_str()));
data/wing-0.7/main.cpp:368:73:  [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).
      textprintf_ex(option_menu_buffer, font, 320 , 280, 15, -1, "%s",  strcpy (temp,NumToString (stream_vol).c_str()));
data/wing-0.7/main.cpp:545:93:  [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).
		      textprintf_ex (buffer, font, 300 + text_length(font, "Level ") , 250, 15, -1, "%s", strcpy (temp,NumToString (level_index + 2).c_str()));
data/wing-0.7/main.cpp:668:58:  [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).
   textprintf_ex (buffer, font, 101 , 462, 15, -1, "%s", strcpy ( temp,NumToString ( plane_object.GetScore() ).c_str()) );
data/wing-0.7/main.cpp:670:58:  [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).
   textprintf_ex (buffer, font, 256 , 462, 15, -1, "%s", strcpy ( temp,NumToString ( plane_object.GetNumLives() ).c_str()) );
data/wing-0.7/main.cpp:672:58:  [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).
   textprintf_ex (buffer, font, 394 , 462, 15, -1, "%s", strcpy ( temp,NumToString ( plane_object.GetHealth() ).c_str()) );
data/wing-0.7/main.cpp:674:58:  [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).
   textprintf_ex (buffer, font, 549 , 462, 15, -1, "%s", strcpy ( temp,WeaponToString ( plane_object.GetWeapon() ).c_str()) );
data/wing-0.7/util.cpp:93:99:  [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).
      textprintf_ex(draw_buffer,font,xcoord + text_length(font, query)+8, ycoord+70,15, -1, "%s", strcpy ( temp_string,name_string.c_str()));
data/wing-0.7/additional/apstring.cpp:332: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[MAX_LENGTH];
data/wing-0.7/additional/apstring.cpp:346: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[MAX_LENGTH];
data/wing-0.7/animationtype.cpp:13: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).
   ImageFile.open ( fileName );
data/wing-0.7/animationtype.cpp:37: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).
   ImageFile.open ( fileName );
data/wing-0.7/enemytype.cpp:88:15:  [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).
   enemy_file.open ( level_file );
data/wing-0.7/main.cpp:366: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 temp [10];
data/wing-0.7/main.cpp:444:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   enemies->LoadEnemies ( (char *)level_names[level_index].c_str() , "images/enemy.dat","images/enemy_bullets.dat","images/explode.dat" );
data/wing-0.7/main.cpp:538:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				enemies->LoadEnemies ( (char *)level_names[level_index].c_str(), "images/enemy.dat","images/enemy_bullets.dat","images/explode.dat" );
data/wing-0.7/main.cpp:542: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 temp [3];
data/wing-0.7/main.cpp:666:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char temp [10];
data/wing-0.7/scorelisttype.cpp:27:15:  [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).
   score_file.open (file_name);
data/wing-0.7/scorelisttype.cpp:43: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 temp_c_str [10];
data/wing-0.7/scorelisttype.cpp:69:15:  [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).
   score_file.open (file_name);
data/wing-0.7/sound.cpp:61: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).
   stream_file = fopen(name,"rb");
data/wing-0.7/sound.h:19:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char sig[10];
data/wing-0.7/util.cpp:83:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char temp_string [length];
data/wing-0.7/util.cpp:218:9:  [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).
   file.open ( file_name );
data/wing-0.7/additional/apstring.cpp:38: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).
    mLength = strlen(s);
data/wing-0.7/additional/apstring.cpp:100: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(s);
data/wing-0.7/main.cpp:278:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(10000);
data/wing-0.7/main.cpp:371:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(10000);
data/wing-0.7/main.cpp:486:44:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      while (( timer - startTimer <= 15 )) usleep(2000);
data/wing-0.7/main.cpp:653:44:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      while (( timer - startTimer <= 15 )) usleep(2000);
data/wing-0.7/main.cpp:680:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(10000);
data/wing-0.7/scorelisttype.cpp:50:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (temp_c_str, converter.c_str(), 10);
data/wing-0.7/scorelisttype.cpp:54:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (temp_c_str, list [i].name.c_str(), 10);
data/wing-0.7/scorelisttype.cpp:59:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (temp_c_str, converter.c_str(), 10);
data/wing-0.7/util.cpp:96:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(10000);
data/wing-0.7/util.cpp:173:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(10000);

ANALYSIS SUMMARY:

Hits = 43
Lines analyzed = 3573 in approximately 0.14 seconds (25468 lines/second)
Physical Source Lines of Code (SLOC) = 2526
Hits@level = [0]   1 [1]  12 [2]  17 [3]   0 [4]  14 [5]   0
Hits@level+ = [0+]  44 [1+]  43 [2+]  31 [3+]  14 [4+]  14 [5+]   0
Hits/KSLOC@level+ = [0+] 17.4188 [1+] 17.023 [2+] 12.2724 [3+] 5.54236 [4+] 5.54236 [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.