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/xtron-1.1a/wintype.c
Examining data/xtron-1.1a/wintype.h
Examining data/xtron-1.1a/xpm2pixmap.c
Examining data/xtron-1.1a/xpm2pixmap.h
Examining data/xtron-1.1a/resource.h
Examining data/xtron-1.1a/main.c
Examining data/xtron-1.1a/main.h
Examining data/xtron-1.1a/resource.c
Examining data/xtron-1.1a/xtron.c
Examining data/xtron-1.1a/xtron.h

FINAL RESULTS:

data/xtron-1.1a/xpm2pixmap.c:41: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(real_filename, resfilename);
data/xtron-1.1a/xpm2pixmap.c:42:3:  [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(real_filename, filename);
data/xtron-1.1a/main.c:651:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(time(0));
data/xtron-1.1a/main.c:52: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 score1[30];
data/xtron-1.1a/main.c:60: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(score1,"Player 1 - Score: %d",p[0].score);
data/xtron-1.1a/main.c:69: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(score1,"Player 2 - Score: %d",p[1].score);
data/xtron-1.1a/main.c:155: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 key_buffer[65];
data/xtron-1.1a/main.c:188: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 score1[28], score2[28];
data/xtron-1.1a/main.c:266: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(score1,"Player 1 - Score: %d",p[0].score);
data/xtron-1.1a/main.c:267: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(score2,"Player 2 - Score: %d",p[1].score);
data/xtron-1.1a/resource.c:28: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 *string_type[20];
data/xtron-1.1a/resource.c:40: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 *string_type[20];
data/xtron-1.1a/resource.c:42: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 resource[255];
data/xtron-1.1a/resource.c:85: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 *string_type[20];
data/xtron-1.1a/resource.c:87: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 resource[255];
data/xtron-1.1a/resource.c:92: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).
  return(atoi(resource));
data/xtron-1.1a/xpm2pixmap.c: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 real_filename[MAX_PATH_LEN];
data/xtron-1.1a/xpm2pixmap.c:37: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 resfilename[MAX_PATH_LEN];
data/xtron-1.1a/main.c:61:61:  [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).
    XDrawImageString(display, plr1_win, gc, 10, 20, score1, strlen(score1));
data/xtron-1.1a/main.c:70:61:  [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).
    XDrawImageString(display, plr2_win, gc, 10, 20, score1, strlen(score1));
data/xtron-1.1a/main.c:269:59:  [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).
  XDrawImageString(display, plr1_win, gc, 10, 20, score1, strlen(score1));
data/xtron-1.1a/main.c:270:59:  [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).
  XDrawImageString(display, plr2_win, gc, 10, 20, score2, strlen(score2));
data/xtron-1.1a/resource.c:33:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(name1, DBvalue.addr, (int) DBvalue.size);
data/xtron-1.1a/resource.c:46:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(resource, DBvalue.addr, (int) DBvalue.size);
data/xtron-1.1a/resource.c:91:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(resource, DBvalue.addr, (int) DBvalue.size);

ANALYSIS SUMMARY:

Hits = 25
Lines analyzed = 1357 in approximately 0.05 seconds (25440 lines/second)
Physical Source Lines of Code (SLOC) = 914
Hits@level = [0]   9 [1]   7 [2]  15 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  34 [1+]  25 [2+]  18 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 37.1991 [1+] 27.3523 [2+] 19.6937 [3+] 3.28228 [4+] 2.18818 [5+]   0
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.