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/luola-1.3.2/src/defines.h
Examining data/luola-1.3.2/src/number.h
Examining data/luola-1.3.2/src/console.c
Examining data/luola-1.3.2/src/console.h
Examining data/luola-1.3.2/src/list.c
Examining data/luola-1.3.2/src/list.h
Examining data/luola-1.3.2/src/parser.c
Examining data/luola-1.3.2/src/parser.h
Examining data/luola-1.3.2/src/fs.h
Examining data/luola-1.3.2/src/SFont.c
Examining data/luola-1.3.2/src/SFont.h
Examining data/luola-1.3.2/src/level.h
Examining data/luola-1.3.2/src/player.c
Examining data/luola-1.3.2/src/player.h
Examining data/luola-1.3.2/src/ship.c
Examining data/luola-1.3.2/src/ship.h
Examining data/luola-1.3.2/src/physics.c
Examining data/luola-1.3.2/src/physics.h
Examining data/luola-1.3.2/src/animation.c
Examining data/luola-1.3.2/src/animation.h
Examining data/luola-1.3.2/src/particle.c
Examining data/luola-1.3.2/src/particle.h
Examining data/luola-1.3.2/src/projectile.c
Examining data/luola-1.3.2/src/projectile.h
Examining data/luola-1.3.2/src/bullet.c
Examining data/luola-1.3.2/src/bullet.h
Examining data/luola-1.3.2/src/weapon.c
Examining data/luola-1.3.2/src/weapon.h
Examining data/luola-1.3.2/src/intro.h
Examining data/luola-1.3.2/src/game.c
Examining data/luola-1.3.2/src/game.h
Examining data/luola-1.3.2/src/levelfile.h
Examining data/luola-1.3.2/src/special.c
Examining data/luola-1.3.2/src/special.h
Examining data/luola-1.3.2/src/walker.c
Examining data/luola-1.3.2/src/walker.h
Examining data/luola-1.3.2/src/flyer.c
Examining data/luola-1.3.2/src/flyer.h
Examining data/luola-1.3.2/src/critter.c
Examining data/luola-1.3.2/src/critter.h
Examining data/luola-1.3.2/src/pilot.c
Examining data/luola-1.3.2/src/spring.c
Examining data/luola-1.3.2/src/spring.h
Examining data/luola-1.3.2/src/decor.c
Examining data/luola-1.3.2/src/decor.h
Examining data/luola-1.3.2/src/audio.c
Examining data/luola-1.3.2/src/audio.h
Examining data/luola-1.3.2/src/font.c
Examining data/luola-1.3.2/src/font.h
Examining data/luola-1.3.2/src/menu.c
Examining data/luola-1.3.2/src/menu.h
Examining data/luola-1.3.2/src/hotseat.h
Examining data/luola-1.3.2/src/selection.c
Examining data/luola-1.3.2/src/selection.h
Examining data/luola-1.3.2/src/startup.c
Examining data/luola-1.3.2/src/startup.h
Examining data/luola-1.3.2/src/demo.c
Examining data/luola-1.3.2/src/demo.h
Examining data/luola-1.3.2/src/ldat.h
Examining data/luola-1.3.2/src/lconf.c
Examining data/luola-1.3.2/src/lconf.h
Examining data/luola-1.3.2/src/lcmap.h
Examining data/luola-1.3.2/src/main.c
Examining data/luola-1.3.2/src/hotseat.c
Examining data/luola-1.3.2/src/intro.c
Examining data/luola-1.3.2/src/lcmap.c
Examining data/luola-1.3.2/src/ldat.c
Examining data/luola-1.3.2/src/level.c
Examining data/luola-1.3.2/src/fs.c
Examining data/luola-1.3.2/src/levelfile.c
Examining data/luola-1.3.2/src/pilot.h
Examining data/luola-1.3.2/tools/importlev.h
Examining data/luola-1.3.2/tools/thumbnail.c
Examining data/luola-1.3.2/tools/thumbnail.h
Examining data/luola-1.3.2/tools/im_vwing.h
Examining data/luola-1.3.2/tools/im_wings.h
Examining data/luola-1.3.2/tools/im_tou.h
Examining data/luola-1.3.2/tools/archive.c
Examining data/luola-1.3.2/tools/archive.h
Examining data/luola-1.3.2/tools/lcmaptool.c
Examining data/luola-1.3.2/tools/ldatar.c
Examining data/luola-1.3.2/tools/im_vwing.c
Examining data/luola-1.3.2/tools/importlev.c
Examining data/luola-1.3.2/tools/im_tou.c
Examining data/luola-1.3.2/tools/im_wings.c
Examining data/luola-1.3.2/contrib/unmakelev.c

