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/libg15render-1.3.0~svn316/src/screen.c
Examining data/libg15render-1.3.0~svn316/src/pixel.c
Examining data/libg15render-1.3.0~svn316/src/text.c
Examining data/libg15render-1.3.0~svn316/src/libg15render.h
Examining data/libg15render-1.3.0~svn316/src/g15fontconvert.c

FINAL RESULTS:

data/libg15render-1.3.0~svn316/src/g15fontconvert.c:212:8:  [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(infile,O_RDONLY)!=0) {
data/libg15render-1.3.0~svn316/src/text.c:295:8:  [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(filename,F_OK)!=0) {
data/libg15render-1.3.0~svn316/src/text.c:299:8:  [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(filename,R_OK)!=0) {
data/libg15render-1.3.0~svn316/src/g15fontconvert.c:170: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 infile[128];
data/libg15render-1.3.0~svn316/src/g15fontconvert.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 outfile[128];
data/libg15render-1.3.0~svn316/src/libg15render.h:49: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 buffer[G15_BUFFER_LEN];
data/libg15render-1.3.0~svn316/src/libg15render.h:88: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 active[G15_MAX_GLYPH];
data/libg15render-1.3.0~svn316/src/pixel.c:398: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 (canvas->buffer, buf, G15_BUFFER_LEN);
data/libg15render-1.3.0~svn316/src/pixel.c:482: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 headerbytes[5];
data/libg15render-1.3.0~svn316/src/pixel.c:486: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).
    wbmp_fd=open(filename,O_RDONLY);
data/libg15render-1.3.0~svn316/src/text.c:39: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 buf[2];
data/libg15render-1.3.0~svn316/src/text.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.
    unsigned char buf[2];
data/libg15render-1.3.0~svn316/src/text.c:78: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 buf[2];
data/libg15render-1.3.0~svn316/src/text.c:293: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 buffer[128];
data/libg15render-1.3.0~svn316/src/text.c:304: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).
    if(!(file=fopen(filename,"rb")))
data/libg15render-1.3.0~svn316/src/text.c:338:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 charheader[G15_CHAR_HEADER_SIZE];
data/libg15render-1.3.0~svn316/src/text.c:369: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 fntheader[G15_FONT_HEADER_SIZE];
data/libg15render-1.3.0~svn316/src/text.c:374: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).
    f = fopen(oFilename, "w+b");
data/libg15render-1.3.0~svn316/src/text.c:411:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 charheader[G15_CHAR_HEADER_SIZE];
data/libg15render-1.3.0~svn316/src/text.c:465: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[128];
data/libg15render-1.3.0~svn316/src/g15fontconvert.c:193:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(infile,argv[++i],127);
data/libg15render-1.3.0~svn316/src/g15fontconvert.c:199:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(outfile,argv[++i],127);
data/libg15render-1.3.0~svn316/src/g15fontconvert.c:209: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).
    if(0!=strncasecmp(".fnt",outfile+(strlen(outfile)-4),4))
data/libg15render-1.3.0~svn316/src/g15fontconvert.c:210:8:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
       strncat(outfile,".fnt",128);
data/libg15render-1.3.0~svn316/src/pixel.c:491:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    retval=read(wbmp_fd,headerbytes,5);
data/libg15render-1.3.0~svn316/src/pixel.c:516:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        retval=read(wbmp_fd,buf+(5-header),buflen);
data/libg15render-1.3.0~svn316/src/text.c:164: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).
  unsigned int len = strlen (str);
data/libg15render-1.3.0~svn316/src/text.c:224: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).
  unsigned int len = strlen (str);
data/libg15render-1.3.0~svn316/src/text.c:451: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).
    for(i=0;i<strlen(string);i++)
data/libg15render-1.3.0~svn316/src/text.c:555: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).
    for(i=0;i<strlen(string);i++){

ANALYSIS SUMMARY:

Hits = 30
Lines analyzed = 1784 in approximately 0.07 seconds (25243 lines/second)
Physical Source Lines of Code (SLOC) = 1170
Hits@level = [0]  32 [1]  10 [2]  17 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+]  62 [1+]  30 [2+]  20 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 52.9915 [1+] 25.641 [2+] 17.094 [3+] 2.5641 [4+] 2.5641 [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.