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/guymager-0.8.12/hash.cpp Examining data/guymager-0.8.12/dlgdirsel.h Examining data/guymager-0.8.12/qtutil.h Examining data/guymager-0.8.12/ewf.h Examining data/guymager-0.8.12/qtutil.cpp Examining data/guymager-0.8.12/threadcompress.h Examining data/guymager-0.8.12/fifo.cpp Examining data/guymager-0.8.12/macros_for_lint.h Examining data/guymager-0.8.12/sha1.h Examining data/guymager-0.8.12/threadhash.cpp Examining data/guymager-0.8.12/mainwindow.cpp Examining data/guymager-0.8.12/dlgacquire.h Examining data/guymager-0.8.12/threadcompress.cpp Examining data/guymager-0.8.12/error.h Examining data/guymager-0.8.12/devicelistmodel.h Examining data/guymager-0.8.12/util.cpp Examining data/guymager-0.8.12/runstats.h Examining data/guymager-0.8.12/threadscan.cpp Examining data/guymager-0.8.12/util.h Examining data/guymager-0.8.12/aewf.cpp Examining data/guymager-0.8.12/sha256.cpp Examining data/guymager-0.8.12/dlgacquire.cpp Examining data/guymager-0.8.12/dlgwait.cpp Examining data/guymager-0.8.12/dlgacquire_private.h Examining data/guymager-0.8.12/mainwindow.h Examining data/guymager-0.8.12/sha256.h Examining data/guymager-0.8.12/common.h Examining data/guymager-0.8.12/info.cpp Examining data/guymager-0.8.12/thread.h Examining data/guymager-0.8.12/threadwrite.h Examining data/guymager-0.8.12/device.h Examining data/guymager-0.8.12/dlgdirsel_private.h Examining data/guymager-0.8.12/modules.h Examining data/guymager-0.8.12/dlgabort.h Examining data/guymager-0.8.12/main.h Examining data/guymager-0.8.12/main_private.h Examining data/guymager-0.8.12/aaff.cpp Examining data/guymager-0.8.12/dlgautoexit.cpp Examining data/guymager-0.8.12/info.h Examining data/guymager-0.8.12/threadhash.h Examining data/guymager-0.8.12/threadwrite.cpp Examining data/guymager-0.8.12/table.h Examining data/guymager-0.8.12/md5.h Examining data/guymager-0.8.12/threadscan.h Examining data/guymager-0.8.12/file.h Examining data/guymager-0.8.12/compileinfo.h Examining data/guymager-0.8.12/fifo.h Examining data/guymager-0.8.12/itemdelegate.h Examining data/guymager-0.8.12/thread.cpp Examining data/guymager-0.8.12/dlgmessage.h Examining data/guymager-0.8.12/dlgdirsel.cpp Examining data/guymager-0.8.12/config.h Examining data/guymager-0.8.12/runstats.cpp Examining data/guymager-0.8.12/dlgmessage.cpp Examining data/guymager-0.8.12/threadread.cpp Examining data/guymager-0.8.12/dlgautoexit.h Examining data/guymager-0.8.12/aaff.h Examining data/guymager-0.8.12/sha1.cpp Examining data/guymager-0.8.12/file.cpp Examining data/guymager-0.8.12/media.cpp Examining data/guymager-0.8.12/media.h Examining data/guymager-0.8.12/hash.h Examining data/guymager-0.8.12/config.cpp Examining data/guymager-0.8.12/device.cpp Examining data/guymager-0.8.12/infofield.cpp Examining data/guymager-0.8.12/threadread.h Examining data/guymager-0.8.12/itemdelegate.cpp Examining data/guymager-0.8.12/table.cpp Examining data/guymager-0.8.12/dlgabort.cpp Examining data/guymager-0.8.12/error.cpp Examining data/guymager-0.8.12/main.cpp Examining data/guymager-0.8.12/aewf.h Examining data/guymager-0.8.12/dlgwait.h Examining data/guymager-0.8.12/md5.cpp Examining data/guymager-0.8.12/infofield.h FINAL RESULTS: data/guymager-0.8.12/aaff.cpp:277:4: [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 (&pAaff->SegmentHeader.Magic[0], AFF_SEGMENT_HEADER_MAGIC); data/guymager-0.8.12/aaff.cpp:278:4: [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 (&pAaff->SegmentFooter.Magic[0], AFF_SEGMENT_FOOTER_MAGIC); data/guymager-0.8.12/aaff.cpp:644:4: [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 ((char *)AaffBadSectorMarker, AFF_BADSECTOR_HEADER); data/guymager-0.8.12/aewf.cpp:498:4: [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 (Section.Name, pName); data/guymager-0.8.12/info.cpp:122:13: [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. Ret = vfprintf (pFile, pFormat, pArguments); data/guymager-0.8.12/info.h:54:76: [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. APIRET Write (const char *pFormat, ...) __attribute__ ((format (printf, 2, 3))); // Non-static class functions have implicit this argument, thus we start counting the parameters for __attribute__ at 2, not 1 (see GNU C-Lib Function-Atttributes.html) data/guymager-0.8.12/main.cpp:316:7: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf (pFormat, pArguments); data/guymager-0.8.12/main.cpp:748:7: [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 (MainLocal.pCommandLine, argv[i]); data/guymager-0.8.12/qtutil.cpp:189:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. Str.sprintf ("%0*.*f", Digits, FrcLen, 0.0); data/guymager-0.8.12/threadwrite.cpp:426:16: [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 (poImageFilenameArr[i], pAsciiFileName); data/guymager-0.8.12/aaff.cpp:189:32: [3] (random) random: 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. GID[i] = (unsigned char) random(); data/guymager-0.8.12/aaff.cpp:640:4: [3] (random) srandom: 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. srandom ((unsigned int) time (nullptr)); data/guymager-0.8.12/aaff.cpp:643:47: [3] (random) random: 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. AaffBadSectorMarker[i] = (unsigned char)random(); data/guymager-0.8.12/config.cpp:766:33: [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. LanguageSystem = QString (getenv ("LANGUAGE")); // is not what we want. So, let's read the LANGUAGE evironment variable ourselves. data/guymager-0.8.12/main.cpp:724:29: [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. pFilenameMallocTracing = getenv (MAIN_ENVVAR_MALLOC_TRACE); data/guymager-0.8.12/aaff.cpp:81:4: [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/guymager-0.8.12/aaff.cpp:92:4: [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/guymager-0.8.12/aaff.cpp:127: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. static unsigned char AaffBadSectorMarker[AAFF_BADSECTORMARKER_MAXLEN]; data/guymager-0.8.12/aaff.cpp:185: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. unsigned char GID[AFF_GID_LENGTH]; data/guymager-0.8.12/aaff.cpp:205:4: [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 (pBuffer, &AaffBadSectorMarker[0], Len); data/guymager-0.8.12/aaff.cpp:251:4: [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 Buff[512]; data/guymager-0.8.12/aaff.cpp:362:4: [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 SegmentName[64]; data/guymager-0.8.12/aaff.cpp:434:4: [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 Signature[AFF_HEADER_LEN+1]; data/guymager-0.8.12/aaff.cpp:483:4: [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 SegmentName[100]; data/guymager-0.8.12/aewf.cpp:103:4: [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[16]; data/guymager-0.8.12/aewf.cpp:222:10: [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 (FileHeaderCache.Signature, AEWF_SIGNATURE, sizeof (AEWF_SIGNATURE)); data/guymager-0.8.12/aewf.cpp:336:7: [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, pAewfZeroBlockCompressed, AewfZeroBlockCompressedLen); data/guymager-0.8.12/aewf.cpp:648:4: [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 (&pTableContents->OffsetArr[0], &pAewf->ChunkOffsetArr[0], OffsetArrSize); // pAewf->ChunkOffsetArr already is in little endian! data/guymager-0.8.12/config.cpp:686:4: [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 HostName[64]; data/guymager-0.8.12/config.h:143:4: [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 Language[CFG_MAX_LANGUAGE_LEN+1]; data/guymager-0.8.12/config.h:159:4: [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 UserFieldName [CFG_MAX_MISC_LEN+1]; data/guymager-0.8.12/config.h:160:4: [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 AdditionalStateInfoName[CFG_MAX_MISC_LEN+1]; data/guymager-0.8.12/config.h:171:4: [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 CommandGetSerialNumber[CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:173:4: [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 CommandGetAddStateInfo[CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:174:4: [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 CommandAcquisitionEnd [CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:176:4: [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 RunStatsTemplateActive[CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:177:4: [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 RunStatsTemplateEnded [CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:178:4: [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 RunStatsOutput [CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:192:4: [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 SpecialFilenameChars[CFG_MAX_MISC_LEN+1]; data/guymager-0.8.12/config.h:226:4: [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 Code [CFG_MAX_LANGUAGE_CODE_LEN+1]; data/guymager-0.8.12/config.h:227:4: [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 AsciiName [CFG_MAX_MENU_NAME_LEN +1]; data/guymager-0.8.12/config.h:233:4: [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 Family[CFG_MAX_FONT_FAMILY_LEN+1]; data/guymager-0.8.12/config.h:241:4: [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[CFG_MAX_FIELDNAME_LEN+1]; data/guymager-0.8.12/config.h:259:4: [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 Device [CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:264:4: [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 Command [CFG_MAX_PATH_LEN+1]; data/guymager-0.8.12/config.h:305:4: [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 FieldName [CFG_MAX_FIELDNAME_LEN+1]; data/guymager-0.8.12/config.h:308:4: [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 DefaultValue[CFG_MAX_MISC_LEN +1]; data/guymager-0.8.12/config.h:313:4: [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 TriggerFieldName[CFG_MAX_FIELDNAME_LEN+1]; data/guymager-0.8.12/config.h:314:4: [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 DestFieldName [CFG_MAX_FIELDNAME_LEN+1]; data/guymager-0.8.12/config.h:315:4: [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 Value [CFG_MAX_MISC_LEN +1]; data/guymager-0.8.12/device.cpp:735:4: [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 Buff[20]; data/guymager-0.8.12/dlgacquire.cpp:1218: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). pFile = fopen (QSTR_TO_PSZ(TestFileName), "w"); data/guymager-0.8.12/fifo.cpp:239:4: [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 (pBlockDst, pBlockSrc, AllocSize); data/guymager-0.8.12/fifo.h:81: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. unsigned char Buffer[0]; //lint !e1501 Has zero size data/guymager-0.8.12/hash.h:75: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. unsigned char Buff[HASH_MD5_DIGEST_LENGTH]; data/guymager-0.8.12/hash.h:80: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. unsigned char Buff[HASH_SHA1_DIGEST_LENGTH]; data/guymager-0.8.12/hash.h:85: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. unsigned char Buff[HASH_SHA256_DIGEST_LENGTH]; data/guymager-0.8.12/info.cpp:91: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). pFile = fopen (QSTR_TO_PSZ(FullFileName()), "w"); data/guymager-0.8.12/info.cpp:114: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). pFile = fopen (QSTR_TO_PSZ(FullFileName()), "a"); data/guymager-0.8.12/md5.cpp:47:23: [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 unsigned char MD5PadBuf[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, data/guymager-0.8.12/md5.cpp:75:4: [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 (cp, &v, sizeof v); data/guymager-0.8.12/md5.cpp:360:7: [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 (&((char *) pContext->buffer)[left_over], pBuffer, add); data/guymager-0.8.12/md5.cpp:368:10: [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 (pContext->buffer, data/guymager-0.8.12/md5.cpp:386:43: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. MD5ProcessBlock (pContext, memcpy (pContext->buffer, pBuffer, 64), 64); data/guymager-0.8.12/md5.cpp:405:7: [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 (&((char *) pContext->buffer)[left_over], pBuffer, Len); data/guymager-0.8.12/md5.cpp:411:10: [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 (pContext->buffer, &pContext->buffer[16], left_over); data/guymager-0.8.12/md5.cpp:431:4: [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 (&((char *) pContext->buffer)[bytes], MD5PadBuf, (size - 2) * 4 - bytes); data/guymager-0.8.12/md5.cpp:465:7: [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 output[65]; data/guymager-0.8.12/md5.cpp:467:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char Buf[65536]; data/guymager-0.8.12/md5.cpp:468:16: [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 Digest[16]; data/guymager-0.8.12/md5.cpp:495:22: [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( ! ( f = fopen( argv[1], "rb" ) ) ) data/guymager-0.8.12/media.cpp:386: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. unsigned char cdb[SG_ATA_16_LEN]; data/guymager-0.8.12/media.cpp:387: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. unsigned char sb[32], *desc; data/guymager-0.8.12/media.cpp:779:11: [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). File = open (pLinuxDevice, O_RDONLY); data/guymager-0.8.12/runstats.cpp:97: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). if (!File.open (QIODevice::ReadOnly | QIODevice::Text)) data/guymager-0.8.12/runstats.cpp:132: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). if (!File.open (QIODevice::WriteOnly)) data/guymager-0.8.12/sha1.cpp:50:23: [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 unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; // This array contains the bytes used to pad the buffer to data/guymager-0.8.12/sha1.cpp:211:4: [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 (cp, &v, sizeof v); data/guymager-0.8.12/sha1.cpp:226:4: [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 (&((char *) pContext->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes); data/guymager-0.8.12/sha1.cpp:247:7: [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 (&((char *) pContext->buffer)[left_over], buffer, add); data/guymager-0.8.12/sha1.cpp:256:10: [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 (pContext->buffer, data/guymager-0.8.12/sha1.cpp:272:36: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. sha1_process_block (memcpy (pContext->buffer, buffer, 64), 64, pContext); data/guymager-0.8.12/sha1.cpp:290:7: [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 (&((char *) pContext->buffer)[left_over], buffer, len); data/guymager-0.8.12/sha1.cpp:296:10: [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 (pContext->buffer, &pContext->buffer[16], left_over); data/guymager-0.8.12/sha256.cpp:505: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( (void *) (pContext->buffer + left), data/guymager-0.8.12/sha256.cpp:522: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( (void *) (pContext->buffer + left), data/guymager-0.8.12/sha256.cpp:581:23: [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 unsigned char SHA256PadBuf[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, data/guymager-0.8.12/sha256.cpp:603:4: [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 (cp, &v, sizeof v); data/guymager-0.8.12/sha256.cpp:776:4: [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 (&((char *) pContext->buffer)[bytes], SHA256PadBuf, (size - 2) * 4 - bytes); data/guymager-0.8.12/sha256.cpp:798:7: [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 (&((char *) pContext->buffer)[left_over], buffer, add); data/guymager-0.8.12/sha256.cpp:806:10: [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 (pContext->buffer, data/guymager-0.8.12/sha256.cpp:823:46: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. SHA256ProcessBlock (pContext, memcpy (pContext->buffer, buffer, 64), 64); data/guymager-0.8.12/sha256.cpp:842:7: [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 (&((char *) pContext->buffer)[left_over], buffer, len); data/guymager-0.8.12/sha256.cpp:848:10: [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 (pContext->buffer, &pContext->buffer[16], left_over); data/guymager-0.8.12/sha256.cpp:887:4: [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 output[65]; data/guymager-0.8.12/sha256.cpp:889: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. unsigned char buf[65536]; data/guymager-0.8.12/sha256.cpp:890: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. unsigned char sha256sum[32]; data/guymager-0.8.12/sha256.cpp:913: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( output + j * 2, "%02x", sha256sum[j] ); data/guymager-0.8.12/sha256.cpp:926: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). if (!(f = fopen( argv[1], "rb"))) data/guymager-0.8.12/threadscan.cpp:484:18: [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). pFile = fopen(pFullPath, "rb"); data/guymager-0.8.12/util.cpp:316:7: [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 (poMem, pStr, StrLen-1); data/guymager-0.8.12/aaff.cpp:143: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). unsigned int NameLen0 = (unsigned int) strlen(pName); data/guymager-0.8.12/aaff.cpp:161:96: [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). CHK (AaffWriteSegment (pAaff, pName, Argument, (const unsigned char *) pStr, (unsigned int) strlen (pStr))) data/guymager-0.8.12/aaff.cpp:511:71: [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). Found = (strncmp (&SegmentName[0], AFF_SEGNAME_PAGE, strlen(AFF_SEGNAME_PAGE)) == 0); // The segment name must start with "page" data/guymager-0.8.12/aaff.cpp:512: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). if (Found) Found = (strlen (&SegmentName[0]) > strlen(AFF_SEGNAME_PAGE)); // The string "page" must be followed by at least 1 digit data/guymager-0.8.12/aaff.cpp:512: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). if (Found) Found = (strlen (&SegmentName[0]) > strlen(AFF_SEGNAME_PAGE)); // The string "page" must be followed by at least 1 digit data/guymager-0.8.12/aaff.cpp:513: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). if (Found) Found = isdigit ( SegmentName[strlen(AFF_SEGNAME_PAGE)]); // Check if the following char is a digit (Some checking done after strtol, see below) data/guymager-0.8.12/aaff.cpp:534: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). pSegmentNamePageNumber = &SegmentName[strlen(AFF_SEGNAME_PAGE)]; data/guymager-0.8.12/config.cpp:936:8: [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 (pCfg->Family)) data/guymager-0.8.12/dlgacquire.cpp:1174: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). const int StrLen = strlen (pStr); data/guymager-0.8.12/main.cpp:184:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (::read(oArrFileDescHup[1], &Ch, sizeof(Ch)) != 1) data/guymager-0.8.12/main.cpp:566:8: [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 (CONFIG(UserFieldName))) data/guymager-0.8.12/main.cpp:568:8: [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 (CONFIG(AdditionalStateInfoName))) data/guymager-0.8.12/main.cpp:739: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). Len += strlen (argv[i])+1; data/guymager-0.8.12/main.cpp:747:10: [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 (MainLocal.pCommandLine, " "); data/guymager-0.8.12/md5.cpp:483: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). MD5Append (&Context, pVector, strlen(pVector)); data/guymager-0.8.12/runstats.cpp:70: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). pOwn->Configured = (CONFIG(RunStatsInterval) != 0) && strlen(CONFIG(RunStatsTemplateActive)) data/guymager-0.8.12/runstats.cpp:71: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). && strlen(CONFIG(RunStatsOutput )); data/guymager-0.8.12/sha256.cpp:902: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). SHA256Append (&Context, (uint8 *) msg[i], strlen( msg[i] ) ); data/guymager-0.8.12/threadread.cpp:185:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read = read (pDevice->FileDescSrc, pBuffer, Size); data/guymager-0.8.12/threadscan.cpp:732: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). if (strncmp (pPath, THREADSCAN_UDEV_PATH_RAM, strlen (THREADSCAN_UDEV_PATH_RAM)) == 0) // Ignore RAM devices data/guymager-0.8.12/threadscan.cpp:748:54: [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 (pPath, THREADSCAN_UDEV_PATH_LOOP, strlen (THREADSCAN_UDEV_PATH_LOOP)) == 0) // Ignore non-mounted loop devices data/guymager-0.8.12/threadwrite.cpp:242:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read = read (oFile, (char*)poVerifyBuff, GETMIN(poDevice->FifoBlockSize, oRemainingFileSize)); data/guymager-0.8.12/threadwrite.cpp:425: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). poImageFilenameArr[i] = (char *) malloc (strlen(pAsciiFileName)+1); data/guymager-0.8.12/threadwrite.cpp:469:78: [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 MOD_QSTR(QStr) (const uint8_t *)QStr.toUtf8().data(), strlen(QStr.toUtf8().data()) data/guymager-0.8.12/threadwrite.cpp:470: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). #define MOD_STR(pStr) (const uint8_t *)pStr, strlen((const char *)pStr) data/guymager-0.8.12/threadwrite.cpp:496:63: [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 MOD_QSTR(QStr) QStr.toLatin1().data(), strlen(QStr.toLatin1().data()) data/guymager-0.8.12/util.cpp:306: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). size_t StrLen = strlen (pStr) +1; ANALYSIS SUMMARY: Hits = 128 Lines analyzed = 24600 in approximately 0.55 seconds (44634 lines/second) Physical Source Lines of Code (SLOC) = 17470 Hits@level = [0] 77 [1] 27 [2] 86 [3] 5 [4] 10 [5] 0 Hits@level+ = [0+] 205 [1+] 128 [2+] 101 [3+] 15 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 11.7344 [1+] 7.32685 [2+] 5.78134 [3+] 0.858615 [4+] 0.57241 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.