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/libphysfs-3.0.2/extras/abs-file.h
Examining data/libphysfs-3.0.2/extras/globbing.c
Examining data/libphysfs-3.0.2/extras/globbing.h
Examining data/libphysfs-3.0.2/extras/ignorecase.c
Examining data/libphysfs-3.0.2/extras/ignorecase.h
Examining data/libphysfs-3.0.2/extras/physfshttpd.c
Examining data/libphysfs-3.0.2/extras/physfsrwops.c
Examining data/libphysfs-3.0.2/extras/physfsrwops.h
Examining data/libphysfs-3.0.2/extras/physfsunpack.c
Examining data/libphysfs-3.0.2/extras/selfextract.c
Examining data/libphysfs-3.0.2/src/physfs.c
Examining data/libphysfs-3.0.2/src/physfs.h
Examining data/libphysfs-3.0.2/src/physfs_archiver_7z.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_dir.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_grp.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_hog.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_iso9660.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_mvl.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_qpak.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_slb.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_unpacked.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_vdf.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_wad.c
Examining data/libphysfs-3.0.2/src/physfs_archiver_zip.c
Examining data/libphysfs-3.0.2/src/physfs_byteorder.c
Examining data/libphysfs-3.0.2/src/physfs_casefolding.h
Examining data/libphysfs-3.0.2/src/physfs_internal.h
Examining data/libphysfs-3.0.2/src/physfs_lzmasdk.h
Examining data/libphysfs-3.0.2/src/physfs_miniz.h
Examining data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp
Examining data/libphysfs-3.0.2/src/physfs_platform_os2.c
Examining data/libphysfs-3.0.2/src/physfs_platform_posix.c
Examining data/libphysfs-3.0.2/src/physfs_platform_qnx.c
Examining data/libphysfs-3.0.2/src/physfs_platform_unix.c
Examining data/libphysfs-3.0.2/src/physfs_platform_windows.c
Examining data/libphysfs-3.0.2/src/physfs_platform_winrt.cpp
Examining data/libphysfs-3.0.2/src/physfs_platforms.h
Examining data/libphysfs-3.0.2/src/physfs_unicode.c
Examining data/libphysfs-3.0.2/test/test_physfs.c

FINAL RESULTS:

data/libphysfs-3.0.2/src/physfs_platform_unix.c:230:15:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
         rc = readlink(path, retval, len);