FINAL RESULTS:

data/luola-1.3.2/contrib/unmakelev.c:187: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(filename, argv[1]);
data/luola-1.3.2/src/fs.c:74: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 (fullpath, PACKAGE_DATA_DIR "/");
data/luola-1.3.2/src/fs.c:76: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 (fullpath, DATA_PATH);
data/luola-1.3.2/src/fs.c:86: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 (fullpath, PACKAGE_DATA_DIR);
data/luola-1.3.2/src/fs.c:87:9:  [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 (fullpath, LEVEL_PATH);
data/luola-1.3.2/src/fs.c:89: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 (fullpath, LEVEL_PATH);
data/luola-1.3.2/src/fs.c:99: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 (fullpath, PACKAGE_DATA_DIR);
data/luola-1.3.2/src/fs.c:100:9:  [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 (fullpath, FONT_PATH);
data/luola-1.3.2/src/fs.c:102: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 (fullpath, FONT_PATH);
data/luola-1.3.2/src/fs.c:131:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (fullpath, "%s/.%s%s", home_path, HOME_PATH,
data/luola-1.3.2/src/fs.c:134:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (fullpath, "%s/.%s", home_path, HOME_PATH);
data/luola-1.3.2/src/fs.c:139:5:  [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 (fullpath, filename);
data/luola-1.3.2/src/fs.c:150: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(fullpath+(ptr-file1),file2);
data/luola-1.3.2/src/game.c:257:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (summary, "%s %d ", summary, t + 1);
data/luola-1.3.2/src/intro.c:126:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(str,"Controller: %s",name);
data/luola-1.3.2/src/intro.c:129:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(str, "%s - %s", keys[item->ID-2],
data/luola-1.3.2/src/levelfile.c:177: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(fullpath, getfullpath (USERLEVEL_DIRECTORY, ""));
data/luola-1.3.2/src/levelfile.c:179: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(fullpath, getfullpath (LEVEL_DIRECTORY, ""));
data/luola-1.3.2/src/levelfile.c:190: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(fullpath+pathlen,next->d_name);
data/luola-1.3.2/src/menu.c:100:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                    sprintf(str,format,i->text_enabled);
data/luola-1.3.2/src/menu.c:102:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                    sprintf(str,format,i->text_disabled);
data/luola-1.3.2/src/menu.c:104:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(str,format,*i->value.value);
data/luola-1.3.2/src/parser.c:70: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 (tr, str + l1 + 1);
data/luola-1.3.2/src/player.c:640:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf (buf, msg, ap);
data/luola-1.3.2/tools/archive.c:56: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(file->filename,name);
data/luola-1.3.2/tools/archive.c:57: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(file->id,id);
data/luola-1.3.2/tools/archive.c:83:13:  [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(line, "%d %s %s\n", &fn.index, &fn.id, &fn.filename);
data/luola-1.3.2/tools/archive.c:97:19:  [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.
        } else if(sscanf(line,"ldat: %s",tmps)==1) {
data/luola-1.3.2/tools/archive.c:98:13:  [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(index->filename,tmps);
data/luola-1.3.2/tools/archive.c:160: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(filename, ptr + 1);
data/luola-1.3.2/tools/im_tou.c:398:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(artfile,"%s.luola.jpg",basename);
data/luola-1.3.2/tools/im_tou.c:399:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(collfile,"%s.luola.%s",basename,lcmap?"lcmap":"bmp");
data/luola-1.3.2/tools/im_tou.c:400:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cfgfile,"%s.luola.lev",basename);
data/luola-1.3.2/tools/im_tou.c:401:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(thumbnailfile,"%s.thumb.png",basename);
data/luola-1.3.2/tools/im_vwing.c:197: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(pcxfile,basename);
data/luola-1.3.2/tools/im_vwing.c:199: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(cfgfile,basename);
data/luola-1.3.2/tools/im_vwing.c:201: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(thumbnailfile,basename);
data/luola-1.3.2/tools/im_wings.c:240: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(bmpfile,basename);
data/luola-1.3.2/tools/im_wings.c:242: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(cfgfile,basename);
data/luola-1.3.2/tools/im_wings.c:244: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(thumbnailfile,basename);
data/luola-1.3.2/tools/importlev.c:78: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(path,filename);
data/luola-1.3.2/tools/ldatar.c:102:17:  [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(file.filename,filev[r]);
data/luola-1.3.2/tools/ldatar.c:103:17:  [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(file.id,filev[r]);
data/luola-1.3.2/src/fs.c:119:25:  [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.
            home_path = getenv ("HOME");
data/luola-1.3.2/src/main.c:120:5:  [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 (NULL));
data/luola-1.3.2/tools/ldatar.c:158:13:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        c = getopt_long(argc,argv,"l:p:x:Iv", options, &option_index);
data/luola-1.3.2/contrib/unmakelev.c:38: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 palette_r[256];
data/luola-1.3.2/contrib/unmakelev.c:39: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 palette_g[256];
data/luola-1.3.2/contrib/unmakelev.c:40: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 palette_b[256];
data/luola-1.3.2/contrib/unmakelev.c:188:2:  [2] (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). Risk is low because the
  source is a constant string.
	strcat(filename, ".bmp");
data/luola-1.3.2/contrib/unmakelev.c:236: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* in = fopen(file_name, "r");
data/luola-1.3.2/src/audio.c:124: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 tmps[512];
data/luola-1.3.2/src/audio.c:126:14:  [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).
        fp = fopen (getfullpath (HOME_DIRECTORY, "battle.pls"), "r");
data/luola-1.3.2/src/bullet.c:416:9:  [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(p,ember,sizeof(struct Projectile));
data/luola-1.3.2/src/bullet.c:440:9:  [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(p,mirv,sizeof(struct Projectile));
data/luola-1.3.2/src/bullet.c:540: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(newmine,mine,sizeof(struct Projectile));
data/luola-1.3.2/src/console.c:242:9:  [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(pixels,srcpix,w*sizeof(Uint32));
data/luola-1.3.2/src/console.c:253: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 (newsurface->pixels, original->pixels,original->pitch*original->h);
data/luola-1.3.2/src/console.c:416:13:  [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(targ,original->pixels+(int)(y/zoom)*original->pitch+
data/luola-1.3.2/src/console.c:464: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(pixels,screen->pixels,screen->h*screen->pitch);
data/luola-1.3.2/src/console.c:477: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(screen->pixels,pixels,screen->h*screen->pitch);
data/luola-1.3.2/src/fs.c:61:12:  [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 fullpath[1024];
data/luola-1.3.2/src/fs.c:109:17:  [2] (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). Risk is low because the source is a constant string.
                strcpy (fullpath, "home/levels/");
data/luola-1.3.2/src/fs.c:111:17:  [2] (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). Risk is low because the source is a constant string.
                strcpy (fullpath, "home/");
data/luola-1.3.2/src/fs.c:146:12:  [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 fullpath[PATH_MAX];
data/luola-1.3.2/src/fs.c:216: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 magic[5];
data/luola-1.3.2/src/fs.c:335: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 tmp[64];
data/luola-1.3.2/src/fs.c:336: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 (tmp, "luola_%d.bmp", SDL_GetTicks ());
data/luola-1.3.2/src/game.c:176: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 tmps[256];
data/luola-1.3.2/src/game.c:177: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 data[8][3][32];    /* Four teams and four players */
data/luola-1.3.2/src/game.c:178: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 summary[128];
data/luola-1.3.2/src/game.c:179: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 data_format[8];    /* Some formatting instructions */
data/luola-1.3.2/src/game.c:197:9:  [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 (tmps, "Game over after one round");
data/luola-1.3.2/src/game.c:199:9:  [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 (tmps, "Game over after %d rounds",
data/luola-1.3.2/src/game.c:210:9:  [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 (data[data_line][0], "Team %d", t + 1);
data/luola-1.3.2/src/game.c:219:21:  [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 (data[data_line][0], "Player %d", p + 1);
data/luola-1.3.2/src/game.c:220:21:  [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 (data[data_line][1], "%d", game_status.wins[p]);
data/luola-1.3.2/src/game.c:221:21:  [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 (data[data_line][2], "%ld seconds",
data/luola-1.3.2/src/game.c:232:13:  [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 (data[team_data_line][1], "%d", mostwins);
data/luola-1.3.2/src/game.c:233:13:  [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 (data[team_data_line][2], "%ld seconds", avglife);
data/luola-1.3.2/src/game.c:254:9:  [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 (summary, "Tie game between teams");
data/luola-1.3.2/src/game.c:261:17:  [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 (summary, "Team %d wins!", t + 1);
data/luola-1.3.2/src/game.c:415:10:  [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).
    fp = fopen (filename, "w");
data/luola-1.3.2/src/game.c:512: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).
        int plr=atoi(pair->key);
data/luola-1.3.2/src/game.c:516:52:  [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).
            game_settings.controller[plr].number = atoi (pair->value);
data/luola-1.3.2/src/game.c:526: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).
        key=atoi(pair->key);
data/luola-1.3.2/src/game.c:530:58:  [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).
            game_settings.controller[player].keys[key] = atoi (pair->value);
data/luola-1.3.2/src/hotseat.c:67: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.
    static const char *modes[PLAYMODE_COUNT] = {
data/luola-1.3.2/src/intro.c:117:12:  [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 str[64];
data/luola-1.3.2/src/intro.c:121:13:  [2] (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). Risk is low because the source is a constant string.
            strcpy(str,"Controller: Keyboard");
data/luola-1.3.2/src/intro.c:132:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(str,"???");
data/luola-1.3.2/src/intro.c:415:12:  [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 buf[22];
data/luola-1.3.2/src/intro.c:417:9:  [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(buf,"Effect volume: %d%%%%",
data/luola-1.3.2/src/intro.c:420:9:  [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(buf,"Music volume: %d%%%%",
data/luola-1.3.2/src/lcmap.c:165: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 (file + r, zdata, zlen);
data/luola-1.3.2/src/lconf.c:195:25:  [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 index = atoi(pair->key);
data/luola-1.3.2/src/ldat.c:65: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 buffer[6];
data/luola-1.3.2/src/ldat.c:67:10:  [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).
    fp = fopen(filename,"rb");
data/luola-1.3.2/src/ldat.c:94: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 header[LDAT_MAGIC_LEN];
data/luola-1.3.2/src/ldat.c:264: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 header[LDAT_MAGIC_LEN] = "LDAT00";
data/luola-1.3.2/src/levelfile.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 fullpath[PATH_MAX];
data/luola-1.3.2/src/menu.c:97: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 str[256];
data/luola-1.3.2/src/parser.c:83: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 tmps[512],*line;
data/luola-1.3.2/src/parser.c:186:58:  [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).
                        case CFG_INT: *((int*)tr[r].ptr)=atoi(pair->value); break;
data/luola-1.3.2/src/particle.h:34: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 color[4];
data/luola-1.3.2/src/player.c:637: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[256];
data/luola-1.3.2/src/player.h:35:12:  [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.
    signed char axis[2];        /* Vertical, Horizontal */
data/luola-1.3.2/src/selection.c:227: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 roundstr[32];
data/luola-1.3.2/src/selection.c:232: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(roundstr,"Round %d of %d",game_status.total_rounds + 1,
data/luola-1.3.2/src/startup.c:141:40:  [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).
            luola_options.audio_rate = atoi (argv[r]);
data/luola-1.3.2/src/startup.c:149:42:  [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).
            luola_options.audio_chunks = atoi (argv[r]);
data/luola-1.3.2/src/startup.c:182:10:  [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).
    fp = fopen (filename, "w");
data/luola-1.3.2/tools/archive.c:37: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 filename[512];
data/luola-1.3.2/tools/archive.c:66: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 tmps[512],*line=NULL;
data/luola-1.3.2/tools/archive.c:70:10:  [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).
    fp = fopen(filename, "r");
data/luola-1.3.2/tools/archive.c:92:13:  [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(newfile,&fn,sizeof(struct Filename));
data/luola-1.3.2/tools/archive.c:109:12:  [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 buffer[128];
data/luola-1.3.2/tools/archive.c:125:10:  [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).
    fp = fopen(file, "wb");
data/luola-1.3.2/tools/archive.h:30: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[256];
data/luola-1.3.2/tools/archive.h:31: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 id[256];
data/luola-1.3.2/tools/im_tou.c:94: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 authorname[128];
data/luola-1.3.2/tools/im_tou.c:95: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 authoremail[128];
data/luola-1.3.2/tools/im_tou.c:102: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 buffer[14];
data/luola-1.3.2/tools/im_tou.c:190: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 name[256];
data/luola-1.3.2/tools/im_tou.c:201:10:  [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).
    fp = fopen(filename,"w");
data/luola-1.3.2/tools/im_tou.c:226:8:  [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).
    fp=fopen(filename,"wb");
data/luola-1.3.2/tools/im_tou.c:394:12:  [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 artfile[PATH_MAX],collfile[PATH_MAX],cfgfile[PATH_MAX];
data/luola-1.3.2/tools/im_tou.c:395:12:  [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 thumbnailfile[PATH_MAX];
data/luola-1.3.2/tools/im_vwing.c:44: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 levelname[19+1];
data/luola-1.3.2/tools/im_vwing.c:50: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 buffer[3];
data/luola-1.3.2/tools/im_vwing.c:122:10:  [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).
    fp = fopen(filename,"wb");
data/luola-1.3.2/tools/im_vwing.c:147:10:  [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).
    fp = fopen(filename,"w");
data/luola-1.3.2/tools/im_vwing.c:191:12:  [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 pcxfile[PATH_MAX],thumbnailfile[PATH_MAX],cfgfile[PATH_MAX];
data/luola-1.3.2/tools/im_vwing.c:198:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(pcxfile,".luola.pcx");
data/luola-1.3.2/tools/im_vwing.c:200:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(cfgfile,".luola.lev");
data/luola-1.3.2/tools/im_vwing.c:202:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(thumbnailfile,".thumb.png");
data/luola-1.3.2/tools/im_wings.c:50: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 buffer[3];
data/luola-1.3.2/tools/im_wings.c:166: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(surface->pixels,lev_pixels,lev_width*lev_height);
data/luola-1.3.2/tools/im_wings.c:184: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 name[256];
data/luola-1.3.2/tools/im_wings.c:195:10:  [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).
    fp = fopen(filename,"w");
data/luola-1.3.2/tools/im_wings.c:234:12:  [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 bmpfile[PATH_MAX],cfgfile[PATH_MAX],thumbnailfile[PATH_MAX];
data/luola-1.3.2/tools/im_wings.c:241:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(bmpfile,".luola.bmp");
data/luola-1.3.2/tools/im_wings.c:243:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(cfgfile,".luola.lev");
data/luola-1.3.2/tools/im_wings.c:245:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(thumbnailfile,".thumb.png");
data/luola-1.3.2/tools/importlev.c:72:12:  [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 path[PATH_MAX];
data/luola-1.3.2/tools/importlev.c:132:10:  [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).
    fp = fopen(filename,"rb");
data/luola-1.3.2/tools/importlev.c:162:9:  [2] (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). Risk is low because the
  source is a constant string.
        strcat(basename,".tmp");
data/luola-1.3.2/tools/importlev.c:178:9:  [2] (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). Risk is low because the
  source is a constant string.
        strcat(compactfile,".compact.lev");
data/luola-1.3.2/tools/lcmaptool.c:69:14:  [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).
        fp = fopen(argv[3], "wb");
data/luola-1.3.2/tools/lcmaptool.c:88:14:  [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).
        fp = fopen(argv[2], "r");
data/luola-1.3.2/contrib/unmakelev.c:186: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).
	filename = xmalloc(strlen(argv[1]) + 4 + 1);
data/luola-1.3.2/src/audio.c:133:33:  [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 (line == NULL || strlen (line) == 0)
data/luola-1.3.2/src/fs.c:64:18:  [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).
    datadirlen = strlen (PACKAGE_DATA_DIR);
data/luola-1.3.2/src/fs.c:68: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).
        if ((strlen (filename) + datadirlen + 1) >
data/luola-1.3.2/src/fs.c:80: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).
        if ((strlen (filename) + datadirlen + strlen (LEVEL_PATH) + 1) >
data/luola-1.3.2/src/fs.c:80:47:  [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 (filename) + datadirlen + strlen (LEVEL_PATH) + 1) >
data/luola-1.3.2/src/fs.c:93: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).
        if ((strlen (filename) + datadirlen + strlen (LEVEL_PATH) + 1) >
data/luola-1.3.2/src/fs.c:93:47:  [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 (filename) + datadirlen + strlen (LEVEL_PATH) + 1) >
data/luola-1.3.2/src/fs.c:125:18:  [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 (filename) + strlen (home_path) + strlen (HOME_PATH) +
data/luola-1.3.2/src/fs.c:125: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).
            if ((strlen (filename) + strlen (home_path) + strlen (HOME_PATH) +
data/luola-1.3.2/src/fs.c:125: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).
            if ((strlen (filename) + strlen (home_path) + strlen (HOME_PATH) +
data/luola-1.3.2/src/fs.c:126:18:  [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).
                 strlen (levelpath) + 3) > sizeof (fullpath)) {
data/luola-1.3.2/src/fs.c:149:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(fullpath,file1,ptr-file1);
data/luola-1.3.2/src/ldat.c:219:32:  [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).
    ldat->catalog_size += 11 + strlen (id);
data/luola-1.3.2/src/ldat.c:240:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    Uint32 copied = 0, read, toread;
data/luola-1.3.2/src/ldat.c:248:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            fprintf(stderr,"rw_to_rw_copy:%d: %s\n",read, SDL_GetError());
data/luola-1.3.2/src/ldat.c:251:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(SDL_RWwrite (dest, buffer, 1, read)==0) {
data/luola-1.3.2/src/ldat.c:252:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            fprintf(stderr,"rw_to_rw_copy:%d: %s\n",read, SDL_GetError());
data/luola-1.3.2/src/ldat.c:255:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        copied += read;
data/luola-1.3.2/src/ldat.c:274:17:  [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).
        idlen = strlen (block->ID);
data/luola-1.3.2/src/levelfile.c:186: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).
    pathlen = strlen(fullpath);
data/luola-1.3.2/src/parser.c:39:16:  [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).
    s2 = str + strlen (str) - 1;
data/luola-1.3.2/src/parser.c:55:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (newstr, s1, len);
data/luola-1.3.2/src/parser.c:67:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (tl, str, l1);
data/luola-1.3.2/src/parser.c:69:18:  [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).
    tr = malloc (strlen (str) - l1);
data/luola-1.3.2/src/parser.c:89:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(read<limit) {
data/luola-1.3.2/src/parser.c:90:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(SDL_RWread(rw,tmps+read,1,1)!=1) break;
data/luola-1.3.2/src/parser.c:95:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    tmps[read]='\0';
data/luola-1.3.2/src/parser.c:105:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        *len -= read;
data/luola-1.3.2/src/parser.c:147:17:  [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).
			block->title[strlen(block->title)-1]='\0';
data/luola-1.3.2/src/player.c:646:9:  [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 (buf) && dur) {
data/luola-1.3.2/tools/archive.c:77:29:  [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 (line == NULL || strlen(line) == 0 || line[0]=='#')
data/luola-1.3.2/tools/archive.c:111:9:  [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).
    l = strlen(str);
data/luola-1.3.2/tools/archive.c:121:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_t copied = 0, read, toread;
data/luola-1.3.2/tools/archive.c:140:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(fwrite(buffer, 1, read, fp)!=read) {
data/luola-1.3.2/tools/archive.c:140:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(fwrite(buffer, 1, read, fp)!=read) {
data/luola-1.3.2/tools/archive.c:144:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        copied += read;
data/luola-1.3.2/tools/archive.c:158: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).
    len = strlen(fn) - (ptr - fn);
data/luola-1.3.2/tools/im_tou.c:129:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        readlen += read;
data/luola-1.3.2/tools/im_tou.c:196:24:  [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(!dot) dot=slash+strlen(slash);
data/luola-1.3.2/tools/im_tou.c:198:5:  [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.
    strncat(name,slash,dot-slash);
data/luola-1.3.2/tools/im_vwing.c:63:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int r,read;
data/luola-1.3.2/tools/im_vwing.c:67:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        levelname[r]=fgetc(fp);
data/luola-1.3.2/tools/im_vwing.c:86:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        leveldata_len += read;
data/luola-1.3.2/tools/im_wings.c:190:24:  [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(!dot) dot=slash+strlen(slash);
data/luola-1.3.2/tools/im_wings.c:192:5:  [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.
    strncat(name,slash,dot-slash);
data/luola-1.3.2/tools/importlev.c:76:9:  [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.
        strncat(path,filename,dot-filename);

ANALYSIS SUMMARY:

Hits = 197
Lines analyzed = 19939 in approximately 0.56 seconds (35480 lines/second)
Physical Source Lines of Code (SLOC) = 14480
Hits@level = [0] 315 [1]  47 [2] 104 [3]   3 [4]  43 [5]   0
Hits@level+ = [0+] 512 [1+] 197 [2+] 150 [3+]  46 [4+]  43 [5+]   0
Hits/KSLOC@level+ = [0+] 35.3591 [1+] 13.605 [2+] 10.3591 [3+] 3.1768 [4+] 2.96961 [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.