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/duma-2.5.15/comparisons/ex11/wrong1.c Examining data/duma-2.5.15/comparisons/ex12/wrong3.c Examining data/duma-2.5.15/comparisons/ex13/wrong6.c Examining data/duma-2.5.15/comparisons/ex14/wrong7.c Examining data/duma-2.5.15/comparisons/ex15/leak1.c Examining data/duma-2.5.15/comparisons/ex16/leak2.c Examining data/duma-2.5.15/comparisons/ex17/ok5.c Examining data/duma-2.5.15/comparisons/ex21/wrong1.cc Examining data/duma-2.5.15/comparisons/ex22/wrong2.cc Examining data/duma-2.5.15/comparisons/ex23/wrong3.cc Examining data/duma-2.5.15/comparisons/ex24/wrong4.cc Examining data/duma-2.5.15/comparisons/ex25/wrong5.cc Examining data/duma-2.5.15/comparisons/ex26/wrong6.cc Examining data/duma-2.5.15/comparisons/ex27/leak1.cc Examining data/duma-2.5.15/comparisons/ex28/leak2.cc Examining data/duma-2.5.15/comparisons/ex29/ok5.cc Examining data/duma-2.5.15/createconf.c Examining data/duma-2.5.15/createconf_new.cpp Examining data/duma-2.5.15/duma.c Examining data/duma-2.5.15/duma.h Examining data/duma-2.5.15/duma_hlp.h Examining data/duma-2.5.15/duma_sem.h Examining data/duma-2.5.15/dumatest.c Examining data/duma-2.5.15/dumatestpp.cpp Examining data/duma-2.5.15/example1.cpp Examining data/duma-2.5.15/example2.cpp Examining data/duma-2.5.15/example3.cpp Examining data/duma-2.5.15/example4.cpp Examining data/duma-2.5.15/example5.cpp Examining data/duma-2.5.15/example6.cpp Examining data/duma-2.5.15/noduma.h Examining data/duma-2.5.15/paging.h Examining data/duma-2.5.15/print.c Examining data/duma-2.5.15/print.h Examining data/duma-2.5.15/sem_inc.c Examining data/duma-2.5.15/testalloc0.cpp Examining data/duma-2.5.15/testenv.c Examining data/duma-2.5.15/testmt.c Examining data/duma-2.5.15/testoperators.cpp Examining data/duma-2.5.15/testsems.cpp Examining data/duma-2.5.15/thread-test.c Examining data/duma-2.5.15/tstheap.c Examining data/duma-2.5.15/detoursexample1/detoursexample1.cpp Examining data/duma-2.5.15/detoursexample1/stdafx.cpp Examining data/duma-2.5.15/detoursexample1/stdafx.h Examining data/duma-2.5.15/dumadetours/dumadetours.cpp Examining data/duma-2.5.15/dumadetours/stdafx.cpp Examining data/duma-2.5.15/dumadetours/stdafx.h Examining data/duma-2.5.15/dumadetoursdll/dumadetoursdll.cpp Examining data/duma-2.5.15/dumadetoursdll/stdafx.cpp Examining data/duma-2.5.15/dumadetoursdll/stdafx.h Examining data/duma-2.5.15/dumadll/dumadll.cpp Examining data/duma-2.5.15/dumadll/resource.h Examining data/duma-2.5.15/dumadll/stdafx.cpp Examining data/duma-2.5.15/dumadll/stdafx.h Examining data/duma-2.5.15/kduma/createconf.c Examining data/duma-2.5.15/kduma/kduma.c Examining data/duma-2.5.15/kduma/kduma.h Examining data/duma-2.5.15/kduma/log.h Examining data/duma-2.5.15/kduma/paging.h Examining data/duma-2.5.15/stacktrace/printStackTrace.cpp Examining data/duma-2.5.15/stacktrace/printStackTrace.h Examining data/duma-2.5.15/stacktrace/internal/MapFile.cpp Examining data/duma-2.5.15/stacktrace/internal/Array.h Examining data/duma-2.5.15/stacktrace/internal/MapFile.h Examining data/duma-2.5.15/stacktrace/internal/MapFileEntry.cpp Examining data/duma-2.5.15/stacktrace/internal/MapFileEntry.h Examining data/duma-2.5.15/stacktrace/internal/StackTrace.cpp Examining data/duma-2.5.15/stacktrace/internal/StackTrace.h Examining data/duma-2.5.15/stacktrace/internal/TextFile.cpp Examining data/duma-2.5.15/stacktrace/internal/TextFile.h Examining data/duma-2.5.15/stacktrace/linux-i386/printStackTrace.c Examining data/duma-2.5.15/win32-msvc.2005/quicktest/quicktest.cpp Examining data/duma-2.5.15/win32-msvc.net/dumadll/dumadll.cpp Examining data/duma-2.5.15/win32-msvc.net/dumadll/resource.h Examining data/duma-2.5.15/win32-msvc.net/dumadll/stdafx.cpp Examining data/duma-2.5.15/win32-msvc.net/dumadll/stdafx.h Examining data/duma-2.5.15/win32-msvc.net/quicktest/quicktest.cpp Examining data/duma-2.5.15/win32-msvc.net/quicktest/stdafx.cpp Examining data/duma-2.5.15/win32-msvc.net/quicktest/stdafx.h Examining data/duma-2.5.15/dumapp.cpp Examining data/duma-2.5.15/dumapp.h FINAL RESULTS: data/duma-2.5.15/duma.h:295:15: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. #define strncat(DEST, SRC, SIZE) _duma_strncat(DEST, SRC, SIZE, __FILE__, __LINE__) data/duma-2.5.15/kduma/kduma.h:138:9: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. #define strncat(DEST, SRC, SIZE) _duma_strncat(DEST, SRC, SIZE, __FILE__, __LINE__) data/duma-2.5.15/createconf.c:821:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, directory); data/duma-2.5.15/duma.c:1283: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(ptrStacktrace, stacktrace); data/duma-2.5.15/duma.c:2390:27: [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). #pragma function( memcpy, strcpy, strcat ) data/duma-2.5.15/duma.c:2390:35: [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). #pragma function( memcpy, strcpy, strcat ) data/duma-2.5.15/duma.c:2448:8: [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). char * strcpy(char *dest, const char *src) data/duma-2.5.15/duma.c:2460:8: [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). char * strcat(char *dest, const char *src) data/duma-2.5.15/duma.h:292:15: [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). #define strcpy(DEST, SRC) _duma_strcpy(DEST, SRC, __FILE__, __LINE__) data/duma-2.5.15/duma.h:294:15: [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). #define strcat(DEST, SRC) _duma_strcat(DEST, SRC, __FILE__, __LINE__) data/duma-2.5.15/dumadetours/dumadetours.cpp:61:3: [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(szExe, argv[cnt]); data/duma-2.5.15/dumadetours/dumadetours.cpp:67: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(szCommand, argv[cnt]); data/duma-2.5.15/dumadetours/dumadetours.cpp:71: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(szCommand, argv[cnt]); data/duma-2.5.15/kduma/createconf.c:290:2: [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. printf(f, " * under MS Windows(TM) the %s\n", __DATE__ ); data/duma-2.5.15/kduma/createconf.c:418: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(filename, directory); data/duma-2.5.15/kduma/kduma.h:135: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). #define strcpy(DEST, SRC) _duma_strcpy(DEST, SRC, __FILE__, __LINE__) data/duma-2.5.15/kduma/kduma.h:137:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). #define strcat(DEST, SRC) _duma_strcat(DEST, SRC, __FILE__, __LINE__) data/duma-2.5.15/noduma.h:90:8: [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). #ifdef strcpy data/duma-2.5.15/noduma.h:91:8: [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). #undef strcpy data/duma-2.5.15/noduma.h:98:8: [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). #ifdef strcat data/duma-2.5.15/noduma.h:99:8: [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). #undef strcat data/duma-2.5.15/print.c:119:3: [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(dest, s); data/duma-2.5.15/print.c:147:3: [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(dest, s); data/duma-2.5.15/print.c:231:11: [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(&buffer[len], string); data/duma-2.5.15/sem_inc.c:90:27: [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). #define SEM_STRCPY strcpy data/duma-2.5.15/sem_inc.c:91:27: [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). #define SEM_STRCAT strcat data/duma-2.5.15/sem_inc.c:95:27: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. #define SEM_STRCPY wcscpy data/duma-2.5.15/sem_inc.c:96:27: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). #define SEM_STRCAT wcscat data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:169:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf+strlen(buf), "%s (%x)\n", callersEntry[callers-i]->name(), addr ); data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:174:4: [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( buffer, buf ); data/duma-2.5.15/stacktrace/printStackTrace.cpp:86:29: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. case MapFile::ERROR_OPEN: sprintf( buffer, "Failed to open map file %s\n", modname ); break; data/duma-2.5.15/stacktrace/printStackTrace.cpp:87:29: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. case MapFile::ERROR_READ: sprintf( buffer, "Error while reading map file %s(%i)\n", modname, map->line() ); break; data/duma-2.5.15/stacktrace/printStackTrace.cpp:88:30: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. case MapFile::ERROR_PARSE: sprintf( buffer, "Parse error in map file %s(%i)\n", modname, map->line() ); break; data/duma-2.5.15/duma.c:153:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #define DUMA_GETENV getenv data/duma-2.5.15/dumadetours/dumadetours.cpp:35:6: [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. if(getenv("DUMA_DETOURS_DLL")) data/duma-2.5.15/dumadetours/dumadetours.cpp:36:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pszDllPath = getenv("DUMA_DETOURS_DLL"); data/duma-2.5.15/sem_inc.c:210:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&critsect); data/duma-2.5.15/sem_inc.c:244:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&critsect); data/duma-2.5.15/tstheap.c:23:8: [3] (random) drand48: 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. double drand48(void); /* For pre-ANSI C systems */ data/duma-2.5.15/tstheap.c:54:1: [3] (random) drand48: 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. drand48(void) data/duma-2.5.15/tstheap.c:59:10: [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. return (random() / (double)ULONG_MAX); data/duma-2.5.15/tstheap.c:89:21: [3] (random) drand48: 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. pool_idx =(int)(drand48() * POOL_SIZE); data/duma-2.5.15/tstheap.c:93:27: [3] (random) drand48: 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. size = (size_t)(drand48() * (LARGEST_BUFFER + 1)); data/duma-2.5.15/comparisons/ex13/wrong6.c:5:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char st[10]; data/duma-2.5.15/comparisons/ex17/ok5.c:3:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char st[10]; data/duma-2.5.15/createconf.c:282: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). FILE * f = fopen(filename, "w"); data/duma-2.5.15/createconf.c:743:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/duma-2.5.15/createconf.c:744:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[1024]; data/duma-2.5.15/createconf.c:814: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 directory[1024]; data/duma-2.5.15/createconf.c:822:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "duma_config.h"); data/duma-2.5.15/createconf.c:825:7: [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( filename, "duma_config.h" ); data/duma-2.5.15/createconf.c:828:3: [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( filename, "duma_config.h" ); data/duma-2.5.15/duma.c:301:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char acSpaceA[2 * DUMA_PAGE_SIZE]; data/duma-2.5.15/duma.c:521:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char acSpaceB[2 * DUMA_PAGE_SIZE]; data/duma-2.5.15/duma.c:745:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). duma_tls->ALIGNMENT = (size_t)atoi(string); data/duma-2.5.15/duma.c:756:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). duma_tls->PROTECT_BELOW = (atoi(string) != 0); data/duma-2.5.15/duma.c:760:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.REPORT_ALL_LEAKS = (atoi(string) != 0); data/duma-2.5.15/duma.c:770:28: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.PROTECT_FREE = atol(string); data/duma-2.5.15/duma.c:780:25: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.MAX_ALLOC = atol(string); data/duma-2.5.15/duma.c:787:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.ALLOW_MALLOC_0 = (atoi(string) != 0); data/duma-2.5.15/duma.c:795:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int tmp = atoi(string); data/duma-2.5.15/duma.c:805:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int tmp = atoi(string); data/duma-2.5.15/duma.c:814:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.MALLOC_FAILEXIT = (atoi(string) != 0); data/duma-2.5.15/duma.c:820:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.FREE_ACCESS = (atoi(string) != 0); data/duma-2.5.15/duma.c:827:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). duma_tls->FILL = atoi(string); data/duma-2.5.15/duma.c:836:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.SLACKFILL = atoi(string); data/duma-2.5.15/duma.c:843:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.SHOW_ALLOC = (atoi(string) != 0); data/duma-2.5.15/duma.c:849:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.SUPPRESS_ATEXIT = (atoi(string) != 0); data/duma-2.5.15/duma.c:857:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). DUMA_OUTPUT_STACKTRACE = (atoi(string) != 0); data/duma-2.5.15/duma.c:873:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). DUMA_OUTPUT_DEBUG = (atoi(string) != 0); data/duma-2.5.15/duma.c:881:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). DUMA_OUTPUT_STDOUT = (atoi(string) != 0); data/duma-2.5.15/duma.c:889:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). DUMA_OUTPUT_STDERR = (atoi(string) != 0); data/duma-2.5.15/duma.c:901:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.SKIPCOUNT_INIT = (atoi(string) != 0); data/duma-2.5.15/duma.c:906:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int tmp = atoi(string); data/duma-2.5.15/duma.c:913:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). _duma_s.DISABLE_BANNER = (atoi(string) != 0); data/duma-2.5.15/duma.c:1108:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. = ((char *)slot[0].internalAddress) + slot[0].internalSize; data/duma-2.5.15/duma.c:1191:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newAllocation, _duma_g.allocList, _duma_s.allocListSize); data/duma-2.5.15/duma.c:1192: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. memset(&(((char *)newAllocation)[_duma_s.allocListSize]), 0, DUMA_PAGE_SIZE); data/duma-2.5.15/duma.c:1250:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char stacktrace[601]; data/duma-2.5.15/duma.c:1553:41: [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. emptySlots[0]->internalAddress = (char *)emptySlots[0]->internalAddress + internalSize; data/duma-2.5.15/duma.c:2111: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( ptr, oldBuffer, slot->userSize ); data/duma-2.5.15/duma.c:2115: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(ptr, oldBuffer, newSize); data/duma-2.5.15/duma.c:2390:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #pragma function( memcpy, strcpy, strcat ) data/duma-2.5.15/duma.c:2442:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. void * memcpy(void *dest, const void *src, size_t size) data/duma-2.5.15/duma.h:129: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. const char * DelFile[DUMA_MAX_DEL_DEPTH]; data/duma-2.5.15/duma.h:142: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 acSpaceA[2 * DUMA_PAGE_SIZE]; data/duma-2.5.15/duma.h:164: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 acSpaceB[2 * DUMA_PAGE_SIZE]; data/duma-2.5.15/duma.h:291:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memcpy(DEST, SRC, SIZE) _duma_memcpy(DEST, SRC, SIZE, __FILE__, __LINE__) data/duma-2.5.15/dumadetours/dumadetours.cpp:50:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szCommand[2048]; data/duma-2.5.15/dumadetours/dumadetours.cpp:51:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szExe[1024]; data/duma-2.5.15/dumadetours/dumadetours.cpp:52:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szFullExe[1024] = "\0"; data/duma-2.5.15/kduma/createconf.c:278:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * f = fopen(filename, "w"); data/duma-2.5.15/kduma/createconf.c:365:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/duma-2.5.15/kduma/createconf.c:366:2: [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[1024]; data/duma-2.5.15/kduma/createconf.c:411:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char directory[1024]; data/duma-2.5.15/kduma/createconf.c:419:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "duma_config.h"); data/duma-2.5.15/kduma/createconf.c:422:4: [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( filename, "duma_config.h" ); data/duma-2.5.15/kduma/createconf.c:425:2: [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( filename, "duma_config.h" ); data/duma-2.5.15/kduma/kduma.c:439:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. = ((char *)slot[0].internalAddress) + slot[0].internalSize; data/duma-2.5.15/kduma/kduma.c:500:2: [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(newAllocation, _duma_allocList, _duma_allocListSize); data/duma-2.5.15/kduma/kduma.c:501: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. memset(&(((char *)newAllocation)[_duma_allocListSize]), 0, DUMA_PAGE_SIZE); data/duma-2.5.15/kduma/kduma.c:547:2: [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 stacktrace[601]; data/duma-2.5.15/kduma/kduma.h:134: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. #define memcpy(DEST, SRC, SIZE) _duma_memcpy(DEST, SRC, SIZE, __FILE__, __LINE__) data/duma-2.5.15/noduma.h:86:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #ifdef memcpy data/duma-2.5.15/noduma.h:87:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #undef memcpy data/duma-2.5.15/paging.h:184:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). devZeroFd = open("/dev/zero", O_RDWR); data/duma-2.5.15/print.c:102:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[NUMBER_BUFFER_SIZE+1]; data/duma-2.5.15/print.c:130:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[NUMBER_BUFFER_SIZE+1]; data/duma-2.5.15/print.c:236:11: [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[len], "NULL"); data/duma-2.5.15/print.c:270:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[STRING_BUFFER_SIZE]; data/duma-2.5.15/print.c:275:3: [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, "\nDUMA Aborting: "); data/duma-2.5.15/print.c:307:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[STRING_BUFFER_SIZE]; data/duma-2.5.15/print.c:331:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(DUMA_OUTPUT_FILE, O_APPEND|O_CREAT|O_WRONLY); data/duma-2.5.15/print.c:355:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[STRING_BUFFER_SIZE]; data/duma-2.5.15/print.c:360:3: [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, "\nDUMA Exiting: "); data/duma-2.5.15/print.c:397:10: [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 acStrError[STRING_BUFFER_SIZE]; data/duma-2.5.15/stacktrace/internal/MapFile.cpp:41:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/duma-2.5.15/stacktrace/internal/MapFile.cpp:49:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/duma-2.5.15/stacktrace/internal/MapFile.cpp:114:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/duma-2.5.15/stacktrace/internal/MapFile.cpp:157:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/duma-2.5.15/stacktrace/internal/MapFile.cpp:159:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lib[256]; data/duma-2.5.15/stacktrace/internal/MapFile.cpp:286:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( buffer, ".map" ); data/duma-2.5.15/stacktrace/internal/MapFileEntry.h:68:2: [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 m_name[MAX_NAME+1]; data/duma-2.5.15/stacktrace/internal/MapFileEntry.h:69:2: [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 m_lib[MAX_NAME+1]; data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:160:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MapFileEntry::MAX_NAME+MAX_DEPTH+20]; // name + margin + hex number data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:167:4: [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+strlen(buf), "0x%x\n", addr ); data/duma-2.5.15/stacktrace/internal/TextFile.cpp:36: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). m_file = fopen( filename, "rt" ); data/duma-2.5.15/stacktrace/printStackTrace.cpp:76:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char modname[500]; data/duma-2.5.15/testalloc0.cpp:81:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). test = atoi( argv[1] ); data/duma-2.5.15/testmt.c:111:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atoi(argv[1]); data/duma-2.5.15/testmt.c:117:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atoi(argv[2]); data/duma-2.5.15/thread-test.c:72: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). FILE *fp = fopen("/etc/resolv.conf", "r"); data/duma-2.5.15/thread-test.c:75:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/duma-2.5.15/tstheap.c:75:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). duration = atoi(argv[1]); data/duma-2.5.15/duma.c:1281: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). internalSize = strlen(stacktrace) * sizeof(char) + 1; data/duma-2.5.15/duma.c:2238: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). size_t size = strlen(src) +1; data/duma-2.5.15/duma.c:2313: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 destlen = strlen(dest); data/duma-2.5.15/duma.c:2314: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 srcsize = strlen(src) + 1; data/duma-2.5.15/duma.c:2353: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). destlen = strlen(dest); data/duma-2.5.15/duma.c:2412:8: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. void * memalign(size_t alignment, size_t size) data/duma-2.5.15/duma.c:2454:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). char * strncpy(char *dest, const char *src, size_t size) data/duma-2.5.15/duma.c:2466:8: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. char * strncat(char *dest, const char *src, size_t size) data/duma-2.5.15/duma.h:286:15: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. #define memalign(ALIGNMENT, SIZE) _duma_memalign(ALIGNMENT, SIZE, __FILE__, __LINE__) data/duma-2.5.15/duma.h:293:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #define strncpy(DEST, SRC, SIZE) _duma_strncpy(DEST, SRC, SIZE, __FILE__, __LINE__) data/duma-2.5.15/dumadetours/dumadetours.cpp:66:7: [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(szCommand, "\""); data/duma-2.5.15/dumadetours/dumadetours.cpp:68:7: [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(szCommand, "\""); data/duma-2.5.15/dumadetours/dumadetours.cpp:74:7: [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(szCommand, " "); data/duma-2.5.15/dumatest.c:317:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write(0, diag->explanation, strlen(diag->explanation)); data/duma-2.5.15/dumatest.c:332:35: [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). write(2, diag->explanation, strlen(diag->explanation)); data/duma-2.5.15/kduma/kduma.c:1126:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t size = strlen(src) +1; data/duma-2.5.15/kduma/kduma.c:1157:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). srcsize = strlen(src) + 1; data/duma-2.5.15/kduma/kduma.c:1185: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). size_t destlen = strlen(dest); data/duma-2.5.15/kduma/kduma.c:1186: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). size_t srcsize = strlen(src) + 1; data/duma-2.5.15/kduma/kduma.c:1216:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). destlen = strlen(dest); data/duma-2.5.15/kduma/kduma.c:1217:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). srclen = strlen(src); data/duma-2.5.15/kduma/kduma.h:136:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #define strncpy(DEST, SRC, SIZE) _duma_strncpy(DEST, SRC, SIZE, __FILE__, __LINE__) data/duma-2.5.15/noduma.h:66:8: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. #ifdef memalign data/duma-2.5.15/noduma.h:67:8: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. #undef memalign data/duma-2.5.15/noduma.h:94:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #ifdef strncpy data/duma-2.5.15/noduma.h:95:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #undef strncpy data/duma-2.5.15/noduma.h:102:8: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. #ifdef strncat data/duma-2.5.15/noduma.h:103:8: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. #undef strncat data/duma-2.5.15/print.c:230: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). length = strlen(string); data/duma-2.5.15/print.c:276:10: [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). lena = strlen(buffer); data/duma-2.5.15/print.c:278:3: [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(buffer, "\n"); data/duma-2.5.15/print.c:361:10: [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). lena = strlen(buffer); data/duma-2.5.15/print.c:363:3: [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(buffer, "\n"); data/duma-2.5.15/stacktrace/internal/MapFile.cpp:284:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (int)strlen(buffer)+4 < bufferSize ) data/duma-2.5.15/stacktrace/internal/MapFileEntry.cpp:40:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( m_name, name, MAX_NAME ); data/duma-2.5.15/stacktrace/internal/MapFileEntry.cpp:43:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( m_lib, lib, MAX_NAME ); data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:164:4: [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( buf, " " ); data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:167: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). sprintf( buf+strlen(buf), "0x%x\n", addr ); data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:169: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). sprintf( buf+strlen(buf), "%s (%x)\n", callersEntry[callers-i]->name(), addr ); data/duma-2.5.15/stacktrace/internal/StackTrace.cpp:172: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). needed += (int)strlen( buf ); data/duma-2.5.15/stacktrace/internal/TextFile.cpp:65:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc( m_file ); data/duma-2.5.15/stacktrace/printStackTrace.cpp:80:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(modname, mapFilename, sizeof(modname)/sizeof(char)); data/duma-2.5.15/tstheap.c:106:25: [1] (free) memalign: On some systems (though not Linux-based systems) an attempt to free() results from memalign() may fail. This may, on a few systems, be exploitable. Also note that memalign() may not check that the boundary parameter is correct (CWE-676). Use posix_memalign instead (defined in POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD 4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases, malloc()'s alignment may be sufficient. element->addr = memalign(ALIGNMENT,size); ANALYSIS SUMMARY: Hits = 177 Lines analyzed = 12523 in approximately 0.43 seconds (29343 lines/second) Physical Source Lines of Code (SLOC) = 7547 Hits@level = [0] 414 [1] 43 [2] 91 [3] 10 [4] 31 [5] 2 Hits@level+ = [0+] 591 [1+] 177 [2+] 134 [3+] 43 [4+] 33 [5+] 2 Hits/KSLOC@level+ = [0+] 78.3093 [1+] 23.453 [2+] 17.7554 [3+] 5.69763 [4+] 4.3726 [5+] 0.265006 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.