data/libphysfs-3.0.2/extras/globbing.c:178: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(retval[matches], *i);
data/libphysfs-3.0.2/extras/ignorecase.c:59: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(ptr, *i); /* found a match. Overwrite with this case. */
data/libphysfs-3.0.2/extras/physfshttpd.c:105:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(buffer, sizeof (buffer), fmt, ap);
data/libphysfs-3.0.2/src/physfs.c:223: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(pathdup, path);
data/libphysfs-3.0.2/src/physfs.c:567: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(newstr, str);
data/libphysfs-3.0.2/src/physfs.c:1043: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(dirHandle->dirName, newDir);
data/libphysfs-3.0.2/src/physfs.c:1050: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(dirHandle->mountPoint, mountPoint);
data/libphysfs-3.0.2/src/physfs.c:1415: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(retval, str);
data/libphysfs-3.0.2/src/physfs.c:2292: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(newstr, str);
data/libphysfs-3.0.2/src/physfs.c:2346: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(mountPoint, i->mountPoint);
data/libphysfs-3.0.2/src/physfs.c:3220: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(retval->name, name);
data/libphysfs-3.0.2/src/physfs_archiver_dir.c:61: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(retval, name);
data/libphysfs-3.0.2/src/physfs_internal.h:100:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf __PHYSFS_msvc_vsnprintf
data/libphysfs-3.0.2/src/physfs_internal.h:101:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf __PHYSFS_msvc_snprintf
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:165: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(retval, str);
data/libphysfs-3.0.2/src/physfs_platform_os2.c:219: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(spec, buf);      /* copy isolated parent dir... */
data/libphysfs-3.0.2/src/physfs_platform_os2.c:243:21:  [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(fname, fb.achName);
data/libphysfs-3.0.2/src/physfs_platform_os2.c:436: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(utf8, dirname);
data/libphysfs-3.0.2/src/physfs_platform_os2.c:525: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(retval + 3, utf8);
data/libphysfs-3.0.2/src/physfs_platform_posix.c:75: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(retval, pw->pw_dir);
data/libphysfs-3.0.2/src/physfs_platform_posix.c:104: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(retval, envr);
data/libphysfs-3.0.2/src/physfs_platform_posix.c:333:21:  [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.
    st->readonly = (access(fname, W_OK) == -1);
data/libphysfs-3.0.2/src/physfs_platform_unix.c:196: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(exe, start);
data/libphysfs-3.0.2/src/physfs_platform_unix.c:199: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(exe, bin);
data/libphysfs-3.0.2/src/physfs_platform_unix.c:201:13:  [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(exe, X_OK) == 0)  /* Exists as executable? We're done. */
data/libphysfs-3.0.2/src/physfs_platform_unix.c:276:21:  [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 (!retval && (access("/proc", F_OK) == 0))
data/libphysfs-3.0.2/src/physfs_platform_unix.c:317: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(path, envr);
data/libphysfs-3.0.2/src/physfs_platform_windows.c:650: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(searchPath, dirname);
data/libphysfs-3.0.2/test/test_physfs.c:1476: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(envr, PHYSFS_getUserDir());
data/libphysfs-3.0.2/test/test_physfs.c:1480:9:  [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(envr, F_OK) == 0)
data/libphysfs-3.0.2/src/physfs_platform_posix.c:91:18:  [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.
    char *envr = getenv("HOME");
data/libphysfs-3.0.2/src/physfs_platform_unix.c:312:16:  [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.
        envr = getenv("PATH");
data/libphysfs-3.0.2/src/physfs_platform_unix.c:344:24:  [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.
    const char *envr = getenv("XDG_DATA_HOME");
data/libphysfs-3.0.2/src/physfs_platform_windows.c:117:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(lpcs);
data/libphysfs-3.0.2/src/physfs_platform_windows.c:902:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection((LPCRITICAL_SECTION) mutex);
data/libphysfs-3.0.2/test/test_physfs.c:522:13:  [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((unsigned int) time(NULL));
data/libphysfs-3.0.2/test/test_physfs.c:1471:24:  [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.
    const char *envr = getenv("TESTPHYSFS_HISTORY");
data/libphysfs-3.0.2/extras/abs-file.h:153:29:  [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).
#define MY_OPEN_FOR_READ(n) fopen(n, "rb")
data/libphysfs-3.0.2/extras/globbing.c:222:60:  [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).
    flist = PHYSFSEXT_enumerateFilesWildcard("/", argv[1], atoi(argv[2]));
data/libphysfs-3.0.2/extras/ignorecase.c:103: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[128];
data/libphysfs-3.0.2/extras/ignorecase.c:158:5:  [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(buf, "/a/b/c/x.txt");
data/libphysfs-3.0.2/extras/ignorecase.c:163:5:  [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(buf, "/a/B/c/x.txt");
data/libphysfs-3.0.2/extras/ignorecase.c:168:5:  [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(buf, "/a/b/C/x.txt");
data/libphysfs-3.0.2/extras/ignorecase.c:173:5:  [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(buf, "/a/b/c/X.txt");
data/libphysfs-3.0.2/extras/ignorecase.c:178:5:  [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(buf, "/a/b/c/z.txt");
data/libphysfs-3.0.2/extras/ignorecase.c:183:5:  [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(buf, "/A/B/Z/z.txt");
data/libphysfs-3.0.2/extras/physfshttpd.c:101: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[1024];
data/libphysfs-3.0.2/extras/physfshttpd.c:133: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 buffer[1024];
data/libphysfs-3.0.2/extras/physfshttpd.c:218: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 ipstr[128];
data/libphysfs-3.0.2/extras/physfshttpd.c:219: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[512];
data/libphysfs-3.0.2/extras/physfshttpd.c:279: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(args->addr, addr, addrlen);
data/libphysfs-3.0.2/extras/physfsunpack.c:51: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 modstr[64];
data/libphysfs-3.0.2/extras/physfsunpack.c:66:20:  [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[64 * 1024];
data/libphysfs-3.0.2/src/physfs.c:227: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(io, &__PHYSFS_nativeIoInterface, sizeof (*io));
data/libphysfs-3.0.2/src/physfs.c:264: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(buf, info->buf + info->pos, (size_t) len);
data/libphysfs-3.0.2/src/physfs.c:330: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(retval, io, sizeof (*retval));
data/libphysfs-3.0.2/src/physfs.c:402: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(io, &__PHYSFS_memoryIoInterface, sizeof (*io));
data/libphysfs-3.0.2/src/physfs.c:486: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(retval, io, sizeof (PHYSFS_Io));
data/libphysfs-3.0.2/src/physfs.c:530: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(io, &__PHYSFS_handleIoInterface, sizeof (*io));
data/libphysfs-3.0.2/src/physfs.c:1110: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(retval, argv0, size);
data/libphysfs-3.0.2/src/physfs.c:1468: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(archiver, _archiver, sizeof (*archiver));
data/libphysfs-3.0.2/src/physfs.c:1570: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 retval[2] = { __PHYSFS_platformDirSeparator, '\0' };
data/libphysfs-3.0.2/src/physfs.c:2745: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(buffer, fh->buffer + fh->bufpos, cpy);
data/libphysfs-3.0.2/src/physfs.c:2816: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(fh->buffer + fh->buffill, buffer, len);
data/libphysfs-3.0.2/src/physfs.c:3096: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(&allocator, a, sizeof (PHYSFS_Allocator));
data/libphysfs-3.0.2/src/physfs.c:3147: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 rootpath[2] = { '/', '\0' };
data/libphysfs-3.0.2/src/physfs_archiver_7z.c:294: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(buf, outBuffer + offset, outSizeProcessed);
data/libphysfs-3.0.2/src/physfs_archiver_grp.c:40: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 name[13];
data/libphysfs-3.0.2/src/physfs_archiver_hog.c:45: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 name[13];
data/libphysfs-3.0.2/src/physfs_archiver_mvl.c:43: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 name[13];
data/libphysfs-3.0.2/src/physfs_archiver_qpak.c:46: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 name[56];
data/libphysfs-3.0.2/src/physfs_archiver_slb.c:30: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 name[64];
data/libphysfs-3.0.2/src/physfs_archiver_unpacked.c:132: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(retval, _io, sizeof (PHYSFS_Io));
data/libphysfs-3.0.2/src/physfs_archiver_unpacked.c:199: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(retval, &UNPK_Io, sizeof (*retval));
data/libphysfs-3.0.2/src/physfs_archiver_vdf.c:60: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 name[VDF_ENTRY_NAME_LENGTH + 1];
data/libphysfs-3.0.2/src/physfs_archiver_wad.c:57: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 name[9];
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:211: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(finfo->initial_crypto_keys, finfo->crypto_keys, 12);
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:411: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(&finfo->stream, &str, sizeof (z_stream));
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:415:17:  [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(finfo->crypto_keys, finfo->initial_crypto_keys, 12);
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:467: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(retval, io, sizeof (PHYSFS_Io));
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:571: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(&buf[maxread - 4], &extra, sizeof (extra));
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:1059: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(((PHYSFS_uint8 *) retval) + sizeof (__PHYSFS_DirTreeEntry),
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:1549: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(str, filename, len);
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:1597: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(retval, &ZIP_Io, sizeof (PHYSFS_Io));
data/libphysfs-3.0.2/src/physfs_lzmasdk.h:1674:3:  [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(buf, p->buf + p->pos, rem);
data/libphysfs-3.0.2/src/physfs_lzmasdk.h:1723:38:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  { MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); }
data/libphysfs-3.0.2/src/physfs_lzmasdk.h:3786: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(outBuffer, inBuf, curSize);
data/libphysfs-3.0.2/src/physfs_lzmasdk.h:5589: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(p->tempBuf, src, inSize);
data/libphysfs-3.0.2/src/physfs_lzmasdk.h:5869:3:  [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->dic + p->dicPos, src, size);
data/libphysfs-3.0.2/src/physfs_miniz.h:129:31:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
data/libphysfs-3.0.2/src/physfs_miniz.h:598: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
data/libphysfs-3.0.2/src/physfs_miniz.h:618: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:108:27:  [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).
        const int devfd = open(name, O_RDONLY);
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:121: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 mntpnt[B_FILE_NAME_LENGTH];
data/libphysfs-3.0.2/src/physfs_platform_os2.c:211: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 spec[CCHMAXPATH];
data/libphysfs-3.0.2/src/physfs_platform_os2.c:220: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(spec, "\\*.*");  /*  ...and add wildcard search spec. */
data/libphysfs-3.0.2/src/physfs_platform_os2.c:269: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[CCHMAXPATH];
data/libphysfs-3.0.2/src/physfs_platform_os2.c:317: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[20];
data/libphysfs-3.0.2/src/physfs_platform_os2.c:334: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 drivename[3] = { 0, ':', '\0' };
data/libphysfs-3.0.2/src/physfs_platform_os2.c:370:17:  [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 drive[4] = "x:\\";
data/libphysfs-3.0.2/src/physfs_platform_os2.c:382: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[CCHMAXPATH];
data/libphysfs-3.0.2/src/physfs_platform_os2.c:438: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(utf8 + utf8len, "\\*.*");
data/libphysfs-3.0.2/src/physfs_platform_os2.c:440: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(utf8 + utf8len, "*.*");
data/libphysfs-3.0.2/src/physfs_platform_posix.c:170:10:  [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).
    fd = open(filename, mode, S_IRUSR | S_IWUSR);
data/libphysfs-3.0.2/src/physfs_platform_qnx.c:42:24:  [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).
        const int fd = open("/proc/self/exefile", O_RDONLY);
data/libphysfs-3.0.2/src/physfs_platform_qnx.c:109:17:  [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).
         ((fd = open(path, O_RDONLY | O_NONBLOCK)) != -1) )
data/libphysfs-3.0.2/src/physfs_platform_qnx.c:111: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 mnt[256] = { 0 };
data/libphysfs-3.0.2/src/physfs_platform_unix.c:130:20:  [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 *mounts = fopen(MNTTAB, "r");
data/libphysfs-3.0.2/src/physfs_platform_unix.c:258: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 fullpath[PATH_MAX];
data/libphysfs-3.0.2/src/physfs_platform_unix.c:285: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 path[64];
data/libphysfs-3.0.2/src/physfs_platform_windows.c:246: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 drive[4] = { 'x', ':', '\\', '\0' };
data/libphysfs-3.0.2/src/physfs_platform_windows.c:367: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 drive_str[4] = { 'x', ':', '\\', '\0' };
data/libphysfs-3.0.2/test/test_physfs.c:118:21:  [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 appending = atoi(ptr + 1);
data/libphysfs-3.0.2/test/test_physfs.c:192: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).
    appending = atoi(ptr + 1);
data/libphysfs-3.0.2/test/test_physfs.c:215:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *in = fopen(args, "rb");
data/libphysfs-3.0.2/test/test_physfs.c:454:11:  [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).
    num = atoi(args);
data/libphysfs-3.0.2/test/test_physfs.c:469:37:  [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).
    do_buffer_size = (unsigned int) atoi(args);
data/libphysfs-3.0.2/test/test_physfs.c:495:11:  [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).
    num = atoi(args);
data/libphysfs-3.0.2/test/test_physfs.c:510: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 buf[37];
data/libphysfs-3.0.2/test/test_physfs.c:511: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 buf2[37];
data/libphysfs-3.0.2/test/test_physfs.c:521: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(buf, "abcdefghijklmnopqrstuvwxyz0123456789");
data/libphysfs-3.0.2/test/test_physfs.c:698: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).
    ptr = strchr(ptr, ' '); *ptr = '\0'; ptr++; inclCD = atoi(arcExt);
data/libphysfs-3.0.2/test/test_physfs.c:699: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).
    arcsFirst = atoi(ptr);
data/libphysfs-3.0.2/test/test_physfs.c:849: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 buffer[128];
data/libphysfs-3.0.2/test/test_physfs.c:1221: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 modstr[64];
data/libphysfs-3.0.2/test/test_physfs.c:1232: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 timestring[65];
data/libphysfs-3.0.2/test/test_physfs.c:1475: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 envr[256];
data/libphysfs-3.0.2/test/test_physfs.c:1477: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(envr, ".testphys_history");
data/libphysfs-3.0.2/test/test_physfs.c:1482: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 buf[512];
data/libphysfs-3.0.2/test/test_physfs.c:1483:19:  [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 *f = fopen(envr, "r");
data/libphysfs-3.0.2/test/test_physfs.c:1506:20:  [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).
    history_file = fopen(envr, "ab");
data/libphysfs-3.0.2/test/test_physfs.c:1562: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(buf, "quit");
data/libphysfs-3.0.2/extras/abs-file.h:154:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define MY_GETC(fp) fgetc(fp)
data/libphysfs-3.0.2/extras/globbing.c:169:62:  [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).
                retval[matches] = (char *) allocator->Malloc(strlen(*i) + 1);
data/libphysfs-3.0.2/extras/physfshttpd.c:221:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ipstr, inet_ntoa(((struct sockaddr_in *) args->addr)->sin_addr),
data/libphysfs-3.0.2/extras/physfshttpd.c:226:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(args->sock, buffer, sizeof (buffer));
data/libphysfs-3.0.2/extras/physfsunpack.c:20:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(modstr, str, strsize);
data/libphysfs-3.0.2/extras/physfsunpack.c:22: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).
    strsize = strlen(modstr);
data/libphysfs-3.0.2/extras/physfsunpack.c:103: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).
    const int len = strlen(origdir) + strlen(str) + 2;
data/libphysfs-3.0.2/extras/physfsunpack.c:103: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).
    const int len = strlen(origdir) + strlen(str) + 2;
data/libphysfs-3.0.2/src/physfs.c:211:41:  [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).
    pathdup = (char *) allocator.Malloc(strlen(path) + 1);
data/libphysfs-3.0.2/src/physfs.c:555:40:  [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).
    newstr = (char *) allocator.Malloc(strlen(str) + 1);
data/libphysfs-3.0.2/src/physfs.c:1002: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(fname);
data/libphysfs-3.0.2/src/physfs.c:1003: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).
    mntpntlen = strlen(h->mountPoint);
data/libphysfs-3.0.2/src/physfs.c:1030:28:  [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).
        const size_t len = strlen(mountPoint) + 1;
data/libphysfs-3.0.2/src/physfs.c:1041:52:  [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).
    dirHandle->dirName = (char *) allocator.Malloc(strlen(newDir) + 1);
data/libphysfs-3.0.2/src/physfs.c:1047:58:  [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).
        dirHandle->mountPoint = (char *)allocator.Malloc(strlen(mountPoint)+2);
data/libphysfs-3.0.2/src/physfs.c:1051:9:  [1] (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 character.
        strcat(dirHandle->mountPoint, "/");
data/libphysfs-3.0.2/src/physfs.c:1221:20:  [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).
    assert(baseDir[strlen(baseDir) - 1] == __PHYSFS_platformDirSeparator);
data/libphysfs-3.0.2/src/physfs.c:1222:20:  [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).
    assert(userDir[strlen(userDir) - 1] == __PHYSFS_platformDirSeparator);
data/libphysfs-3.0.2/src/physfs.c:1413:46:  [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).
    char *retval = (char *) allocator.Malloc(strlen(str) + 1);
data/libphysfs-3.0.2/src/physfs.c:1604:12:  [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).
    assert(strlen(prefDir) > 0);
data/libphysfs-3.0.2/src/physfs.c:1605:25:  [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).
    endstr = prefDir + (strlen(prefDir) - 1);
data/libphysfs-3.0.2/src/physfs.c:1889: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).
    const size_t l = strlen(f);
data/libphysfs-3.0.2/src/physfs.c:1899: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).
            const size_t allocsize = strlen(d) + l + 2;
data/libphysfs-3.0.2/src/physfs.c:1961:30:  [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).
        data.archiveExtLen = strlen(archiveExt);
data/libphysfs-3.0.2/src/physfs.c:2022:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t mntpntlen = strlen(h->mountPoint);
data/libphysfs-3.0.2/src/physfs.c:2023: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).
        size_t len = strlen(fname);
data/libphysfs-3.0.2/src/physfs.c:2141: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(_dname) + 1;
data/libphysfs-3.0.2/src/physfs.c:2175: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(_fname) + 1;
data/libphysfs-3.0.2/src/physfs.c:2191: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(_fname) + 1;
data/libphysfs-3.0.2/src/physfs.c:2279:40:  [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).
    newstr = (char *) allocator.Malloc(strlen(str) + 1);
data/libphysfs-3.0.2/src/physfs.c:2338: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).
    const size_t len = strlen(arcfname);
data/libphysfs-3.0.2/src/physfs.c:2341:25:  [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).
    const size_t slen = strlen(i->mountPoint) + 1;
data/libphysfs-3.0.2/src/physfs.c:2376:25:  [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).
    const size_t slen = strlen(trimmedDir) + strlen(fname) + 2;
data/libphysfs-3.0.2/src/physfs.c:2376:46:  [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).
    const size_t slen = strlen(trimmedDir) + strlen(fname) + 2;
data/libphysfs-3.0.2/src/physfs.c:2419: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) + 1;
data/libphysfs-3.0.2/src/physfs.c:2551: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(_fname) + 1;
data/libphysfs-3.0.2/src/physfs.c:2619: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(_fname) + 1;
data/libphysfs-3.0.2/src/physfs.c:2756:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            const PHYSFS_sint64 rc = io->read(io, fh->buffer, fh->bufsize);
data/libphysfs-3.0.2/src/physfs.c:2804:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return fh->io->read(fh->io, buffer, len);
data/libphysfs-3.0.2/src/physfs.c:3001: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(_fname) + 1;
data/libphysfs-3.0.2/src/physfs.c:3055:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return (io->read(io, buf, len) == len);
data/libphysfs-3.0.2/src/physfs.c:3175: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).
    return __PHYSFS_hashString(name, strlen(name)) % dt->hashBuckets;
data/libphysfs-3.0.2/src/physfs.c:3211: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).
        const size_t alloclen = strlen(name) + 1 + dt->entrylen;
data/libphysfs-3.0.2/src/physfs.h:3081:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    PHYSFS_sint64 (*read)(struct PHYSFS_Io *io, void *buf, PHYSFS_uint64 len);
data/libphysfs-3.0.2/src/physfs_archiver_7z.c:90:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const PHYSFS_sint64 rc = (len == 0) ? 0 : io->read(io, buf, len);
data/libphysfs-3.0.2/src/physfs_archiver_7z.c:229:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    BAIL_IF_ERRPASS(io->read(io, sig, 6) != 6, NULL);
data/libphysfs-3.0.2/src/physfs_archiver_dir.c:36: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).
    const size_t len = ((pre) ? strlen((char *) pre) : 0) + strlen(dir) + 1; \
data/libphysfs-3.0.2/src/physfs_archiver_dir.c:36: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).
    const size_t len = ((pre) ? strlen((char *) pre) : 0) + strlen(dir) + 1; \
data/libphysfs-3.0.2/src/physfs_archiver_dir.c:48:28:  [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).
    const size_t namelen = strlen(name);
data/libphysfs-3.0.2/src/physfs_archiver_iso9660.c:68: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).
    baselen = strlen(base);
data/libphysfs-3.0.2/src/physfs_archiver_unpacked.c:76:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rc = finfo->io->read(finfo->io, buffer, len);
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:158:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const PHYSFS_sint64 br = io->read(io, buf, len);
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:671: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).
                memmove(ptr, ptr + 2, strlen(ptr + 2) + 1);
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:685: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).
                    memmove(prevptr, ptr + 4, strlen(ptr + 4) + 1);
data/libphysfs-3.0.2/src/physfs_archiver_zip.c:1591:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (io->read(io, crypto_header, 12) != 12)
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:64:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, str, bufsize-1);
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:162: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).
    const size_t len = strlen(str);
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:176: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).
    const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 2;
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:176:42:  [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).
    const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 2;
