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/iipimage-1.1/src/Task.h Examining data/iipimage-1.1/src/Watermark.cc Examining data/iipimage-1.1/src/Task.cc Examining data/iipimage-1.1/src/Timer.h Examining data/iipimage-1.1/src/KakaduImage.h Examining data/iipimage-1.1/src/RawTile.h Examining data/iipimage-1.1/src/Transforms.h Examining data/iipimage-1.1/src/OpenJPEGImage.cc Examining data/iipimage-1.1/src/TPTImage.cc Examining data/iipimage-1.1/src/FIF.cc Examining data/iipimage-1.1/src/IIPResponse.h Examining data/iipimage-1.1/src/Writer.h Examining data/iipimage-1.1/src/View.h Examining data/iipimage-1.1/src/IIPImage.cc Examining data/iipimage-1.1/src/IIPImage.h Examining data/iipimage-1.1/src/PFL.cc Examining data/iipimage-1.1/src/Watermark.h Examining data/iipimage-1.1/src/URL.h Examining data/iipimage-1.1/src/IIPResponse.cc Examining data/iipimage-1.1/src/Transforms.cc Examining data/iipimage-1.1/src/JPEGCompressor.h Examining data/iipimage-1.1/src/SPECTRA.cc Examining data/iipimage-1.1/src/Main.cc Examining data/iipimage-1.1/src/KakaduImage.cc Examining data/iipimage-1.1/src/TileManager.cc Examining data/iipimage-1.1/src/OpenJPEGImage.h Examining data/iipimage-1.1/src/TPTImage.h Examining data/iipimage-1.1/src/OBJ.cc Examining data/iipimage-1.1/src/JPEGCompressor.cc Examining data/iipimage-1.1/src/DeepZoom.cc Examining data/iipimage-1.1/src/JTL.cc Examining data/iipimage-1.1/src/Memcached.h Examining data/iipimage-1.1/src/Compressor.h Examining data/iipimage-1.1/src/Zoomify.cc Examining data/iipimage-1.1/src/DSOImage.h Examining data/iipimage-1.1/src/IIIF.cc Examining data/iipimage-1.1/src/View.cc Examining data/iipimage-1.1/src/ICC.cc Examining data/iipimage-1.1/src/TileManager.h Examining data/iipimage-1.1/src/TIL.cc Examining data/iipimage-1.1/src/DSOImage.cc Examining data/iipimage-1.1/src/Environment.h Examining data/iipimage-1.1/src/Tokenizer.h Examining data/iipimage-1.1/src/Cache.h Examining data/iipimage-1.1/src/CVT.cc Examining data/iipimage-1.1/src/Logger.h Examining data/iipimage-1.1/windows/Time.h Examining data/iipimage-1.1/windows/Time.cc Examining data/iipimage-1.1/windows/MemcachedWindows.h Examining data/iipimage-1.1/fcgi/fcgi_config.h Examining data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c Examining data/iipimage-1.1/fcgi/libfcgi/os_win32.c Examining data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c Examining data/iipimage-1.1/fcgi/libfcgi/os_unix.c Examining data/iipimage-1.1/fcgi/include/fastcgi.h Examining data/iipimage-1.1/fcgi/include/fcgi_stdio.h Examining data/iipimage-1.1/fcgi/include/fcgi_config_x86.h Examining data/iipimage-1.1/fcgi/include/fcgiapp.h Examining data/iipimage-1.1/fcgi/include/fcgios.h Examining data/iipimage-1.1/fcgi/include/fcgio.h Examining data/iipimage-1.1/fcgi/include/fcgimisc.h FINAL RESULTS: data/iipimage-1.1/fcgi/include/fcgi_stdio.h:189:9: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #undef gets data/iipimage-1.1/fcgi/include/fcgi_stdio.h:190:9: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #define gets FCGI_gets data/iipimage-1.1/fcgi/include/fcgi_stdio.h:204:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef fprintf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:205:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define fprintf FCGI_fprintf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:206:9: [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. #undef printf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:207:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define printf FCGI_printf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:209:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vfprintf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:210:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vfprintf FCGI_vfprintf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:211:9: [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. #undef vprintf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:212:9: [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. #define vprintf FCGI_vprintf data/iipimage-1.1/fcgi/include/fcgi_stdio.h:233:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #undef popen data/iipimage-1.1/fcgi/include/fcgi_stdio.h:234:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define popen FCGI_popen data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:52:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. extern FILE *popen(const char *command, const char *type); data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:57:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define popen _popen data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:603: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. n = vfprintf(fp->stdio_stream, format, ap); data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:632:16: [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. return vfprintf(fp->stdio_stream, format, ap); data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:641:16: [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. return vfprintf(FCGI_stdout->stdio_stream, format, ap); data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:776:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE * file = popen(cmd, type); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:675:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, intArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:680:29: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, longArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:685:29: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, shortArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:699:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, unsignedArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:704:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, uLongArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:709:29: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, uShortArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:720:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, intArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:741:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, charPtrArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:760:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, voidPtrArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:789:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, doubleArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:793:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, lDoubleArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:807:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, doubleArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:812:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffPtr, fmtBuff, lDoubleArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:1483:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(responseP, "%c%c%s%c", len, 1, name, value); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:295: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(host, bindPath); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:398: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(host, bindPath); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:539:2: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl(appPath, appPath, NULL); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:927:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(sdup, str); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:754:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pipePath, bindPathPrefix); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:755:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pipePath, bindPath); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:875:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pipePath, bindPathPrefix); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:876:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pipePath, bindPath); data/iipimage-1.1/src/CVT.cc:177:17: [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. session->out->printf( (const char*) str ); data/iipimage-1.1/src/CVT.cc:506:17: [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. session->out->printf( str ); data/iipimage-1.1/src/CVT.cc:558:19: [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. session->out->printf( str ); data/iipimage-1.1/src/CVT.cc:588:17: [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. session->out->printf( str ); data/iipimage-1.1/src/Cache.h:32:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/Cache.h:32:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/DeepZoom.cc:122:19: [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. session->out->printf( (const char*) str ); data/iipimage-1.1/src/IIIF.cc:105:19: [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. session->out->printf( (const char*) header.c_str() ); data/iipimage-1.1/src/IIIF.cc:230:19: [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. session->out->printf( (const char*) header.str().c_str() ); data/iipimage-1.1/src/IIPImage.h:29:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/IIPImage.h:29:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/IIPResponse.h:31:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/IIPResponse.h:31:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/JPEGCompressor.h:31:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/JPEGCompressor.h:31:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/iipimage-1.1/src/JTL.cc:394:17: [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. session->out->printf( str ); data/iipimage-1.1/src/Main.cc:755:13: [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. if( writer.printf( response.formatResponse().c_str() ) == -1 ){ data/iipimage-1.1/src/Main.cc:796:11: [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. writer.printf( status.c_str() ); data/iipimage-1.1/src/Main.cc:830:13: [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. if( writer.printf( response.formatResponse().c_str() ) == -1 ){ data/iipimage-1.1/src/Main.cc:837:9: [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. writer.printf( response.getAdvert().c_str() ); data/iipimage-1.1/src/Main.cc:847:14: [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. writer.printf( status.c_str() ); data/iipimage-1.1/src/Main.cc:860:14: [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. writer.printf( status.c_str() ); data/iipimage-1.1/src/Main.cc:878:14: [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. writer.printf( response.getAdvert().c_str() ); data/iipimage-1.1/src/PFL.cc:206:17: [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. session->out->printf( (const char*) str ); data/iipimage-1.1/src/PFL.cc:211:17: [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. session->out->printf( profile.str().c_str() ); data/iipimage-1.1/src/SPECTRA.cc:97:17: [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. session->out->printf( (const char*) str ); data/iipimage-1.1/src/SPECTRA.cc:154:19: [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. session->out->printf( tmp ); data/iipimage-1.1/src/TIL.cc:121:19: [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. session->out->printf( (const char*)str ); data/iipimage-1.1/src/TIL.cc:171:21: [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. session->out->printf( (const char*) buf ); data/iipimage-1.1/src/Writer.h:49:15: [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. virtual int printf( const char* msg ) = 0; data/iipimage-1.1/src/Writer.h:100:7: [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. int printf( const char* msg ){ data/iipimage-1.1/src/Writer.h:129:7: [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. int printf( const char* msg ){ data/iipimage-1.1/src/Zoomify.cc:116:19: [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. session->out->printf( (const char*) str ); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:2091:9: [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. p = getenv("FCGI_WEB_SERVER_ADDRS"); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:153:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&fdTableCritical); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:322:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&fdTableCritical); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:353:11: [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. val = getenv(SHUTDOWN_EVENT_NAME); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:367:15: [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. val = getenv(MUTEX_VARNAME); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:490:19: [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((cLenPtr = getenv("CONTENT_LENGTH")) != NULL && data/iipimage-1.1/fcgi/libfcgi/os_win32.c:608:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&fdTableCritical); data/iipimage-1.1/src/Environment.h:61:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *envpara = getenv( "VERBOSITY" ); data/iipimage-1.1/src/Environment.h:72:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "LOGFILE" ); data/iipimage-1.1/src/Environment.h:80:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "MAX_IMAGE_CACHE_SIZE" ); data/iipimage-1.1/src/Environment.h:89:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "FILENAME_PATTERN" ); data/iipimage-1.1/src/Environment.h:101:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "JPEG_QUALITY" ); data/iipimage-1.1/src/Environment.h:115:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "MAX_CVT" ); data/iipimage-1.1/src/Environment.h:128:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "MAX_LAYERS" ); data/iipimage-1.1/src/Environment.h:138:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "FILESYSTEM_PREFIX" ); data/iipimage-1.1/src/Environment.h:150:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "WATERMARK" ); data/iipimage-1.1/src/Environment.h:163:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "WATERMARK_PROBABILITY" ); data/iipimage-1.1/src/Environment.h:177:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "WATERMARK_OPACITY" ); data/iipimage-1.1/src/Environment.h:190:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "MEMCACHED_SERVERS" ); data/iipimage-1.1/src/Environment.h:202:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "MEMCACHED_TIMEOUT" ); data/iipimage-1.1/src/Environment.h:212:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "INTERPOLATION" ); data/iipimage-1.1/src/Environment.h:222:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "CORS" ); data/iipimage-1.1/src/Environment.h:231:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "BASE_URL" ); data/iipimage-1.1/src/Environment.h:240:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "CACHE_CONTROL" ); data/iipimage-1.1/src/Environment.h:249:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "ALLOW_UPSCALING" ); data/iipimage-1.1/src/Environment.h:258:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "URI_MAP" ); data/iipimage-1.1/src/Environment.h:267:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "EMBED_ICC" ); data/iipimage-1.1/src/Environment.h:277:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* envpara = getenv( "KAKADU_READMODE" ); data/iipimage-1.1/src/Main.cc:214:8: [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. tz = getenv("TZ"); data/iipimage-1.1/src/Main.cc:449:13: [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. envpara = getenv( "DECODER_MODULES" ); data/iipimage-1.1/src/Main.cc:512:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand( request_timer.getTime() ); data/iipimage-1.1/src/Watermark.cc:100:7: [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. if( random < _probability ){ data/iipimage-1.1/src/Watermark.cc:106:17: [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. xoffset = random * (width - _width); data/iipimage-1.1/src/Watermark.cc:112:17: [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. yoffset = random * (height - _height); data/iipimage-1.1/fcgi/include/fastcgi.h:73:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reserved[5]; data/iipimage-1.1/fcgi/include/fastcgi.h:100:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reserved[3]; data/iipimage-1.1/fcgi/include/fastcgi.h:127:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reserved[7]; data/iipimage-1.1/fcgi/include/fcgi_stdio.h:153:9: [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). #undef fopen data/iipimage-1.1/fcgi/include/fcgi_stdio.h:154:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define fopen FCGI_fopen data/iipimage-1.1/fcgi/include/fcgi_stdio.h:226:9: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). #undef tmpfile data/iipimage-1.1/fcgi/include/fcgi_stdio.h:227:9: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). #define tmpfile FCGI_tmpfile data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:298:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * file = fopen(path, mode); data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:344:28: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp->stdio_stream = fopen(path, mode); data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:737:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). FILE * file = tmpfile(); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:90:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newString, str, strLen); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:154: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(str, stream->rdNext, n); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:166:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str, stream->rdNext, m); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:318: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(stream->wrNext, str, n); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:330:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(stream->wrNext, str, m); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:418: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 fmtBuff[FMT_BUFFLEN]; data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:419: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 buff[PRINTF_BUFFLEN]; data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:516: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(fmtBuffPtr, "%d", minWidth); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:545:8: [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(fmtBuffPtr, "%d", precision); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:1141:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char lenBuff[3]; data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:1459: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 response[64]; /* 64 = 8 + 3*(1+1+14+1)* + padding */ data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:1690: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(((char *)(&header)) + headerLen, stream->rdNext, count); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:252:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(servAddrPtr->sun_path, bindPath, bindPathLen); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:293: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 host[MAXPATHLEN]; data/iipimage-1.1/fcgi/libfcgi/os_unix.c:298:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if((port = atoi(tp)) == 0) { data/iipimage-1.1/fcgi/libfcgi/os_unix.c:394: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 host[MAXPATHLEN]; data/iipimage-1.1/fcgi/libfcgi/os_unix.c:401:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if((port = atoi(tp)) == 0) { data/iipimage-1.1/fcgi/libfcgi/os_unix.c:414: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(&sa.inetVariant.sin_addr, hp->h_addr, hp->h_length); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:761: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 trash[1024]; data/iipimage-1.1/fcgi/libfcgi/os_win32.c:356:41: [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). HANDLE shutdownEvent = (HANDLE) atoi(val); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:370:36: [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). acceptMutex = (HANDLE) atoi(val); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:491:8: [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). atoi(cLenPtr) > 0) { data/iipimage-1.1/fcgi/libfcgi/os_win32.c:653: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[6]; data/iipimage-1.1/fcgi/libfcgi/os_win32.c:658:24: [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). port = (short) atoi(buf); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:843:6: [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(&sockAddr.sin_addr, hp->h_addr, hp->h_length); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:1390: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 trash[1024]; data/iipimage-1.1/src/CVT.cc:161: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 str[1024]; data/iipimage-1.1/src/Cache.h:290:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[1024]; data/iipimage-1.1/src/DeepZoom.cc:108: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 str[1024]; data/iipimage-1.1/src/DeepZoom.cc:138: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). resolution = atoi( argument.substr(n2,n1-n2).c_str() ); data/iipimage-1.1/src/DeepZoom.cc:144:7: [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). x = atoi( suffix.substr(0,n).c_str() ); data/iipimage-1.1/src/DeepZoom.cc:145:7: [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). y = atoi( suffix.substr(n+1,suffix.length()).c_str() ); data/iipimage-1.1/src/Environment.h:63:18: [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). loglevel = atoi( envpara ); data/iipimage-1.1/src/Environment.h:104: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). jpeg_quality = atoi( envpara ); data/iipimage-1.1/src/Environment.h:118:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max_CVT = atoi( envpara ); data/iipimage-1.1/src/Environment.h:130: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). if( envpara ) layers = atoi( envpara ); data/iipimage-1.1/src/Environment.h:204:39: [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). if( envpara ) memcached_timeout = atoi( envpara ); data/iipimage-1.1/src/Environment.h:214: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). if( envpara ) interpolation = atoi( envpara ); data/iipimage-1.1/src/Environment.h:251:38: [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). if( envpara ) allow_upscaling = atoi( envpara ); // Implicit cast to boolean, all values other than '0' treated as true data/iipimage-1.1/src/Environment.h:269: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). if( envpara ) embed = atoi( envpara ); data/iipimage-1.1/src/Environment.h:279:18: [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). readmode = atoi( envpara ); data/iipimage-1.1/src/FIF.cc:207: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 strt[64]; data/iipimage-1.1/src/ICC.cc:37:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char icc_profile[1024]; data/iipimage-1.1/src/ICC.cc:42: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). unsigned int icc_len = atoi( tmp.c_str() ); data/iipimage-1.1/src/IIPImage.cc:92:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char header[10]; data/iipimage-1.1/src/IIPImage.cc:97:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *im = fopen( pstr, "rb" ); data/iipimage-1.1/src/IIPImage.cc:118:27: [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 j2k[10] = {0x00,0x00,0x00,0x0C,0x6A,0x50,0x20,0x20,0x0D,0x0A}; data/iipimage-1.1/src/IIPImage.cc:121:27: [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 stdtiff[3] = {0x49,0x20,0x49}; // TIFF data/iipimage-1.1/src/IIPImage.cc:122:27: [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 lsbtiff[4] = {0x49,0x49,0x2A,0x00}; // Little Endian TIFF data/iipimage-1.1/src/IIPImage.cc:123:27: [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 msbtiff[4] = {0x4D,0x4D,0x00,0x2A}; // Big Endian TIFF data/iipimage-1.1/src/IIPImage.cc:124:27: [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 lbigtiff[4] = {0x4D,0x4D,0x00,0x2B}; // Little Endian BigTIFF data/iipimage-1.1/src/IIPImage.cc:125:27: [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 bbigtiff[4] = {0x49,0x49,0x2B,0x00}; // Big Endian BigTIFF data/iipimage-1.1/src/IIPImage.cc:201: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 strt[64]; data/iipimage-1.1/src/IIPImage.cc:305: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 name[1024]; data/iipimage-1.1/src/IIPResponse.cc:60: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 tmp[64]; data/iipimage-1.1/src/IIPResponse.cc:69: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 tmp[8]; data/iipimage-1.1/src/IIPResponse.cc:80: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 tmp[64]; data/iipimage-1.1/src/IIPResponse.cc:89: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 tmp[32]; data/iipimage-1.1/src/JPEGCompressor.cc:55: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[ JMSG_LENGTH_MAX ]; data/iipimage-1.1/src/JPEGCompressor.cc:139:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( dest->source, dest->buffer, datacount ); data/iipimage-1.1/src/JPEGCompressor.cc:168:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( dest->source, dest->buffer, datacount ); data/iipimage-1.1/src/JPEGCompressor.cc:254:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( header, dest->buffer, datacount ); data/iipimage-1.1/src/JPEGCompressor.cc:297:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( output, dest->buffer, datacount ); data/iipimage-1.1/src/JPEGCompressor.cc:459: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( rawtile.data, dest->source, y ); data/iipimage-1.1/src/JPEGCompressor.cc:554: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 xmpstr[65536]; // per spec, XMP max size is 65502; namespace prefix/id is 29 bytes data/iipimage-1.1/src/JPEGCompressor.h:74:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char header[1024]; data/iipimage-1.1/src/JTL.cc:382: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 str[1024]; data/iipimage-1.1/src/KakaduImage.cc:79:9: [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). src.open( filename.c_str(), true ); data/iipimage-1.1/src/KakaduImage.cc:80:19: [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( jpx_input.open( &src, false ) != 1 ) throw 1; data/iipimage-1.1/src/KakaduImage.cc:665: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( b2, b1, tw * stripe_heights[0] * channels * (obpc/8) ); data/iipimage-1.1/src/KakaduImage.cc:705: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. else memcpy( d, buffer, tw*th*channels * (obpc/8) ); data/iipimage-1.1/src/Logger.h:50:8: [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). void open(){ data/iipimage-1.1/src/Logger.h:114:8: [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). void open( std::string file ){ data/iipimage-1.1/src/Logger.h:121:21: [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). _syslogStream.open(); data/iipimage-1.1/src/Logger.h:127:16: [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). _fstream.open( file.c_str(), ios_base::app ); data/iipimage-1.1/src/Main.cc:66: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/iipimage-1.1/src/Main.cc:188:13: [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). logfile.open( lf ); data/iipimage-1.1/src/Main.cc:237:37: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if( bklg.length() ) backlog = atoi( bklg.c_str() ); data/iipimage-1.1/src/Main.cc:529: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). FILE *f = fopen( "test.jpg", "w" ); data/iipimage-1.1/src/OBJ.cc:199: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 val[8]; data/iipimage-1.1/src/OBJ.cc:215: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 val[8]; data/iipimage-1.1/src/OBJ.cc:231: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 val[24]; data/iipimage-1.1/src/OBJ.cc:254: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 val[32]; data/iipimage-1.1/src/OBJ.cc:293: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 tmp[41]; data/iipimage-1.1/src/PFL.cc:52: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). resolution = atoi( arg.substr(0,delimitter).c_str() ); data/iipimage-1.1/src/PFL.cc:56:8: [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). x1 = atoi( arg.substr(0,delimitter).c_str() ); data/iipimage-1.1/src/PFL.cc:60:8: [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). y1 = atoi( arg.substr(0,delimitter).c_str() ); data/iipimage-1.1/src/PFL.cc:70:10: [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). x2 = atoi( arg.substr(0,delimitter).c_str() ); data/iipimage-1.1/src/PFL.cc:73:10: [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). y2 = atoi( arg.substr(0,arg.length()).c_str() ); data/iipimage-1.1/src/PFL.cc:197: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 str[1024]; data/iipimage-1.1/src/RawTile.h:175: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( data, tile.data, dataLength ); data/iipimage-1.1/src/RawTile.h:215: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( data, tile.data, dataLength ); data/iipimage-1.1/src/SPECTRA.cc:49: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). resolution = atoi( arg.substr(0,delimitter).c_str() ); data/iipimage-1.1/src/SPECTRA.cc:53:10: [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). tile = atoi( arg.substr(0,delimitter).c_str() ); data/iipimage-1.1/src/SPECTRA.cc:57:7: [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). x = atoi( arg.substr(0,delimitter).c_str() ); data/iipimage-1.1/src/SPECTRA.cc:61:7: [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). y = atoi( arg.substr(0,arg.length()).c_str() ); data/iipimage-1.1/src/SPECTRA.cc:88: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 str[1024]; data/iipimage-1.1/src/SPECTRA.cc:152:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[1024]; data/iipimage-1.1/src/TIL.cc:47: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). resolution = atoi( tmp.c_str() ); data/iipimage-1.1/src/TIL.cc:52: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). start_tile = atoi( tmp.c_str() ); data/iipimage-1.1/src/TIL.cc:57: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). end_tile = atoi( tmp.c_str() ); data/iipimage-1.1/src/TIL.cc:112: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 str[1024]; data/iipimage-1.1/src/TIL.cc:155: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 compType[4] = { 0x00,0x00,0x00,0x00 }; data/iipimage-1.1/src/TIL.cc:169: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 buf[1024]; data/iipimage-1.1/src/TIL.cc:195: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 compSubType[4] = { 0x00,0x11,0x00,0x00 }; data/iipimage-1.1/src/Task.cc:86:18: [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 factor = atoi( argument.c_str() ); data/iipimage-1.1/src/Task.cc:109: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). session->view->xangle = atoi( tmp.c_str() ); data/iipimage-1.1/src/Task.cc:114: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). session->view->yangle = atoi( tmp.c_str() ); data/iipimage-1.1/src/Task.cc:129: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 nchan = atoi( tmp.c_str() ) - 1; data/iipimage-1.1/src/Task.cc:213:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int requested_width = atoi( argument.c_str() ); data/iipimage-1.1/src/Task.cc:225: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). int requested_height = atoi( argument.c_str() ); data/iipimage-1.1/src/Task.cc:306:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). values[i++] = atoi( izer.nextToken().c_str() ); data/iipimage-1.1/src/Task.cc:334:20: [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 resolution = atoi( argument.substr( 0, delimitter ).c_str() ); data/iipimage-1.1/src/Task.cc:335:14: [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 tile = atoi( argument.substr( delimitter + 1, argument.length() ).c_str() ); data/iipimage-1.1/src/Task.cc:358:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). values[i++] = atoi( izer.nextToken().c_str() ); data/iipimage-1.1/src/Task.cc:411:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int layer = atoi( argument.c_str() ); data/iipimage-1.1/src/TileManager.cc:135:45: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. unsigned char* src_ptr = (unsigned char*) memcpy( buffer, ttt->data, len ); data/iipimage-1.1/src/TileManager.cc:141:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( dst_ptr, src_ptr, len ); data/iipimage-1.1/src/TileManager.cc:461: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( &buf[buffer_index], &ptr[inx], dst_tile_width*channels ); data/iipimage-1.1/src/TileManager.cc:466: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( &buf[buffer_index], &ptr[inx], dst_tile_width*channels*2 ); data/iipimage-1.1/src/TileManager.cc:471: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( &buf[buffer_index], &ptr[inx], dst_tile_width*channels*4 ); data/iipimage-1.1/src/TileManager.cc:476: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( &buf[buffer_index], &ptr[inx], dst_tile_width*channels*4 ); data/iipimage-1.1/src/Transforms.cc:331:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char q[3]; data/iipimage-1.1/src/Writer.h:71: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( &buffer[sz], msg, len ); data/iipimage-1.1/src/Zoomify.cc:106: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 str[1024]; data/iipimage-1.1/src/Zoomify.cc:127:43: [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). if( izer.hasMoreTokens() ) resolution = atoi( izer.nextToken().c_str() ); data/iipimage-1.1/src/Zoomify.cc:128:34: [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). if( izer.hasMoreTokens() ) x = atoi( izer.nextToken().c_str() ); data/iipimage-1.1/src/Zoomify.cc:129:34: [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). if( izer.hasMoreTokens() ) y = atoi( izer.nextToken().c_str() ); data/iipimage-1.1/fcgi/include/fcgi_stdio.h:178:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #undef fgetc data/iipimage-1.1/fcgi/include/fcgi_stdio.h:179:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define fgetc FCGI_fgetc data/iipimage-1.1/fcgi/include/fcgi_stdio.h:180:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #undef getc data/iipimage-1.1/fcgi/include/fcgi_stdio.h:181:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define getc FCGI_fgetc data/iipimage-1.1/fcgi/include/fcgi_stdio.h:182:9: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #undef getchar data/iipimage-1.1/fcgi/include/fcgi_stdio.h:183:9: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define getchar FCGI_getchar data/iipimage-1.1/fcgi/libfcgi/fcgi_stdio.c:453:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return fgetc(fp->stdio_stream); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:88: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). int strLen = strlen(str); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:358:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return FCGX_PutStr(str, strlen(str), stream); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:437: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). fStop = f + strlen(f); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:517:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fmtBuffPtr += strlen(fmtBuffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:546:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fmtBuffPtr += strlen(fmtBuffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:598: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). buffReqd = strlen(charPtrArg); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:676:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:681:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:686:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:700:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:705:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:710:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:721:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:738:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:742:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:761: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). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:790:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:794:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:808:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:813:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buffCount = strlen(buffPtr); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:1110:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name); data/iipimage-1.1/fcgi/libfcgi/fcgiapp.c:1482:23: [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(name); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:239:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int bindPathLen = strlen(bindPath); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:460:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return(read(fd, buf, len)); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:772:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (rv > 0 && read(fd, trash, sizeof(trash)) > 0); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:886:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(aioPtr->fd, aioPtr->buf, aioPtr->len); data/iipimage-1.1/fcgi/libfcgi/os_unix.c:924: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). char * sdup = (char *) malloc(strlen(str) + 1); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:655:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, p, 6); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:696:66: [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 (port && *bindPath != ':' && strncmp(bindPath, LOCALHOST, strlen(LOCALHOST))) data/iipimage-1.1/fcgi/libfcgi/os_win32.c:747: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). char *pipePath = malloc(strlen(bindPathPrefix) + strlen(bindPath) + 1); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:747:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *pipePath = malloc(strlen(bindPathPrefix) + strlen(bindPath) + 1); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:824:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(host, bindPath, len); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:867: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). char *pipePath = malloc(strlen(bindPathPrefix) + strlen(bindPath) + 1); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:867:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *pipePath = malloc(strlen(bindPathPrefix) + strlen(bindPath) + 1); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:1524: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). p += strlen(ipaddr); data/iipimage-1.1/fcgi/libfcgi/os_win32.c:1530: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). p += strlen(ipaddr) + 1; data/iipimage-1.1/src/Main.cc:74:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l=strlen(env_name); data/iipimage-1.1/src/Writer.h:97: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). cpy2buf( msg, strlen(msg) ); data/iipimage-1.1/src/Writer.h:101: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). cpy2buf( msg, strlen(msg) ); data/iipimage-1.1/windows/Time.cc:163:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (strs[i]); ANALYSIS SUMMARY: Hits = 292 Lines analyzed = 22224 in approximately 0.65 seconds (34432 lines/second) Physical Source Lines of Code (SLOC) = 11777 Hits@level = [0] 58 [1] 47 [2] 138 [3] 34 [4] 71 [5] 2 Hits@level+ = [0+] 350 [1+] 292 [2+] 245 [3+] 107 [4+] 73 [5+] 2 Hits/KSLOC@level+ = [0+] 29.7189 [1+] 24.7941 [2+] 20.8033 [3+] 9.08551 [4+] 6.19852 [5+] 0.169823 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.