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/nulib2-3.1.0/nufxlib/Archive.c Examining data/nulib2-3.1.0/nufxlib/ArchiveIO.c Examining data/nulib2-3.1.0/nufxlib/Bzip2.c Examining data/nulib2-3.1.0/nufxlib/Charset.c Examining data/nulib2-3.1.0/nufxlib/Compress.c Examining data/nulib2-3.1.0/nufxlib/Crc16.c Examining data/nulib2-3.1.0/nufxlib/Debug.c Examining data/nulib2-3.1.0/nufxlib/Deferred.c Examining data/nulib2-3.1.0/nufxlib/Deflate.c Examining data/nulib2-3.1.0/nufxlib/Entry.c Examining data/nulib2-3.1.0/nufxlib/Expand.c Examining data/nulib2-3.1.0/nufxlib/FileIO.c Examining data/nulib2-3.1.0/nufxlib/Funnel.c Examining data/nulib2-3.1.0/nufxlib/Lzc.c Examining data/nulib2-3.1.0/nufxlib/Lzw.c Examining data/nulib2-3.1.0/nufxlib/MiscStuff.c Examining data/nulib2-3.1.0/nufxlib/MiscStuff.h Examining data/nulib2-3.1.0/nufxlib/MiscUtils.c Examining data/nulib2-3.1.0/nufxlib/NufxLib.h Examining data/nulib2-3.1.0/nufxlib/NufxLibPriv.h Examining data/nulib2-3.1.0/nufxlib/Record.c Examining data/nulib2-3.1.0/nufxlib/SourceSink.c Examining data/nulib2-3.1.0/nufxlib/Squeeze.c Examining data/nulib2-3.1.0/nufxlib/SysDefs.h Examining data/nulib2-3.1.0/nufxlib/Thread.c Examining data/nulib2-3.1.0/nufxlib/Value.c Examining data/nulib2-3.1.0/nufxlib/Version.c Examining data/nulib2-3.1.0/nufxlib/samples/Common.h Examining data/nulib2-3.1.0/nufxlib/samples/Exerciser.c Examining data/nulib2-3.1.0/nufxlib/samples/ImgConv.c Examining data/nulib2-3.1.0/nufxlib/samples/Launder.c Examining data/nulib2-3.1.0/nufxlib/samples/TestExtract.c Examining data/nulib2-3.1.0/nufxlib/samples/TestNames.c Examining data/nulib2-3.1.0/nufxlib/samples/TestSimple.c Examining data/nulib2-3.1.0/nufxlib/samples/TestTwirl.c Examining data/nulib2-3.1.0/nufxlib/samples/TestBasic.c Examining data/nulib2-3.1.0/nulib2/Add.c Examining data/nulib2-3.1.0/nulib2/ArcUtils.c Examining data/nulib2-3.1.0/nulib2/Binary2.c Examining data/nulib2-3.1.0/nulib2/Delete.c Examining data/nulib2-3.1.0/nulib2/Extract.c Examining data/nulib2-3.1.0/nulib2/Filename.c Examining data/nulib2-3.1.0/nulib2/List.c Examining data/nulib2-3.1.0/nulib2/Main.c Examining data/nulib2-3.1.0/nulib2/MiscStuff.c Examining data/nulib2-3.1.0/nulib2/MiscStuff.h Examining data/nulib2-3.1.0/nulib2/MiscUtils.c Examining data/nulib2-3.1.0/nulib2/NuLib2.h Examining data/nulib2-3.1.0/nulib2/State.c Examining data/nulib2-3.1.0/nulib2/State.h Examining data/nulib2-3.1.0/nulib2/SysDefs.h Examining data/nulib2-3.1.0/nulib2/SysUtils.c FINAL RESULTS: data/nulib2-3.1.0/nufxlib/FileIO.c:618:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(pathnameUNI, (S_IRUSR | S_IRGRP | S_IROTH) & ~mask) < 0) { data/nulib2-3.1.0/nufxlib/FileIO.c:670:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(pathnameUNI, S_IWUSR | pFileInfo->unixMode) < 0) { data/nulib2-3.1.0/nufxlib/Archive.c:866:18: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). result = mktemp(fileNameUNI); data/nulib2-3.1.0/nufxlib/Archive.c:898: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(fileNameUNI, F_OK) == 0) { data/nulib2-3.1.0/nufxlib/Archive.c:937:22: [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. archiveExists = (access(archivePathnameUNI, F_OK) == 0); data/nulib2-3.1.0/nufxlib/Debug.c:94:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cp, "%s, ", gDayNames[pDateTime->weekDay]); data/nulib2-3.1.0/nufxlib/Debug.c:100:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cp, "%02d-%s-%04d %02d:%02d:%02d", data/nulib2-3.1.0/nufxlib/MiscStuff.h:81:33: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DBUG(args) printf args data/nulib2-3.1.0/nufxlib/MiscUtils.c:226:13: [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. count = vsnprintf(buf, sizeof(buf)-kNuExtraGoodies, format, args); data/nulib2-3.1.0/nufxlib/MiscUtils.c:229:17: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. count = vsprintf(buf, format, args); data/nulib2-3.1.0/nufxlib/MiscUtils.c:231:9: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buf, format, args); data/nulib2-3.1.0/nufxlib/MiscUtils.c:265:22: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. cc = sprintf(buf+count, "%s", msg); data/nulib2-3.1.0/nufxlib/MiscUtils.c:272:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf+count, "%s", msg); data/nulib2-3.1.0/nufxlib/NufxLib.h:554: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. uint32_t access; data/nulib2-3.1.0/nufxlib/NufxLib.h:579: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. uint32_t access; data/nulib2-3.1.0/nufxlib/NufxLibPriv.h:689:32: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format(printf, 7, 8))) data/nulib2-3.1.0/nufxlib/Record.c:2302:43: [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. pNewRecord->recAccess = pFileDetails->access; data/nulib2-3.1.0/nufxlib/Record.c:2715:39: [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. pRecord->recAccess = pRecordAttr->access; data/nulib2-3.1.0/nufxlib/SysDefs.h:71:11: [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 _snprintf data/nulib2-3.1.0/nufxlib/SysDefs.h:71:20: [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 _snprintf data/nulib2-3.1.0/nufxlib/SysDefs.h:72: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. # define vsnprintf _vsnprintf data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:534: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(dstName, F_OK) == 0) { data/nulib2-3.1.0/nufxlib/samples/TestBasic.c:114: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(fileName, F_OK) == 0) { data/nulib2-3.1.0/nufxlib/samples/TestBasic.c:176: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(kTestArchive, F_OK) == 0) { data/nulib2-3.1.0/nufxlib/samples/TestNames.c:122: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(fileName, F_OK) == 0) { data/nulib2-3.1.0/nufxlib/samples/TestNames.c:404: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(entryNameUNI, F_OK) != 0) { data/nulib2-3.1.0/nufxlib/samples/TestNames.c:478: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(kTestTempFile, F_OK) != 0) { data/nulib2-3.1.0/nufxlib/samples/TestNames.c:496: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(kTestArchive, F_OK) != 0) { data/nulib2-3.1.0/nulib2/ArcUtils.c:61: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(resultBufUNI, renameToStrUNI); data/nulib2-3.1.0/nulib2/ArcUtils.c:408: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(nameBuf, pProgress->pathnameUNI); data/nulib2-3.1.0/nulib2/Binary2.c:126: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. uint16_t access; data/nulib2-3.1.0/nulib2/Binary2.c:1115:17: [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. pEntry->access, pEntry->osType, pEntry->nativeFileType); data/nulib2-3.1.0/nulib2/Filename.c:225: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(cp, pExt); data/nulib2-3.1.0/nulib2/Filename.c:234: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(pathBuf, extBuf); data/nulib2-3.1.0/nulib2/Filename.c:315:17: [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(pathBuf, kResourceStr); data/nulib2-3.1.0/nulib2/List.c:90:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%02d-%s-%02d %02d:%02d", data/nulib2-3.1.0/nulib2/MiscStuff.h:81:33: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DBUG(args) printf args data/nulib2-3.1.0/nulib2/MiscUtils.c:30:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, args); data/nulib2-3.1.0/nulib2/NuLib2.h:86:32: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format(printf, 2, 3))) data/nulib2-3.1.0/nulib2/SysDefs.h:68:11: [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 _snprintf data/nulib2-3.1.0/nulib2/SysDefs.h:68:20: [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 _snprintf data/nulib2-3.1.0/nulib2/SysDefs.h:69: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. # define vsnprintf _vsnprintf data/nulib2-3.1.0/nulib2/SysUtils.c:301: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(newName, archivePathname); data/nulib2-3.1.0/nulib2/SysUtils.c:387: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(pathname, R_OK) < 0) data/nulib2-3.1.0/nulib2/SysUtils.c:631: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(livePathStr, pathnameMOR); data/nulib2-3.1.0/nulib2/SysUtils.c:931: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(nbuf, dirName); data/nulib2-3.1.0/nulib2/SysUtils.c:934: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(nbuf+len, entry->d_name); data/nulib2-3.1.0/nulib2/SysUtils.c:1041: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(tmpStr, name); data/nulib2-3.1.0/nulib2/SysUtils.c:1051: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(cp, kWildMatchAll); data/nulib2-3.1.0/nulib2/SysUtils.c:1057: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(dir->d_name, fnd.cFileName); data/nulib2-3.1.0/nulib2/SysUtils.c:1085: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(dir->d_name, fnd.cFileName); data/nulib2-3.1.0/nulib2/SysUtils.c:1160: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(nbuf, dirName); data/nulib2-3.1.0/nulib2/SysUtils.c:1163: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(nbuf+len, entry->d_name); data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:1355:26: [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* debugSet = getenv("MALLOC_CHECK_"); data/nulib2-3.1.0/nufxlib/Archive.c:711: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(pHeader->mhNufileID, kNuMasterID, kNufileIDLen); data/nulib2-3.1.0/nufxlib/Archive.c:778: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(archivePathnameUNI, kNuFileOpenReadOnly); data/nulib2-3.1.0/nufxlib/Archive.c:843:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(fileNameUNI); data/nulib2-3.1.0/nufxlib/Archive.c:884:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fileNameUNI, O_RDWR|O_CREAT|O_EXCL|O_BINARY, 0600); data/nulib2-3.1.0/nufxlib/Archive.c:903:12: [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). *pFp = fopen(fileNameUNI, kNuFileOpenReadWriteCreat); data/nulib2-3.1.0/nufxlib/Archive.c:949: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(archivePathnameUNI, kNuFileOpenReadWrite); data/nulib2-3.1.0/nufxlib/Archive.c:958: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(archivePathnameUNI, kNuFileOpenReadWriteCreat); data/nulib2-3.1.0/nufxlib/Charset.c:321: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(bufUNI, stringMOR, copyLen); data/nulib2-3.1.0/nufxlib/Charset.c:477: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(bufMOR, stringUNI, copyLen); data/nulib2-3.1.0/nufxlib/Compress.c:380: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(*ppSavedCopy, pArchive->compBuf, getsize); data/nulib2-3.1.0/nufxlib/Debug.c:76: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(buffer, " <invalid> "); data/nulib2-3.1.0/nufxlib/Debug.c:85: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(buffer, " [No Date] "); data/nulib2-3.1.0/nufxlib/Debug.c:96: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(cp, "??%d, ", pDateTime->weekDay); data/nulib2-3.1.0/nufxlib/Debug.c:106: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(buffer + strlen(buffer), " [s%d m%d h%d Y%d D%d M%d x%d w%d]", data/nulib2-3.1.0/nufxlib/Debug.c:182: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 dateBuf[kNuDateOutputLen]; data/nulib2-3.1.0/nufxlib/Debug.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 dateBuf1[kNuDateOutputLen]; data/nulib2-3.1.0/nufxlib/Deferred.c:1925:27: [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). pArchive->tmpFp = fopen(pArchive->tmpPathnameUNI, data/nulib2-3.1.0/nufxlib/Deferred.c:1944:31: [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). pArchive->tmpFp = fopen(pArchive->tmpPathnameUNI, data/nulib2-3.1.0/nufxlib/Deferred.c:1952:31: [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). pArchive->tmpFp = fopen(pArchive->tmpPathnameUNI, data/nulib2-3.1.0/nufxlib/Deferred.c:2424:31: [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). pArchive->archiveFp = fopen(pArchive->archivePathnameUNI, data/nulib2-3.1.0/nufxlib/Entry.c:697: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(*ppThreads, pNuRecord->pThreads, data/nulib2-3.1.0/nufxlib/FileIO.c:344: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(creatorBuf, "pdos", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:346: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(fileTypeBuf, "BINA", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:348: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(fileTypeBuf, "TEXT", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:350: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(fileTypeBuf, "PSYS", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:352: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(fileTypeBuf, "PS16", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:354: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(fileTypeBuf, "MIDI", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:356: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(fileTypeBuf, "AIFF", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:358: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(fileTypeBuf, "AIFC", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:360: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(creatorBuf, "dCpy", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:361: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(fileTypeBuf, "dImg", 4); data/nulib2-3.1.0/nufxlib/FileIO.c:847:16: [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). *pFp = fopen(rsrcPath, kNuFileOpenWriteTrunc); data/nulib2-3.1.0/nufxlib/FileIO.c:850:16: [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). *pFp = fopen(pathnameUNI, kNuFileOpenWriteTrunc); data/nulib2-3.1.0/nufxlib/FileIO.c:853:12: [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). *pFp = fopen(pathnameUNI, kNuFileOpenWriteTrunc); data/nulib2-3.1.0/nufxlib/FileIO.c:1157:12: [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). *pFp = fopen(pathnameUNI, kNuFileOpenReadOnly); data/nulib2-3.1.0/nufxlib/Funnel.c:356: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. static const char gNuIsBinary[256] = { data/nulib2-3.1.0/nufxlib/Funnel.c:666: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(pFunnel->buffer + pFunnel->bufCount, buffer, count); data/nulib2-3.1.0/nufxlib/Funnel.c:690: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(pFunnel->buffer, buffer, count); data/nulib2-3.1.0/nufxlib/MiscUtils.c:38: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 defaultMsg[32]; data/nulib2-3.1.0/nufxlib/MiscUtils.c:188: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(defaultMsg, "(error=%d)", err); data/nulib2-3.1.0/nufxlib/MiscUtils.c:214: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[kNuHeftyBufSize]; data/nulib2-3.1.0/nufxlib/MiscUtils.c:245: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(buf+count, ": "); data/nulib2-3.1.0/nufxlib/MiscUtils.c:263:22: [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. cc = sprintf(buf+count, "(unknown err=%d)", err); data/nulib2-3.1.0/nufxlib/MiscUtils.c:270: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(buf+count, "(unknown err=%d)", err); data/nulib2-3.1.0/nufxlib/Record.c:117: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(*ppDst, pSrc, len); data/nulib2-3.1.0/nufxlib/Record.c:141: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(pDst, pSrc, sizeof(*pSrc)); data/nulib2-3.1.0/nufxlib/Record.c:2295: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(pNewRecord->recNufxID, kNufxID, kNufxIDLen); data/nulib2-3.1.0/nufxlib/SourceSink.c:67: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(pNewDataSource, pDataSource, sizeof(*pNewDataSource)); data/nulib2-3.1.0/nufxlib/SourceSink.c:451: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(buf, data/nulib2-3.1.0/nufxlib/SourceSink.c:810: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(pDataSink->toBuffer.buffer, buf, len); data/nulib2-3.1.0/nufxlib/Thread.c:144: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(pDstThread, pSrcThread, sizeof(*pDstThread)); data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:238: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[8]; data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:259: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[8]; data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:822:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(argv[1], kNuFileOpenReadOnly)) == NULL) { data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:1255: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 lineBuf[128]; data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:51: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[4]; data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:52: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 creator[4]; data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:347: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(srcName, kNuFileOpenReadOnly); data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:540: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(dstName, kNuFileOpenWriteTrunc); data/nulib2-3.1.0/nufxlib/samples/TestBasic.c:46: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 tmpBuf[32]; data/nulib2-3.1.0/nufxlib/samples/TestBasic.c:146: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(kTestArchive, kNuFileOpenWriteTrunc); data/nulib2-3.1.0/nufxlib/samples/TestExtract.c:331:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen("out.fp", kNuFileOpenWriteTrunc)) == NULL) data/nulib2-3.1.0/nufxlib/samples/TestExtract.c:375: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). if ((fp = fopen("out.buf", kNuFileOpenWriteTrunc)) != NULL) { data/nulib2-3.1.0/nufxlib/samples/TestExtract.c:456:16: [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). infp = fopen(argv[1], kNuFileOpenReadOnly); data/nulib2-3.1.0/nufxlib/samples/TestNames.c:68: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 tmpBuf[32]; data/nulib2-3.1.0/nufxlib/samples/TestNames.c:223: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 morBuf[512]; data/nulib2-3.1.0/nufxlib/samples/TestSimple.c:101:16: [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). infp = fopen(argv[1], kNuFileOpenReadOnly); data/nulib2-3.1.0/nufxlib/samples/TestTwirl.c:634: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[24576]; data/nulib2-3.1.0/nufxlib/samples/TestTwirl.c:638: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). outfp = fopen(outFileName, kNuFileOpenWriteTrunc); data/nulib2-3.1.0/nufxlib/samples/TestTwirl.c:685:17: [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). srcfp = fopen(argv[1], kNuFileOpenReadOnly); data/nulib2-3.1.0/nulib2/ArcUtils.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 tmpBuf[32]; data/nulib2-3.1.0/nulib2/ArcUtils.c:123: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[kMaxInputLen]; data/nulib2-3.1.0/nulib2/ArcUtils.c:303: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 nameBuf[kMaxDisplayLen+1]; data/nulib2-3.1.0/nulib2/Binary2.c:51:12: [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). *pFp = fopen(filename, kFileOpenReadOnly); data/nulib2-3.1.0/nulib2/Binary2.c:139: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[kBNYMaxFileName+1]; /* ASCII only */ data/nulib2-3.1.0/nulib2/Binary2.c:140: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 nativeName[kBNYMaxNativeName+1]; data/nulib2-3.1.0/nulib2/Binary2.c:351: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(pEntry->fileName, &raw[24], len); data/nulib2-3.1.0/nulib2/Binary2.c:362: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(pEntry->nativeName, &raw[40], len); data/nulib2-3.1.0/nulib2/Binary2.c:638: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(usqState.dataPtr, pEntry->blockBuf, kBNYBlockSize); data/nulib2-3.1.0/nulib2/Binary2.c:1029: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 date1[kDateOutputLen]; data/nulib2-3.1.0/nulib2/Binary2.c:1289:17: [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). outfp = fopen(newName, "w"); data/nulib2-3.1.0/nulib2/Filename.c:31: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. static const char gFileTypeNames[256][4] = { data/nulib2-3.1.0/nulib2/Filename.c:123: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 extBuf[kMaxPathGrowth +1]; data/nulib2-3.1.0/nulib2/Filename.c:146: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(cp, "%c%02x%04x", kPreserveIndic, pRecord->recFileType, data/nulib2-3.1.0/nulib2/Filename.c:150: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(cp, "%c%08x%08x", kPreserveIndic, pRecord->recFileType, data/nulib2-3.1.0/nulib2/Filename.c:363: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 uext3[4]; data/nulib2-3.1.0/nulib2/Filename.c:438: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 numBuf[9]; data/nulib2-3.1.0/nulib2/Filename.c:464: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(numBuf, pPreserve+1, 2); data/nulib2-3.1.0/nulib2/Filename.c:474: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(numBuf, pPreserve+1, 8); data/nulib2-3.1.0/nulib2/List.c:77: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(buffer, " <invalid> "); data/nulib2-3.1.0/nulib2/List.c:86: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(buffer, " [No Date] "); data/nulib2-3.1.0/nulib2/List.c:211: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 date1[kDateOutputLen]; data/nulib2-3.1.0/nulib2/List.c:212: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 tmpbuf[16]; data/nulib2-3.1.0/nulib2/List.c:239: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 kSpaces[27+1] = " "; data/nulib2-3.1.0/nulib2/List.c:260: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(tmpbuf, "%dk", totalLen / 1024); data/nulib2-3.1.0/nulib2/List.c:287: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(tmpbuf, "%02d%%", ComputePercent(totalCompLen, totalLen)); data/nulib2-3.1.0/nulib2/List.c:349: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 date1[kDateOutputLen]; data/nulib2-3.1.0/nulib2/List.c:350: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 date2[kDateOutputLen]; data/nulib2-3.1.0/nulib2/SysUtils.c:310: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(namePtr, "nulibtmpXXXXXX"); data/nulib2-3.1.0/nulib2/SysUtils.c:558: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(creatorBuf, "pdos", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:560: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(fileTypeBuf, "BINA", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:562: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(fileTypeBuf, "TEXT", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:564: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(fileTypeBuf, "PSYS", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:566: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(fileTypeBuf, "PS16", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:568: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(fileTypeBuf, "MIDI", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:570: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(fileTypeBuf, "AIFF", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:572: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(fileTypeBuf, "AIFC", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:574: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(creatorBuf, "dCpy", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:575: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(fileTypeBuf, "dImg", 4); data/nulib2-3.1.0/nulib2/SysUtils.c:620: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 slashDotDotSlash[5] = "_.._"; data/nulib2-3.1.0/nulib2/SysUtils.c:894: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 nbuf[MAX_PATH_LEN]; /* malloc might be better; this soaks stack */ data/nulib2-3.1.0/nulib2/SysUtils.c:1019: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 d_name[MAX_PATH_LEN]; data/nulib2-3.1.0/nulib2/SysUtils.c:1123: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 nbuf[MAX_PATH_LEN]; /* malloc might be better; this soaks stack */ data/nulib2-3.1.0/nufxlib/Archive.c:770: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). if (archivePathnameUNI == NULL || !strlen(archivePathnameUNI) || data/nulib2-3.1.0/nufxlib/Archive.c:835: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(fileNameUNI); data/nulib2-3.1.0/nufxlib/Archive.c:930: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). if (archivePathnameUNI == NULL || !strlen(archivePathnameUNI) || data/nulib2-3.1.0/nufxlib/Archive.c:931: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). tmpPathnameUNI == NULL || !strlen(tmpPathnameUNI) || data/nulib2-3.1.0/nufxlib/ArchiveIO.c:37:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:79:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic1 = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:81:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic2 = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:132:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic1 = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:134:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic2 = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:136:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic3 = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:138:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic4 = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:200:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:203:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:206:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:209:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:212:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:215:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:218:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:221:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:296:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ic = getc(fp); data/nulib2-3.1.0/nufxlib/ArchiveIO.c:372:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) getc(fp); data/nulib2-3.1.0/nufxlib/Charset.c:318: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). size_t morLen = strlen(stringMOR) + 1; data/nulib2-3.1.0/nufxlib/Charset.c:474: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). size_t uniLen = strlen(stringUNI) + 1; data/nulib2-3.1.0/nufxlib/Debug.c:97: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). cp += strlen(cp); data/nulib2-3.1.0/nufxlib/Debug.c:106: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). sprintf(buffer + strlen(buffer), " [s%d m%d h%d Y%d D%d M%d x%d w%d]", data/nulib2-3.1.0/nufxlib/Deferred.c:1326: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). len = strlen(pRecord->filenameMOR); data/nulib2-3.1.0/nufxlib/Deferred.c:1331: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). strlen(pRecord->filenameMOR), NULL, &pTmpDataSource); data/nulib2-3.1.0/nufxlib/FileIO.c:288: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). strlen(pathnameUNI) * sizeof(UNICHAR) + sizeof(kMacRsrcPath); data/nulib2-3.1.0/nufxlib/FileIO.c:614:16: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mask = umask(0); data/nulib2-3.1.0/nufxlib/FileIO.c:615:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mask); data/nulib2-3.1.0/nufxlib/Lzc.c:918:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((getc(pLzcState->infp)!=(gNu_magic_header[0] & 0xFF)) data/nulib2-3.1.0/nufxlib/Lzc.c:919:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). || (getc(pLzcState->infp)!=(gNu_magic_header[1] & 0xFF))) data/nulib2-3.1.0/nufxlib/Lzc.c:925:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flags = getc(pLzcState->infp); /* set -b from file */ data/nulib2-3.1.0/nufxlib/Lzw.c:1349:29: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lzwState->fileCrc = getc(infp); data/nulib2-3.1.0/nufxlib/Lzw.c:1350:30: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lzwState->fileCrc |= getc(infp) << 8; data/nulib2-3.1.0/nufxlib/Lzw.c:1353:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lzwState->diskVol = getc(infp); /* disk volume #; not really used */ data/nulib2-3.1.0/nufxlib/Lzw.c:1354:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lzwState->rleEscape = getc(infp); /* RLE escape char for this thread */ data/nulib2-3.1.0/nufxlib/MiscUtils.c:232: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). count = strlen(buf); data/nulib2-3.1.0/nufxlib/MiscUtils.c:273: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). count += strlen(buf + count); data/nulib2-3.1.0/nufxlib/Record.c:149: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). pSrc->threadFilenameMOR == NULL ? 0 : strlen(pSrc->threadFilenameMOR) +1); data/nulib2-3.1.0/nufxlib/Record.c:151:44: [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). pSrc->newFilenameMOR == NULL ? 0 : strlen(pSrc->newFilenameMOR) +1); data/nulib2-3.1.0/nufxlib/Record.c:2603: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). requiredCapacity = strlen(pathnameMOR); data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:225: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). if (buffer[strlen(buffer)-1] == '\n') data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:226: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). buffer[strlen(buffer)-1] = '\0'; data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:491: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). ourLen = strlen(lineBuf); data/nulib2-3.1.0/nufxlib/samples/Exerciser.c:1006: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). ourLen = strlen(lineBuf); data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:72:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pBuf = getc(fp); data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:73:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pBuf += (uint16_t) getc(fp) << 8; data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:90:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pBuf = getc(fp); data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:91:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pBuf += (uint32_t) getc(fp) << 8; data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:92:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pBuf += (uint32_t) getc(fp) << 16; data/nulib2-3.1.0/nufxlib/samples/ImgConv.c:93:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pBuf += (uint32_t) getc(fp) << 24; data/nulib2-3.1.0/nufxlib/samples/TestBasic.c:261:44: [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). 0, (const uint8_t*)testMsg, 0, strlen(testMsg), NULL, &pDataSource); data/nulib2-3.1.0/nufxlib/samples/TestNames.c:182:27: [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). printf("(%d) ", (int) strlen(str)); data/nulib2-3.1.0/nufxlib/samples/TestNames.c:196:27: [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). printf("(%d) ", (int) strlen(str)); data/nulib2-3.1.0/nufxlib/samples/TestNames.c:237: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(uniBuf) + 1 != outLen) { data/nulib2-3.1.0/nufxlib/samples/TestNames.c:252: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(morBuf) + 1 != outLen) { data/nulib2-3.1.0/nufxlib/samples/TestNames.c:311:45: [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). 0, (const uint8_t*)kTestMsg, 0, strlen(kTestMsg), NULL, data/nulib2-3.1.0/nulib2/ArcUtils.c:58: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). NState_SetTempPathnameLen(pState, strlen(renameToStrUNI) +1); data/nulib2-3.1.0/nulib2/ArcUtils.c:137: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(buf); data/nulib2-3.1.0/nulib2/ArcUtils.c:174: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(buf); data/nulib2-3.1.0/nulib2/ArcUtils.c:200:50: [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 (strncmp(spec, pRecord->filename, strlen(spec)) == 0); data/nulib2-3.1.0/nulib2/ArcUtils.c:205:57: [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 (strncasecmp(spec, pRecord->filenameMOR, strlen(spec)) == 0); data/nulib2-3.1.0/nulib2/ArcUtils.c:406:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(pProgress->pathnameUNI); data/nulib2-3.1.0/nulib2/ArcUtils.c:411:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(nameBuf+2, data/nulib2-3.1.0/nulib2/Binary2.c:76: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). if (strncmp(*pSpec, filename, strlen(*pSpec)) == 0) data/nulib2-3.1.0/nulib2/Binary2.c:84: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 (strncasecmp(*pSpec, filename, strlen(*pSpec)) == 0) data/nulib2-3.1.0/nulib2/Binary2.c:277:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) getc(pBny->fp); data/nulib2-3.1.0/nulib2/Binary2.c:1055: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(pEntry->fileName); data/nulib2-3.1.0/nulib2/Binary2.c:1252:13: [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(pEntry->fileName) > 3) { data/nulib2-3.1.0/nulib2/Binary2.c:1253: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). ext = pEntry->fileName + strlen(pEntry->fileName) -3; data/nulib2-3.1.0/nulib2/Filename.c:187: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). if (strlen(pExt) >= kMaxExtLen) { data/nulib2-3.1.0/nulib2/Filename.c:226:19: [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). cp += strlen(pExt); data/nulib2-3.1.0/nulib2/Filename.c:271: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). newBufLen = strlen(pPathProposal->pathnameUNI)*3 + kMaxPathGrowth +1; data/nulib2-3.1.0/nulib2/Filename.c:301:53: [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). err = NormalizeFileName(pState, startp, strlen(startp), data/nulib2-3.1.0/nulib2/Filename.c:337: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). memmove(pathBuf, lastFssep+1, strlen(lastFssep+1)+1); data/nulib2-3.1.0/nulib2/Filename.c:366: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). extLen = strlen(ext); data/nulib2-3.1.0/nulib2/Filename.c:601:13: [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(pathname) < 2) { data/nulib2-3.1.0/nulib2/Filename.c:609: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). tmpStr[strlen(pathname)-1] = '\0'; data/nulib2-3.1.0/nulib2/List.c:241: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(pRecord->filenameMOR); data/nulib2-3.1.0/nulib2/Main.c:277: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). for (j = strlen(pvc->modifiers) -1; j >= 0; j--) { data/nulib2-3.1.0/nulib2/SysUtils.c:22: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). # define DIR_NAME_LEN(dirent) ((int)strlen((dirent)->d_name)) data/nulib2-3.1.0/nulib2/SysUtils.c:284: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(archivePathname); data/nulib2-3.1.0/nulib2/SysUtils.c:628: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). NState_SetTempPathnameLen(pState, strlen(pathnameMOR) +1); data/nulib2-3.1.0/nulib2/SysUtils.c:732:49: [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(livePathStr, livePathStr+1, strlen(livePathStr)); data/nulib2-3.1.0/nulib2/SysUtils.c:743:49: [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(livePathStr, livePathStr+2, strlen(livePathStr)-1); data/nulib2-3.1.0/nulib2/SysUtils.c:779: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(livePathStr, lastFssep+1, strlen(lastFssep+1)+1); data/nulib2-3.1.0/nulib2/SysUtils.c:851: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). strlen(comment), FreeCallback, &pDataSource); data/nulib2-3.1.0/nulib2/SysUtils.c:922: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). len = strlen(dirName); data/nulib2-3.1.0/nulib2/SysUtils.c:1037: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). tmpStr = Malloc(strlen(name) + (2 + sizeof(kWildMatchAll))); data/nulib2-3.1.0/nulib2/SysUtils.c:1042:19: [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). cp = tmpStr + strlen(tmpStr); data/nulib2-3.1.0/nulib2/SysUtils.c:1106: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). #define DIR_NAME_LEN(dirent) ((int)strlen((dirent)->d_name)) data/nulib2-3.1.0/nulib2/SysUtils.c:1151: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). len = strlen(dirName); ANALYSIS SUMMARY: Hits = 260 Lines analyzed = 34390 in approximately 0.87 seconds (39742 lines/second) Physical Source Lines of Code (SLOC) = 21753 Hits@level = [0] 586 [1] 93 [2] 113 [3] 1 [4] 51 [5] 2 Hits@level+ = [0+] 846 [1+] 260 [2+] 167 [3+] 54 [4+] 53 [5+] 2 Hits/KSLOC@level+ = [0+] 38.8912 [1+] 11.9524 [2+] 7.6771 [3+] 2.48242 [4+] 2.43645 [5+] 0.0919413 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.