data/libphysfs-3.0.2/src/physfs_platform_haiku.cpp:176: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).
    const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 2;
data/libphysfs-3.0.2/src/physfs_platform_os2.c:98: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).
    const size_t len = strlen(utf8str) + 1;
data/libphysfs-3.0.2/src/physfs_platform_os2.c:156: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).
    const size_t len = strlen(cpstr) + 1;
data/libphysfs-3.0.2/src/physfs_platform_os2.c:396: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).
    for (len = strlen(retval) - 1; len >= 0; len--)
data/libphysfs-3.0.2/src/physfs_platform_os2.c:426: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).
    size_t utf8len = strlen(dirname);
data/libphysfs-3.0.2/src/physfs_platform_os2.c:515:40:  [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).
    retval = (char *) allocator.Malloc(strlen(utf8) + 4);
data/libphysfs-3.0.2/src/physfs_platform_posix.c:70: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).
        const size_t dlen = strlen(pw->pw_dir);
data/libphysfs-3.0.2/src/physfs_platform_posix.c:99:36:  [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).
            const size_t envrlen = strlen(envr);
data/libphysfs-3.0.2/src/physfs_platform_posix.c:222:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rc = read(fd, buffer, (size_t) len);
data/libphysfs-3.0.2/src/physfs_platform_qnx.c:43:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        const ssize_t br = (fd == -1) ? -1 : read(fd, retval, PATH_MAX);
data/libphysfs-3.0.2/src/physfs_platform_qnx.c:82:28:  [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).
        const size_t len = strlen(home) + strlen(app) + 3;
