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/beads-1.1.20/src/ConfigFile/ConfigFile.cpp Examining data/beads-1.1.20/src/ConfigFile/ConfigFile.h Examining data/beads-1.1.20/src/beads.cpp Examining data/beads-1.1.20/src/beads.h Examining data/beads-1.1.20/src/cimg/CImg.h Examining data/beads-1.1.20/src/detection.cpp Examining data/beads-1.1.20/src/detection.h Examining data/beads-1.1.20/src/encode/base64.cpp Examining data/beads-1.1.20/src/encode/base64.h Examining data/beads-1.1.20/src/images/imageCode.h Examining data/beads-1.1.20/src/images/imageConfluent.cpp Examining data/beads-1.1.20/src/images/imageConfluent.h Examining data/beads-1.1.20/src/images/imageContours.cpp Examining data/beads-1.1.20/src/images/imageContours.h Examining data/beads-1.1.20/src/images/imageCoule.cpp Examining data/beads-1.1.20/src/images/imageCoule.h Examining data/beads-1.1.20/src/images/imageDeNovo.cpp Examining data/beads-1.1.20/src/images/imageDeNovo.h Examining data/beads-1.1.20/src/images/imageDetection.cpp Examining data/beads-1.1.20/src/images/imageDetection.h Examining data/beads-1.1.20/src/images/imageDirect.cpp Examining data/beads-1.1.20/src/images/imageDirect.h Examining data/beads-1.1.20/src/images/imageIntensity.cpp Examining data/beads-1.1.20/src/images/imageIntensity.h Examining data/beads-1.1.20/src/images/imageNumber.cpp Examining data/beads-1.1.20/src/images/imageNumber.h Examining data/beads-1.1.20/src/images/imagePaths.cpp Examining data/beads-1.1.20/src/images/imagePaths.h Examining data/beads-1.1.20/src/images/imageProb.cpp Examining data/beads-1.1.20/src/images/imageProb.h Examining data/beads-1.1.20/src/images/parameterConfluent.cpp Examining data/beads-1.1.20/src/images/parameterConfluent.h Examining data/beads-1.1.20/src/images/parameterDirect.h Examining data/beads-1.1.20/src/images/parameterNumber.cpp Examining data/beads-1.1.20/src/images/parameterNumber.h Examining data/beads-1.1.20/src/images/parameterProb.cpp Examining data/beads-1.1.20/src/images/parameterProb.h Examining data/beads-1.1.20/src/parameterDetection.cpp Examining data/beads-1.1.20/src/parameterDetection.h Examining data/beads-1.1.20/src/parameters.cpp Examining data/beads-1.1.20/src/parameters.h Examining data/beads-1.1.20/src/qtbeads/QCimg.cpp Examining data/beads-1.1.20/src/qtbeads/QCimg.h Examining data/beads-1.1.20/src/qtbeads/beads_results.cpp Examining data/beads-1.1.20/src/qtbeads/beads_results.h Examining data/beads-1.1.20/src/qtbeads/main_window.cpp Examining data/beads-1.1.20/src/qtbeads/main_window.h Examining data/beads-1.1.20/src/qtbeads/properties.cpp Examining data/beads-1.1.20/src/qtbeads/properties.h Examining data/beads-1.1.20/src/qtbeads/q_gel_image.cpp Examining data/beads-1.1.20/src/qtbeads/q_gel_image.h Examining data/beads-1.1.20/src/qtbeads/q_gel_image_scroll.cpp Examining data/beads-1.1.20/src/qtbeads/q_gel_image_scroll.h Examining data/beads-1.1.20/src/qtbeads/qtbeads.cpp Examining data/beads-1.1.20/src/qtbeads/qtbeads_error.h Examining data/beads-1.1.20/src/spot.cpp Examining data/beads-1.1.20/src/spot.h Examining data/beads-1.1.20/src/spotDocument.cpp Examining data/beads-1.1.20/src/spotDocument.h Examining data/beads-1.1.20/src/spotPROTICdbDocument.cpp Examining data/beads-1.1.20/src/spotPROTICdbDocument.h Examining data/beads-1.1.20/src/spotSvgDocument.cpp Examining data/beads-1.1.20/src/spotSvgDocument.h FINAL RESULTS: data/beads-1.1.20/src/cimg/CImg.h:140:26: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. #define cimg_sscanf std::sscanf data/beads-1.1.20/src/cimg/CImg.h:141:27: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define cimg_sprintf std::sprintf data/beads-1.1.20/src/cimg/CImg.h:142:29: [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 cimg_snprintf cimg::_snprintf data/beads-1.1.20/src/cimg/CImg.h:149:29: [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 cimg_snprintf cimg::_snprintf data/beads-1.1.20/src/cimg/CImg.h:152:26: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. #define cimg_sscanf std::sscanf data/beads-1.1.20/src/cimg/CImg.h:153:27: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define cimg_sprintf std::sprintf data/beads-1.1.20/src/cimg/CImg.h:154:23: [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 cimg_snprintf snprintf data/beads-1.1.20/src/cimg/CImg.h:155:24: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define cimg_vsnprintf vsnprintf data/beads-1.1.20/src/cimg/CImg.h:2267:16: [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. inline int _snprintf(char *const s, const size_t size, const char *const format, ...) { data/beads-1.1.20/src/cimg/CImg.h:2291:31: [4] (buffer) vsscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. const int result = std::vsscanf(s,format,args); data/beads-1.1.20/src/cimg/CImg.h:2301:31: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. const int result = std::vsprintf(s,format,args); data/beads-1.1.20/src/cimg/CImg.h:2307:16: [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. inline int _snprintf(char *const s, const size_t n, const char *const format, ...) { data/beads-1.1.20/src/cimg/CImg.h:2311:31: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. const int result = std::vsnprintf(s,n,format,args); data/beads-1.1.20/src/cimg/CImg.h:2319:31: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. const int result = std::vsnprintf(s,size,format,ap); data/beads-1.1.20/src/cimg/CImg.h:4845:16: [4] (shell) system: 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. inline int system(const char *const command, const char *const module_name=0) { data/beads-1.1.20/src/cimg/CImg.h:4856:34: [4] (shell) system: 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. const int out_val = std::system(ncommand); data/beads-1.1.20/src/cimg/CImg.h:4875:26: [4] (shell) system: 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. } else return std::system(command); data/beads-1.1.20/src/cimg/CImg.h:4877:19: [4] (shell) system: 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. return std::system(command); data/beads-1.1.20/src/cimg/CImg.h:5955:26: [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). if (ls<=nl) { std::strcpy(res,str); return res; } data/beads-1.1.20/src/cimg/CImg.h:6110:56: [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). if (GetShortPathNameA(str,nstr,MAX_PATH)) std::strcpy(str,nstr); data/beads-1.1.20/src/cimg/CImg.h:6315:24: [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). if (body) std::strcpy(body,filename); data/beads-1.1.20/src/cimg/CImg.h:50126: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. file = popen(command,"r"); data/beads-1.1.20/src/cimg/CImg.h:50150:13: [4] (shell) system: 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. cimg::system(command,cimg::graphicsmagick_path()); data/beads-1.1.20/src/cimg/CImg.h:50203:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:50240: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. file = popen(command,"r"); data/beads-1.1.20/src/cimg/CImg.h:50266:13: [4] (shell) system: 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. cimg::system(command,cimg::imagemagick_path()); data/beads-1.1.20/src/cimg/CImg.h:50306:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:50351: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. file = popen(command,"r"); data/beads-1.1.20/src/cimg/CImg.h:50374:13: [4] (shell) system: 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. cimg::system(command,cimg::dcraw_path()); data/beads-1.1.20/src/cimg/CImg.h:51788:14: [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. std::fprintf(nfile,cimg::type<T>::format(),cimg::type<T>::format((*this)[off])); data/beads-1.1.20/src/cimg/CImg.h:52960:14: [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). std::strcpy(hname,filename); data/beads-1.1.20/src/cimg/CImg.h:52965:14: [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). std::strcpy(hname,filename); data/beads-1.1.20/src/cimg/CImg.h:53679:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:53736:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:53791:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:53829:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:57343:13: [4] (shell) system: 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. cimg::system(command,0); data/beads-1.1.20/src/cimg/CImg.h:57419:13: [4] (shell) system: 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. cimg::system(command,0); data/beads-1.1.20/src/cimg/CImg.h:57483:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:57954:13: [4] (shell) system: 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. cimg::system(_command); data/beads-1.1.20/src/cimg/CImg.h:58350:15: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:58547:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:59798:11: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:59818:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/cimg/CImg.h:59830:13: [4] (shell) system: 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. cimg::system(command); data/beads-1.1.20/src/qtbeads/qtbeads.cpp:8:31: [4] (shell) system: 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. QLocale::setDefault(QLocale::system()); data/beads-1.1.20/src/cimg/CImg.h:5103:17: [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. inline void srand() { data/beads-1.1.20/src/cimg/CImg.h:5114:17: [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. inline void srand(const unsigned int seed) { data/beads-1.1.20/src/cimg/CImg.h:5126:17: [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. inline void srand() { data/beads-1.1.20/src/cimg/CImg.h:5129:12: [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. std::srand(t + (unsigned int)getpid()); data/beads-1.1.20/src/cimg/CImg.h:5131:12: [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. std::srand(t + (unsigned int)_getpid()); data/beads-1.1.20/src/cimg/CImg.h:5133:12: [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. std::srand(t); data/beads-1.1.20/src/cimg/CImg.h:5137:17: [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. inline void srand(const unsigned int seed) { data/beads-1.1.20/src/cimg/CImg.h:5138:12: [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. std::srand(seed); data/beads-1.1.20/src/cimg/CImg.h:6076:29: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. *const _str1 = std::getenv("OSTYPE"), data/beads-1.1.20/src/cimg/CImg.h:6077:41: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. *const _str2 = _str1?_str1:std::getenv("OS"), data/beads-1.1.20/src/cimg/CImg.h:6094:13: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. cimg::srand(); data/beads-1.1.20/src/cimg/CImg.h:58992:28: [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 *tmpPath = std::getenv("TMP"); data/beads-1.1.20/src/cimg/CImg.h:58993:38: [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 (!tmpPath) { tmpPath = std::getenv("TEMP"); winformat_string(tmpPath); } data/beads-1.1.20/src/cimg/CImg.h:59042:41: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *const pfPath = std::getenv("PROGRAMFILES"); data/beads-1.1.20/src/beads.cpp:33:18: [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). param_stream.open(filename.c_str()); data/beads-1.1.20/src/beads.cpp:86: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). in.open(filename.c_str()); data/beads-1.1.20/src/beads.cpp:331:25: [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). proticdbml_file.open(source_filename); data/beads-1.1.20/src/beads.cpp:339: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 (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { data/beads-1.1.20/src/beads.cpp:346: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). fspot.open(); data/beads-1.1.20/src/beads.cpp:362:26: [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). svg_file.open(source_filename); data/beads-1.1.20/src/beads.cpp:553:29: [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). proticdbml_file.open(outfile); data/beads-1.1.20/src/beads.cpp:566: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). fspot.open(); data/beads-1.1.20/src/beads.cpp:577:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { data/beads-1.1.20/src/beads.cpp:584: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). fspot.open(); data/beads-1.1.20/src/beads.cpp:636:22: [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). svg_file.open(outfile); data/beads-1.1.20/src/cimg/CImg.h:356:24: [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 std_fopen std::fopen data/beads-1.1.20/src/cimg/CImg.h:4744: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 logo40x38[4576] = { data/beads-1.1.20/src/cimg/CImg.h:4855:14: [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. std::strcpy(ncommand + l," 2> /dev/null"); // Make command silent. data/beads-1.1.20/src/cimg/CImg.h:4987:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&tmp,&f,sizeof(float)); data/beads-1.1.20/src/cimg/CImg.h:4991:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&u,&f,sizeof(float)); data/beads-1.1.20/src/cimg/CImg.h:5000:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&f,&v,sizeof(float)); data/beads-1.1.20/src/cimg/CImg.h:5935:27: [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. if (is_ending) std::strcpy(str + nl - 5,"(...)"); data/beads-1.1.20/src/cimg/CImg.h:5938:14: [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. std::strcpy(str + ll,"(...)"); data/beads-1.1.20/src/cimg/CImg.h:5958:14: [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. std::strcpy(res + nl -5,"(...)"); data/beads-1.1.20/src/cimg/CImg.h:5962:14: [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. std::strcpy(res + ll,"(...)"); data/beads-1.1.20/src/cimg/CImg.h:6093:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char randomid[9]; data/beads-1.1.20/src/cimg/CImg.h:6127:23: [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). inline std::FILE *fopen(const char *const path, const char *const mode) { data/beads-1.1.20/src/cimg/CImg.h:6319:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (body) { if (l) std::memcpy(body,filename,l); body[l] = 0; } data/beads-1.1.20/src/cimg/CImg.h:6400:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:6461:30: [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). const int res = s?std::atoi(s):defaut; data/beads-1.1.20/src/cimg/CImg.h:6473: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 tmp[8]; data/beads-1.1.20/src/cimg/CImg.h:8003:35: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for ( ; !dy && y<hd; std::memcpy(ptrd,ptrd - wd,sizeof(t)*wd), ++y, ptrd+=wd, dy = *(poffy++)) {} data/beads-1.1.20/src/cimg/CImg.h:8561: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 keys_return[32]; // Check that the key has been physically unpressed. data/beads-1.1.20/src/cimg/CImg.h:8861: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. if (s) std::memcpy(tmp_title,nptitle,s*sizeof(char)); data/beads-1.1.20/src/cimg/CImg.h:9077:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,disp._data,(cimg::X11_attr().nb_bits==8?sizeof(unsigned char): data/beads-1.1.20/src/cimg/CImg.h:9124:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(image_data,_data,buf_size); data/beads-1.1.20/src/cimg/CImg.h:9126:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,image_data,buf_size); data/beads-1.1.20/src/cimg/CImg.h:9182:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char pix_data[8] = { 0 }; data/beads-1.1.20/src/cimg/CImg.h:9216:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_title,tmp,s*sizeof(char)); data/beads-1.1.20/src/cimg/CImg.h:10017: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. if (s) std::memcpy(tmp_title,nptitle,s*sizeof(char)); data/beads-1.1.20/src/cimg/CImg.h:10106:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,disp._data,sizeof(unsigned int)*_width*_height); data/beads-1.1.20/src/cimg/CImg.h:10151:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(odata,_data,buf_size); data/beads-1.1.20/src/cimg/CImg.h:10153:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,odata,buf_size); data/beads-1.1.20/src/cimg/CImg.h:10230:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_title,tmp,s*sizeof(char)); data/beads-1.1.20/src/cimg/CImg.h:11046:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,values,siz*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:11129:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,img._data,siz*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:11190:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,img._data,siz*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:11372: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. else std::memcpy(_data,values,siz*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:11383:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(new_data,values,siz*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:15998:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16010:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16032:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16051:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16080:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16170:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16188:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16240:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16253:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16276:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16296:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16318:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16881:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (is_sth && p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16893:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (is_sth && p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16915:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (is_sth && p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16934:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (is_sth && p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:16955:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (is_sth && p_ref) std::memcpy(p_ref,ref,ref._width*sizeof(unsigned int)); data/beads-1.1.20/src/cimg/CImg.h:19052:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_expr._data + k,variable_name,variable_name._width - 1); data/beads-1.1.20/src/cimg/CImg.h:19143:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy((char*)_opcode[1]._data,variable_name,arg1); data/beads-1.1.20/src/cimg/CImg.h:19164:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy((char*)_opcode[1]._data,variable_name,arg1); data/beads-1.1.20/src/cimg/CImg.h:19399:16: [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. std::sprintf(res._data + 6,"%u",_cimg_mp_vector_size(arg)); data/beads-1.1.20/src/cimg/CImg.h:19869:21: [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 std::memcpy(&_mp_arg(1) + 1,&_mp_arg(ind + 4) + 1,siz*sizeof(double)); data/beads-1.1.20/src/cimg/CImg.h:20445:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (vsiz) std::memcpy(&mp.mem[vtarget] + 1,&mp.mem[is_cond?mem_left:mem_right] + 1,sizeof(double)*vsiz); data/beads-1.1.20/src/cimg/CImg.h:21658:68: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (ptrs + siz - 1<ptrd || ptrs>ptrd + siz - 1) std::memcpy(ptrd,ptrs,siz*sizeof(double)); data/beads-1.1.20/src/cimg/CImg.h:21686:68: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (ptrs + siz - 1<ptrd || ptrs>ptrd + siz - 1) std::memcpy(ptrd,ptrs,siz*sizeof(float)); data/beads-1.1.20/src/cimg/CImg.h:22319:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&_mp_arg(1) + 1,&_mp_arg(2) + 1,sizeof(double)*mp.opcode[3]); data/beads-1.1.20/src/cimg/CImg.h:22335:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(ptrd,ptrs + start,sublength*sizeof(double)); data/beads-1.1.20/src/cimg/CImg.h:24959:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(vec.data(0,k),tmp._data,sizeof(t)*_width); data/beads-1.1.20/src/cimg/CImg.h:25262:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(U.data(0,k),tmp._data,sizeof(t)*_width); data/beads-1.1.20/src/cimg/CImg.h:25266:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(V.data(0,k),tmp._data,sizeof(t)*_width); data/beads-1.1.20/src/cimg/CImg.h:26589:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(res._data + k,_data + i0,(i - i0 + 1)*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:26594:36: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if ((ulongT)i0<siz) { std::memcpy(res._data + k,_data + i0,(siz - i0)*sizeof(T)); k+=siz - i0; } data/beads-1.1.20/src/cimg/CImg.h:28741:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(res.assign(sx,sy,sz,sc,(T)0)._data,_data,sizeof(T)*std::min(size(),(ulongT)sx*sy*sz*sc)); data/beads-1.1.20/src/cimg/CImg.h:28891:41: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for ( ; !dy && y<dy; std::memcpy(ptrd,ptrd - sx,sizeof(T)*sx), ++y, ptrd+=sx, dy = *(poff_y++)) {} data/beads-1.1.20/src/cimg/CImg.h:28896:39: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for ( ; !dz && z<dz; std::memcpy(ptrd,ptrd-sxy,sizeof(T)*sxy), ++z, ptrd+=sxy, dz = *(poff_z++)) {} data/beads-1.1.20/src/cimg/CImg.h:28901:37: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for ( ; !dc && c<dc; std::memcpy(ptrd,ptrd-sxyz,sizeof(T)*sxyz), ++c, ptrd+=sxyz, dc = *(poff_c++)) {} data/beads-1.1.20/src/cimg/CImg.h:29818:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,pf,_width*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29819:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pf,pb,_width*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29820:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pb,buf,_width*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29834:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,pf,_width*_height*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29835:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pf,pb,_width*_height*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29836:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pb,buf,_width*_height*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29849:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,pf,_width*_height*_depth*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29850:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pf,pb,_width*_height*_depth*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29851:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pb,buf,_width*_height*_depth*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29910:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,data(0,y,z,c),ndelta_x*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29912:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(data(_width-ndelta_x,y,z,c),buf,ndelta_x*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29914:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,data(_width + ndelta_x,y,z,c),-ndelta_x*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29916:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(data(0,y,z,c),buf,-ndelta_x*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29958:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,data(0,0,z,c),_width*ndelta_y*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29960:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(data(0,_height-ndelta_y,z,c),buf,_width*ndelta_y*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29962:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,data(0,_height + ndelta_y,z,c),-ndelta_y*_width*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29964:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(data(0,0,z,c),buf,-ndelta_y*_width*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:29974:59: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for (int l = 0; l<ndelta_y - 1; ++l) { std::memcpy(ptrd,ptrs,_width*sizeof(T)); ptrd+=_width; } data/beads-1.1.20/src/cimg/CImg.h:29982:59: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for (int l = 0; l<ndelta_y - 1; ++l) { std::memcpy(ptrd,ptrs,_width*sizeof(T)); ptrd+=_width; } data/beads-1.1.20/src/cimg/CImg.h:30004:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,data(0,0,0,c),_width*_height*ndelta_z*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30006:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(data(0,0,_depth-ndelta_z,c),buf,_width*_height*ndelta_z*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30008:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,data(0,0,_depth + ndelta_z,c),-ndelta_z*_width*_height*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30010:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(data(0,0,0,c),buf,-ndelta_z*_width*_height*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30021:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(ptrd,ptrs,_width*_height*sizeof(T)); ptrd+=(ulongT)_width*_height; data/beads-1.1.20/src/cimg/CImg.h:30031:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(ptrd,ptrs,_width*_height*sizeof(T)); ptrd+=(ulongT)_width*_height; data/beads-1.1.20/src/cimg/CImg.h:30054:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,_data,_width*_height*_depth*ndelta_c*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30056:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(data(0,0,0,_spectrum-ndelta_c),buf,_width*_height*_depth*ndelta_c*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30058:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(buf,data(0,0,0,_spectrum + ndelta_c),-ndelta_c*_width*_height*_depth*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30060:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(_data,buf,-ndelta_c*_width*_height*_depth*sizeof(T)); data/beads-1.1.20/src/cimg/CImg.h:30070:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(ptrd,ptrs,_width*_height*_depth*sizeof(T)); ptrd+=(ulongT)_width*_height*_depth; data/beads-1.1.20/src/cimg/CImg.h:30078:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(ptrd,_data,_width*_height*_depth*sizeof(T)); ptrd+=(ulongT)_width*_height*_depth; data/beads-1.1.20/src/cimg/CImg.h:30121: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 s_code[4] = { 0,1,2,3 }, n_code[4] = { 0 }; data/beads-1.1.20/src/cimg/CImg.h:43791:49: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for (int y = 0; y<lY; ++y) { std::memcpy(ptrd,ptrs,slX); ptrd+=_width; ptrs+=sprite._width; } data/beads-1.1.20/src/cimg/CImg.h:46955:22: [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. std::strcpy(text._data + std::strlen(text),"] "); data/beads-1.1.20/src/cimg/CImg.h:47472:32: [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). std::FILE *file = std::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:47549:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:47611:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"r"); data/beads-1.1.20/src/cimg/CImg.h:47669:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:47864: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 message[JMSG_LENGTH_MAX]; data/beads-1.1.20/src/cimg/CImg.h:47891:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:48076:51: [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). std::FILE *volatile nfile = file?file:cimg::fopen(nfilename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:48078: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 pngCheck[8] = { 0 }; data/beads-1.1.20/src/cimg/CImg.h:48259:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:48461:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:48555:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:48611:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49011:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rdr.open(filename); data/beads-1.1.20/src/cimg/CImg.h:49069:32: [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). nfile_header = cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49071:25: [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). nfile = cimg::fopen(body,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49073:25: [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). nfile = cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49075:32: [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). nfile_header = cimg::fopen(body,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49076:45: [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). } else nfile_header = nfile = cimg::fopen(filename,"rb"); // File is a Niftii file. data/beads-1.1.20/src/cimg/CImg.h:49374:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49500:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49756:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:49864:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"r"); data/beads-1.1.20/src/cimg/CImg.h:50119:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:50152: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). cimg::fclose(cimg::fopen(filename,"r")); data/beads-1.1.20/src/cimg/CImg.h:50178:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:50205: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). cimg::fclose(cimg::fopen(filename,"r")); data/beads-1.1.20/src/cimg/CImg.h:50231:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:50268: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). cimg::fclose(cimg::fopen(filename,"r")); data/beads-1.1.20/src/cimg/CImg.h:50294:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:50296:26: [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). cimg::fclose(cimg::fopen(filename,"r")); data/beads-1.1.20/src/cimg/CImg.h:50344:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:50376: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). cimg::fclose(cimg::fopen(filename,"r")); data/beads-1.1.20/src/cimg/CImg.h:50495:35: [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). std::fclose(cimg::fopen(filename,"rb")); data/beads-1.1.20/src/cimg/CImg.h:51451:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pose_matrix,pose._data,12*sizeof(float)); data/beads-1.1.20/src/cimg/CImg.h:51749:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"w"); data/beads-1.1.20/src/cimg/CImg.h:51778:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"w"); data/beads-1.1.20/src/cimg/CImg.h:51827:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"w"); data/beads-1.1.20/src/cimg/CImg.h:51867:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:51869: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 align_buf[4] = { 0 }; data/beads-1.1.20/src/cimg/CImg.h:51991:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:52161:51: [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). std::FILE *volatile nfile = file?file:cimg::fopen(nfilename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:52377:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:52501:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:52577:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:52659:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:52721:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:52917:12: [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). wtr.open(filename, imitate_file); data/beads-1.1.20/src/cimg/CImg.h:52924:12: [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). wtr.open(filename,di,1,NC_FLOAT,0); data/beads-1.1.20/src/cimg/CImg.h:52976:12: [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. std::strcpy(header._data + 4,"CImg"); data/beads-1.1.20/src/cimg/CImg.h:53012:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = cimg::fopen(hname,"wb"); data/beads-1.1.20/src/cimg/CImg.h:53014:54: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (*iname) { cimg::fclose(file); file = cimg::fopen(iname,"wb"); } data/beads-1.1.20/src/cimg/CImg.h:53143:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:53151:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(header._data + 252,"##}\n",4); data/beads-1.1.20/src/cimg/CImg.h:53331:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:53332: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 header[36] = { 'P','A','N','D','O','R','E','0','4',0,0,0, data/beads-1.1.20/src/cimg/CImg.h:53456:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:53540:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"w"); data/beads-1.1.20/src/cimg/CImg.h:53840:30: [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). cimg::fclose(cimg::fopen(filename,"r")); data/beads-1.1.20/src/cimg/CImg.h:55716:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (npos) std::memcpy(new_data,_data,sizeof(CImg<T>)*npos); data/beads-1.1.20/src/cimg/CImg.h:55717:38: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (npos!=_width - 1) std::memcpy(new_data + npos + 1,_data + npos,sizeof(CImg<T>)*(_width - 1 - npos)); data/beads-1.1.20/src/cimg/CImg.h:55754:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (npos) std::memcpy(new_data,_data,sizeof(CImg<T>)*npos); data/beads-1.1.20/src/cimg/CImg.h:55755:38: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (npos!=_width - 1) std::memcpy(new_data + npos + 1,_data + npos,sizeof(CImg<T>)*(_width - 1 - npos)); data/beads-1.1.20/src/cimg/CImg.h:55913:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (npos1) std::memcpy(new_data,_data,sizeof(CImg<T>)*npos1); data/beads-1.1.20/src/cimg/CImg.h:55914:35: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (npos1!=_width) std::memcpy(new_data + npos1,_data + npos2 + 1,sizeof(CImg<T>)*(_width - npos1)); data/beads-1.1.20/src/cimg/CImg.h:56547:38: [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). std::FILE *const file = std::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:56671:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:56854:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:56938:31: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). std::FILE *file = cimg::fopen(filenamepar,"r"); data/beads-1.1.20/src/cimg/CImg.h:56965:32: [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). std::FILE *file2 = cimg::fopen(filenamerec,"rb"); data/beads-1.1.20/src/cimg/CImg.h:57092:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); data/beads-1.1.20/src/cimg/CImg.h:57230:29: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). std::fclose(cimg::fopen(filename,"rb")); // Check file availability. data/beads-1.1.20/src/cimg/CImg.h:57322:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:57379:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:57459:25: [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). std::fclose(cimg::fopen(filename,"rb")); // Check if file exists. data/beads-1.1.20/src/cimg/CImg.h:57485: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). cimg::fclose(cimg::fopen(filename,"r")); data/beads-1.1.20/src/cimg/CImg.h:57615: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 tmp[16] = { 0 }; data/beads-1.1.20/src/cimg/CImg.h:57979:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:58022:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:58151:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"rb+"); data/beads-1.1.20/src/cimg/CImg.h:58231:48: [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). std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); data/beads-1.1.20/src/cimg/CImg.h:58948:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int err = MultiByteToWideChar(CP_UTF8,0,path,-1,0,0); data/beads-1.1.20/src/cimg/CImg.h:58951:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). err = MultiByteToWideChar(CP_UTF8,0,path,-1,wpath,err); data/beads-1.1.20/src/cimg/CImg.h:58955:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). err = MultiByteToWideChar(CP_UTF8,0,mode,-1,0,0); data/beads-1.1.20/src/cimg/CImg.h:58958:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). err = MultiByteToWideChar(CP_UTF8,0,mode,-1,wmode,err); data/beads-1.1.20/src/cimg/CImg.h:59044:19: [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. else std::strcpy(s_path,"C:\\PROGRA~1"); data/beads-1.1.20/src/cimg/CImg.h:59047:12: [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. std::strcpy(s_path,"C:\\PROGRA~1"); data/beads-1.1.20/src/cimg/CImg.h:59075:14: [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. std::strcpy(s_path,".\\convert.exe"); data/beads-1.1.20/src/cimg/CImg.h:59150:29: [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. if (!path_found) std::strcpy(s_path,"convert.exe"); data/beads-1.1.20/src/cimg/CImg.h:59153:14: [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. std::strcpy(s_path,"./convert"); data/beads-1.1.20/src/cimg/CImg.h:59156:29: [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. if (!path_found) std::strcpy(s_path,"convert"); data/beads-1.1.20/src/cimg/CImg.h:59184:14: [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. std::strcpy(s_path,".\\gm.exe"); data/beads-1.1.20/src/cimg/CImg.h:59259:29: [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. if (!path_found) std::strcpy(s_path,"gm.exe"); data/beads-1.1.20/src/cimg/CImg.h:59262:14: [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. std::strcpy(s_path,"./gm"); data/beads-1.1.20/src/cimg/CImg.h:59265:29: [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. if (!path_found) std::strcpy(s_path,"gm"); data/beads-1.1.20/src/cimg/CImg.h:59293:14: [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. std::strcpy(s_path,".\\medcon.exe"); data/beads-1.1.20/src/cimg/CImg.h:59305:14: [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. std::strcpy(s_path,"C:\\XMedCon\\bin\\medcon.exe"); data/beads-1.1.20/src/cimg/CImg.h:59308:29: [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. if (!path_found) std::strcpy(s_path,"medcon.exe"); data/beads-1.1.20/src/cimg/CImg.h:59311:14: [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. std::strcpy(s_path,"./medcon"); data/beads-1.1.20/src/cimg/CImg.h:59314:29: [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. if (!path_found) std::strcpy(s_path,"medcon"); data/beads-1.1.20/src/cimg/CImg.h:59341:14: [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. std::strcpy(s_path,".\\ffmpeg.exe"); data/beads-1.1.20/src/cimg/CImg.h:59344:29: [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. if (!path_found) std::strcpy(s_path,"ffmpeg.exe"); data/beads-1.1.20/src/cimg/CImg.h:59347:14: [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. std::strcpy(s_path,"./ffmpeg"); data/beads-1.1.20/src/cimg/CImg.h:59350:29: [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. if (!path_found) std::strcpy(s_path,"ffmpeg"); data/beads-1.1.20/src/cimg/CImg.h:59377:14: [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. std::strcpy(s_path,".\\gzip.exe"); data/beads-1.1.20/src/cimg/CImg.h:59380:29: [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. if (!path_found) std::strcpy(s_path,"gzip.exe"); data/beads-1.1.20/src/cimg/CImg.h:59383:14: [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. std::strcpy(s_path,"./gzip"); data/beads-1.1.20/src/cimg/CImg.h:59386:29: [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. if (!path_found) std::strcpy(s_path,"gzip"); data/beads-1.1.20/src/cimg/CImg.h:59413:14: [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. std::strcpy(s_path,".\\gunzip.exe"); data/beads-1.1.20/src/cimg/CImg.h:59416:29: [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. if (!path_found) std::strcpy(s_path,"gunzip.exe"); data/beads-1.1.20/src/cimg/CImg.h:59419:14: [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. std::strcpy(s_path,"./gunzip"); data/beads-1.1.20/src/cimg/CImg.h:59422:29: [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. if (!path_found) std::strcpy(s_path,"gunzip"); data/beads-1.1.20/src/cimg/CImg.h:59449:14: [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. std::strcpy(s_path,".\\dcraw.exe"); data/beads-1.1.20/src/cimg/CImg.h:59452:29: [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. if (!path_found) std::strcpy(s_path,"dcraw.exe"); data/beads-1.1.20/src/cimg/CImg.h:59455:14: [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. std::strcpy(s_path,"./dcraw"); data/beads-1.1.20/src/cimg/CImg.h:59458:29: [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. if (!path_found) std::strcpy(s_path,"dcraw"); data/beads-1.1.20/src/cimg/CImg.h:59485:14: [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. std::strcpy(s_path,".\\wget.exe"); data/beads-1.1.20/src/cimg/CImg.h:59488:29: [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. if (!path_found) std::strcpy(s_path,"wget.exe"); data/beads-1.1.20/src/cimg/CImg.h:59491:14: [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. std::strcpy(s_path,"./wget"); data/beads-1.1.20/src/cimg/CImg.h:59494:29: [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. if (!path_found) std::strcpy(s_path,"wget"); data/beads-1.1.20/src/cimg/CImg.h:59521:14: [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. std::strcpy(s_path,".\\curl.exe"); data/beads-1.1.20/src/cimg/CImg.h:59524:29: [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. if (!path_found) std::strcpy(s_path,"curl.exe"); data/beads-1.1.20/src/cimg/CImg.h:59527:14: [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. std::strcpy(s_path,"./curl"); data/beads-1.1.20/src/cimg/CImg.h:59530:29: [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. if (!path_found) std::strcpy(s_path,"curl"); data/beads-1.1.20/src/cimg/CImg.h:59597:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(pattern,_path,lp); data/beads-1.1.20/src/cimg/CImg.h:59611:28: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (lp) { std::memcpy(full_filename,_path,lp); full_filename[lp] = '/'; } data/beads-1.1.20/src/cimg/CImg.h:59612:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(full_filename._data + (lp?lp + 1:0),filename,lf + 1); data/beads-1.1.20/src/cimg/CImg.h:59633:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (lp) std::memcpy(full_filename,_path,lp); data/beads-1.1.20/src/cimg/CImg.h:59635:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(full_filename._data + lp + 1,filename,lf + 1); data/beads-1.1.20/src/cimg/CImg.h:59754:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = cimg::fopen(filename_local,"wb"); data/beads-1.1.20/src/encode/base64.cpp:17:11: [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 char_array_3[3]; data/beads-1.1.20/src/encode/base64.cpp:18:11: [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 char_array_4[4]; data/beads-1.1.20/src/encode/base64.cpp:64:11: [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 char_array_4[4], char_array_3[3]; data/beads-1.1.20/src/images/imageDeNovo.cpp:89:6: [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). ifs.open(filename.toStdString().c_str(), ifstream::in); data/beads-1.1.20/src/qtbeads/beads_results.cpp:51: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). proticdbml_file.open(filename.filePath()); data/beads-1.1.20/src/qtbeads/beads_results.cpp:65:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { data/beads-1.1.20/src/qtbeads/beads_results.cpp:70:15: [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). fspot.open(); data/beads-1.1.20/src/qtbeads/beads_results.cpp:86:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fspot.open(); data/beads-1.1.20/src/qtbeads/beads_results.cpp:106:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). svg_file.open(filename.filePath()); data/beads-1.1.20/src/qtbeads/main_window.cpp:33: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). if (!input.open(QIODevice::ReadOnly)) { data/beads-1.1.20/src/qtbeads/main_window.cpp:38:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!output.open(QIODevice::WriteOnly)) { data/beads-1.1.20/src/qtbeads/properties.cpp:15:18: [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 (!param_file.open(QIODevice::WriteOnly | QIODevice::Text)) { data/beads-1.1.20/src/spotDocument.cpp:14:20: [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 spotDocument::open() { data/beads-1.1.20/src/spotDocument.h:24:18: [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). virtual void open(); data/beads-1.1.20/src/spotPROTICdbDocument.cpp:6:28: [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 spotPROTICdbDocument::open(const QString & filename) { data/beads-1.1.20/src/spotPROTICdbDocument.cpp:21:20: [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 (_output_file->open(QIODevice::WriteOnly)) { data/beads-1.1.20/src/spotPROTICdbDocument.h:17:7: [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(const QString & filename); data/beads-1.1.20/src/spotSvgDocument.cpp:21:23: [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 spotSvgDocument::open(const QString & filename) { data/beads-1.1.20/src/spotSvgDocument.cpp:36:20: [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 (_output_file->open(QIODevice::WriteOnly)) { data/beads-1.1.20/src/spotSvgDocument.h:16:7: [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(const QString & filename); data/beads-1.1.20/src/ConfigFile/ConfigFile.h:74:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<class T> T read( const string& key ) const; // call as read<T> data/beads-1.1.20/src/ConfigFile/ConfigFile.h:75:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<class T> T read( const string& key, const T& value ) const; data/beads-1.1.20/src/ConfigFile/ConfigFile.h:174:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). T ConfigFile::read( const string& key ) const data/beads-1.1.20/src/ConfigFile/ConfigFile.h:184:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). T ConfigFile::read( const string& key, const T& value ) const data/beads-1.1.20/src/cimg/CImg.h:2476:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t size = std::strlen(e._message); data/beads-1.1.20/src/cimg/CImg.h:2478:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(_message,e._message,size); data/beads-1.1.20/src/cimg/CImg.h:2483:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t size = std::strlen(e._message); data/beads-1.1.20/src/cimg/CImg.h:2485:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(_message,e._message,size); data/beads-1.1.20/src/cimg/CImg.h:2500:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t size = std::strlen(e._message); data/beads-1.1.20/src/cimg/CImg.h:2502:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(_message,e._message,size); data/beads-1.1.20/src/cimg/CImg.h:2507:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t size = std::strlen(e._message); data/beads-1.1.20/src/cimg/CImg.h:2509:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(_message,e._message,size); data/beads-1.1.20/src/cimg/CImg.h:4851:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int l = (unsigned int)std::strlen(command); data/beads-1.1.20/src/cimg/CImg.h:4854:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(ncommand,command,l); data/beads-1.1.20/src/cimg/CImg.h:5919:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l1 = (int)std::strlen(str1), data/beads-1.1.20/src/cimg/CImg.h:5920:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l2 = (int)std::strlen(str2); data/beads-1.1.20/src/cimg/CImg.h:5933:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int nl = l<5?5:l, ls = (unsigned int)std::strlen(str); data/beads-1.1.20/src/cimg/CImg.h:5954:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int nl = l<5?5:l, ls = (unsigned int)std::strlen(str); data/beads-1.1.20/src/cimg/CImg.h:5957:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(res,str,nl - 5); data/beads-1.1.20/src/cimg/CImg.h:5961:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(res,str,ll); data/beads-1.1.20/src/cimg/CImg.h:5963:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(res + ll + 5,str + ls - lr,lr); data/beads-1.1.20/src/cimg/CImg.h:5981:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const int l = (int)std::strlen(str); data/beads-1.1.20/src/cimg/CImg.h:5997:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const int l = (int)std::strlen(str); data/beads-1.1.20/src/cimg/CImg.h:6316:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return filename + std::strlen(filename); data/beads-1.1.20/src/cimg/CImg.h:8859:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int s = (unsigned int)std::strlen(nptitle) + 1; data/beads-1.1.20/src/cimg/CImg.h:9214:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int s = (unsigned int)std::strlen(tmp) + 1; data/beads-1.1.20/src/cimg/CImg.h:10015:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int s = (unsigned int)std::strlen(nptitle) + 1; data/beads-1.1.20/src/cimg/CImg.h:10228:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int s = (unsigned int)std::strlen(tmp) + 1; data/beads-1.1.20/src/cimg/CImg.h:11457:80: [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 (cimg_sscanf(s,"%255[^0-9%xyzvwhdcXYZVWHDC]",item._data)>0) s+=std::strlen(item); data/beads-1.1.20/src/cimg/CImg.h:15390:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ss_op + std::strlen(ss_op)<&expr.back()?"...":""); data/beads-1.1.20/src/cimg/CImg.h:15563:69: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int l_variable_name = (unsigned int)std::strlen(variable_name); data/beads-1.1.20/src/cimg/CImg.h:19124: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). arg1 = (unsigned int)std::strlen(variable_name); data/beads-1.1.20/src/cimg/CImg.h:19158: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). arg1 = (unsigned int)std::strlen(variable_name); data/beads-1.1.20/src/cimg/CImg.h:19563:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l1 = calling_function?(unsigned int)std::strlen(calling_function):0U, data/beads-1.1.20/src/cimg/CImg.h:19564:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l2 = user_macro?(unsigned int)std::strlen(user_macro):0U; data/beads-1.1.20/src/cimg/CImg.h:25448: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). return CImg<T>(str,(unsigned int)std::strlen(str) + (is_last_zero?1:0),1,1,1,is_shared); data/beads-1.1.20/src/cimg/CImg.h:26385:31: [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). nexpression+=std::strlen(item) + (err>1); data/beads-1.1.20/src/cimg/CImg.h:27700:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CImg<T>(s,(unsigned int)std::strlen(s),1,1,1,false).move_to(list); ptrs = p + 1; break data/beads-1.1.20/src/cimg/CImg.h:35867:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int lmax = (unsigned int)std::strlen(naxes); data/beads-1.1.20/src/cimg/CImg.h:44053:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int text_length = (unsigned int)std::strlen(text); data/beads-1.1.20/src/cimg/CImg.h:46948:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *ctext = text._data + std::strlen(text), *const ltext = text._data + 512; data/beads-1.1.20/src/cimg/CImg.h:46952: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). ctext = text._data + std::strlen(text); data/beads-1.1.20/src/cimg/CImg.h:46955:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). std::strcpy(text._data + std::strlen(text),"] "); data/beads-1.1.20/src/cimg/CImg.h:47214:68: [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). cimg_forC(*this,c) cimg_sprintf(message._data + std::strlen(message),"%g ",(double)(*this)(x,0,0,c)); data/beads-1.1.20/src/cimg/CImg.h:47215:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cimg_sprintf(message._data + std::strlen(message),")"); data/beads-1.1.20/src/cimg/CImg.h:47229:51: [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). cimg_sprintf(message._data + std::strlen(message)," - Range ( %u:%g, %g ) - ( %u:%g, %g )", data/beads-1.1.20/src/cimg/CImg.h:47232:51: [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). cimg_sprintf(message._data + std::strlen(message)," - Range [ %u:%g - %u:%g ]", data/beads-1.1.20/src/cimg/CImg.h:48264:100: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((err=std::fscanf(nfile,"%16383[^\n]",item.data()))!=EOF && (*item=='#' || !err)) std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:48272:101: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((err=std::fscanf(nfile," %16383[^\n]",item.data()))!=EOF && (*item=='#' || !err)) std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:48282:105: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((err=std::fscanf(nfile," %16383[^\n]",item.data()))!=EOF && (*item=='#' || !err)) std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:48290:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:48466:100: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((err=std::fscanf(nfile,"%16383[^\n]",item.data()))!=EOF && (*item=='#' || !err)) std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:48474:101: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((err=std::fscanf(nfile," %16383[^\n]",item.data()))!=EOF && (*item=='#' || !err)) std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:48483:103: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((err=std::fscanf(nfile," %16383[^\n]",item.data()))!=EOF && (*item=='#' || !err)) std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:48490:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::fgetc(nfile); data/beads-1.1.20/src/cimg/CImg.h:49070:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cimg_sprintf(body._data + std::strlen(body),".img"); data/beads-1.1.20/src/cimg/CImg.h:49074:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cimg_sprintf(body._data + std::strlen(body),".hdr"); data/beads-1.1.20/src/cimg/CImg.h:49309:21: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. out[0] = std::fscanf(file,"%63s",item._data); data/beads-1.1.20/src/cimg/CImg.h:49329:74: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). case 2 : out[5] = cimg::strncasecmp(tmp1,"unsigned",8)?1:0; std::strncpy(tmp1,tmp2,tmp1._width - 1); data/beads-1.1.20/src/cimg/CImg.h:52961:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(iname,filename,iname._width - 1); data/beads-1.1.20/src/cimg/CImg.h:52962: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). cimg_sprintf(iname._data + std::strlen(iname) - 3,"img"); data/beads-1.1.20/src/cimg/CImg.h:52966:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(iname,filename,iname._width - 1); data/beads-1.1.20/src/cimg/CImg.h:52967: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). cimg_sprintf(hname._data + std::strlen(iname) - 3,"hdr"); data/beads-1.1.20/src/cimg/CImg.h:52970:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(hname,filename,hname._width - 1); *iname = 0; data/beads-1.1.20/src/cimg/CImg.h:52977:12: [1] (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 character. std::strcpy(header._data + 14," "); data/beads-1.1.20/src/cimg/CImg.h:56637:33: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). j = 0; while ((i=std::fgetc(nfile))!='\n' && i>=0 && j<255) tmp[j++] = (char)i; tmp[j] = 0; \ data/beads-1.1.20/src/cimg/CImg.h:56679:31: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). j = 0; while ((i=std::fgetc(nfile))!='\n' && i>=0 && j<255) tmp[j++] = (char)i; tmp[j] = 0; data/beads-1.1.20/src/cimg/CImg.h:56785:33: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). j = 0; while ((i=std::fgetc(nfile))!='\n' && i>=0) tmp[j++] = (char)i; tmp[j] = 0; \ data/beads-1.1.20/src/cimg/CImg.h:56860:29: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). j = 0; while ((i=std::fgetc(nfile))!='\n' && i!=EOF && j<256) tmp[j++] = (char)i; tmp[j] = 0; data/beads-1.1.20/src/cimg/CImg.h:56923:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(filenamepar,filename,filenamepar._width - 1); data/beads-1.1.20/src/cimg/CImg.h:56927:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(filenamepar,filename,filenamepar._width - 1); data/beads-1.1.20/src/cimg/CImg.h:56931:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(filenamerec,filename,filenamerec._width - 1); data/beads-1.1.20/src/cimg/CImg.h:56935:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(filenamerec,filename,filenamerec._width - 1); data/beads-1.1.20/src/cimg/CImg.h:57775:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int l = (unsigned int)std::strlen(res); data/beads-1.1.20/src/cimg/CImg.h:58087:33: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). j = 0; while ((i=std::fgetc(nfile))!='\n') tmp[j++]=(char)i; tmp[j] = 0; \ data/beads-1.1.20/src/cimg/CImg.h:58157:29: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). j = 0; while ((i=std::fgetc(nfile))!='\n' && i!=EOF && j<256) tmp[j++] = (char)i; tmp[j] = 0; data/beads-1.1.20/src/cimg/CImg.h:58363:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*ext) cimg_sprintf(nfilename._data + std::strlen(nfilename),".%s",ext); data/beads-1.1.20/src/cimg/CImg.h:58773:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (unsigned int)std::strlen(cimg::_data_font90x103[0]),1,1,1,true), data/beads-1.1.20/src/cimg/CImg.h:58775:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (unsigned int)std::strlen(cimg::_data_font90x103[1]) + 1,1,1,1,true))>'x'). data/beads-1.1.20/src/cimg/CImg.h:58985:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59010:14: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(tmp,filename_tmp,tmp._width - 1); data/beads-1.1.20/src/cimg/CImg.h:59035:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59043:26: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (pfPath) std::strncpy(s_path,pfPath,MAX_PATH - 1); data/beads-1.1.20/src/cimg/CImg.h:59067:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59176:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59285:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59334:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59370:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59406:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59442:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59478:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59514:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). std::strncpy(s_path,user_path,1023); data/beads-1.1.20/src/cimg/CImg.h:59570:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int lp = (unsigned int)std::strlen(_path); data/beads-1.1.20/src/cimg/CImg.h:59590:31: [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). lp = (unsigned int)std::strlen(_path); data/beads-1.1.20/src/cimg/CImg.h:59606:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int lf = (unsigned int)std::strlen(filename); data/beads-1.1.20/src/cimg/CImg.h:59628:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int lf = (unsigned int)std::strlen(filename); data/beads-1.1.20/src/cimg/CImg.h:59779:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CImg<char> command((unsigned int)std::strlen(url) + 64); data/beads-1.1.20/src/parameters.cpp:11:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_detection.set_minproba(read("minproba", data/beads-1.1.20/src/parameters.cpp:17:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_direction.set_burned_pixel_threshold(read( data/beads-1.1.20/src/parameters.cpp:24:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_confluent.set_minflux(read("minflux", data/beads-1.1.20/src/parameters.cpp:26:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_confluent.set_minpath(read("minpath", data/beads-1.1.20/src/parameters.cpp:28:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_confluent.set_winconfl(read("winconfl", data/beads-1.1.20/src/parameters.cpp:30:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_confluent.set_minbeads(read("minbeads", data/beads-1.1.20/src/parameters.cpp:32:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_confluent.set_intmax(read("confluent_intmax", data/beads-1.1.20/src/parameters.cpp:34:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_confluent.set_minpct(read("confluent_minpct", data/beads-1.1.20/src/parameters.cpp:41:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_number.set_enlarge(read("quantification_enlarge", data/beads-1.1.20/src/parameters.cpp:43:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_number.set_enlarge_fusion(read("quantification_enlarge_fusion", data/beads-1.1.20/src/parameters.cpp:45:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_number.set_npass(read("npass", data/beads-1.1.20/src/parameters.cpp:52:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_prob.set_threshold(read("prob_threshold", data/beads-1.1.20/src/parameters.cpp:54:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_prob.set_sx(read("sx", _parameter_prob.get_sx())); data/beads-1.1.20/src/parameters.cpp:55:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_prob.set_sy(read("sy", _parameter_prob.get_sy())); data/beads-1.1.20/src/parameters.cpp:56:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_prob.set_sx_bottom(read("sx_bottom", data/beads-1.1.20/src/parameters.cpp:58:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _parameter_prob.set_sy_bottom(read("sy_bottom", data/beads-1.1.20/src/spotSvgDocument.cpp:364:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). file.read(unsorted, size); ANALYSIS SUMMARY: Hits = 438 Lines analyzed = 66777 in approximately 2.47 seconds (27074 lines/second) Physical Source Lines of Code (SLOC) = 53180 Hits@level = [0] 201 [1] 114 [2] 264 [3] 14 [4] 46 [5] 0 Hits@level+ = [0+] 639 [1+] 438 [2+] 324 [3+] 60 [4+] 46 [5+] 0 Hits/KSLOC@level+ = [0+] 12.0158 [1+] 8.23618 [2+] 6.09252 [3+] 1.12824 [4+] 0.864987 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.