data/libphysfs-3.0.2/src/physfs_platform_qnx.c:82:43:  [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).
        const size_t len = strlen(home) + strlen(app) + 3;
data/libphysfs-3.0.2/src/physfs_platform_qnx.c:141: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(dev) + 6;
data/libphysfs-3.0.2/src/physfs_platform_unix.c:179: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).
        binlen = strlen(bin);
data/libphysfs-3.0.2/src/physfs_platform_unix.c:180: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).
        size = strlen(start) + binlen + 2;
data/libphysfs-3.0.2/src/physfs_platform_unix.c:197: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 ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/'))
data/libphysfs-3.0.2/src/physfs_platform_unix.c:198:13:  [1] (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 character.
            strcat(exe, "/");
data/libphysfs-3.0.2/src/physfs_platform_unix.c:315:55:  [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).
            char *path = (char *) __PHYSFS_smallAlloc(strlen(envr) + 1);
data/libphysfs-3.0.2/src/physfs_platform_unix.c:326:56:  [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).
        char *ptr = (char *) allocator.Realloc(retval, strlen(retval) + 1);
data/libphysfs-3.0.2/src/physfs_platform_unix.c:357: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(envr) + strlen(append) + strlen(app) + 2;
data/libphysfs-3.0.2/src/physfs_platform_unix.c:357:26:  [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(envr) + strlen(append) + strlen(app) + 2;
data/libphysfs-3.0.2/src/physfs_platform_unix.c:357:43:  [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(envr) + strlen(append) + strlen(app) + 2;
data/libphysfs-3.0.2/src/physfs_platform_windows.c:64:46:  [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).
        const size_t len = (PHYSFS_uint64) ((strlen(str) + 1) * 2); \
data/libphysfs-3.0.2/src/physfs_platform_windows.c:90:41:  [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).
        ptr = allocator.Realloc(retval, strlen(retval) + 1); /* shrink. */
data/libphysfs-3.0.2/src/physfs_platform_windows.c:433: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(retval);
data/libphysfs-3.0.2/src/physfs_platform_windows.c:533: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(utf8) + strlen(org) + strlen(app) + 4;
data/libphysfs-3.0.2/src/physfs_platform_windows.c:533:26:  [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(utf8) + strlen(org) + strlen(app) + 4;
data/libphysfs-3.0.2/src/physfs_platform_windows.c:533:40:  [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(utf8) + strlen(org) + strlen(app) + 4;
data/libphysfs-3.0.2/src/physfs_platform_windows.c:641: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).
    size_t len = strlen(dirname);
data/libphysfs-3.0.2/src/physfs_platform_windows.c:660:5:  [1] (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 character.
    strcat(searchPath, "*");
data/libphysfs-3.0.2/test/test_physfs.c:92: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:284: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:296: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:315: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:432: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:451: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:466: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:492: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:718: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:735: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:754: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:774: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:791: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:810: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:828: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:1034: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:1080: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:1109: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:1131: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).
        bw = strlen(WRITESTR);
data/libphysfs-3.0.2/test/test_physfs.c:1157: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:1179: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).
        bw = strlen(WRITESTR);
data/libphysfs-3.0.2/test/test_physfs.c:1201:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(modstr, "Unknown\n", strsize);
data/libphysfs-3.0.2/test/test_physfs.c:1206:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(modstr, str, strsize);
data/libphysfs-3.0.2/test/test_physfs.c:1237: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).
        args[strlen(args) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:1419: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).
    cmd_copy = (char *) malloc(strlen(complete_cmd) + 1);
data/libphysfs-3.0.2/test/test_physfs.c:1498: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).
            if (buf[strlen(buf) - 1] == '\n')
data/libphysfs-3.0.2/test/test_physfs.c:1499: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).
                buf[strlen(buf) - 1] = '\0';
data/libphysfs-3.0.2/test/test_physfs.c:1559:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int ch = fgetc(stdin);

ANALYSIS SUMMARY:

Hits = 250
Lines analyzed = 28385 in approximately 0.85 seconds (33225 lines/second)
Physical Source Lines of Code (SLOC) = 18384
Hits@level = [0] 215 [1] 117 [2]  95 [3]   7 [4]  30 [5]   1
Hits@level+ = [0+] 465 [1+] 250 [2+] 133 [3+]  38 [4+]  31 [5+]   1
Hits/KSLOC@level+ = [0+] 25.2937 [1+] 13.5988 [2+] 7.23455 [3+] 2.06701 [4+] 1.68625 [5+] 0.0543951
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.