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/libproxy-0.4.15/libmodman/module.hpp Examining data/libproxy-0.4.15/libmodman/test/builtin.cpp Examining data/libproxy-0.4.15/libmodman/test/main.cpp Examining data/libproxy-0.4.15/libmodman/test/main.hpp Examining data/libproxy-0.4.15/libmodman/module_manager.cpp Examining data/libproxy-0.4.15/libmodman/module_manager.hpp Examining data/libproxy-0.4.15/libproxy/config.hpp Examining data/libproxy-0.4.15/libproxy/extension_config.cpp Examining data/libproxy-0.4.15/libproxy/extension_ignore.hpp Examining data/libproxy-0.4.15/libproxy/extension_network.hpp Examining data/libproxy-0.4.15/libproxy/extension_wpad.cpp Examining data/libproxy-0.4.15/libproxy/extension_wpad.hpp Examining data/libproxy-0.4.15/libproxy/modules/ignore_domain.cpp Examining data/libproxy-0.4.15/libproxy/modules/ignore_hostname.cpp Examining data/libproxy-0.4.15/libproxy/modules/network_networkmanager.cpp Examining data/libproxy-0.4.15/libproxy/modules/pacutils.h Examining data/libproxy-0.4.15/libproxy/modules/pxgconf.cpp Examining data/libproxy-0.4.15/libproxy/modules/wpad_dns_alias.cpp Examining data/libproxy-0.4.15/libproxy/modules/ignore_ip.cpp Examining data/libproxy-0.4.15/libproxy/modules/pxgsettings.cpp Examining data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp Examining data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp Examining data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp Examining data/libproxy-0.4.15/libproxy/modules/config_kde.cpp Examining data/libproxy-0.4.15/libproxy/modules/config_macosx.cpp Examining data/libproxy-0.4.15/libproxy/modules/config_sysconfig.cpp Examining data/libproxy-0.4.15/libproxy/modules/config_w32reg.cpp Examining data/libproxy-0.4.15/libproxy/modules/pacrunner_mozjs.cpp Examining data/libproxy-0.4.15/libproxy/modules/pacrunner_natus.cpp Examining data/libproxy-0.4.15/libproxy/modules/pacrunner_webkit.cpp Examining data/libproxy-0.4.15/libproxy/proxy.h Examining data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp Examining data/libproxy-0.4.15/libproxy/test/url-encode.cpp Examining data/libproxy-0.4.15/libproxy/test/url-test.cpp Examining data/libproxy-0.4.15/libproxy/extension_config.hpp Examining data/libproxy-0.4.15/libproxy/url.cpp Examining data/libproxy-0.4.15/libproxy/url.hpp Examining data/libproxy-0.4.15/libproxy/extension_pacrunner.cpp Examining data/libproxy-0.4.15/libproxy/extension_pacrunner.hpp Examining data/libproxy-0.4.15/libproxy/proxy.cpp Examining data/libproxy-0.4.15/samples/libcurl/curlget.c Examining data/libproxy-0.4.15/utils/proxy.c FINAL RESULTS: data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:109:3: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", program, (char*) NULL); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:100:3: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", program, (char*) NULL); data/libproxy-0.4.15/libproxy/modules/config_kde.cpp:140:22: [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 *pipe = popen(command.c_str(), "r"); data/libproxy-0.4.15/libmodman/module_manager.cpp:43:28: [3] (misc) LoadLibraryEx: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. #define pdlopenl(filename) LoadLibraryEx(filename, NULL, DONT_RESOLVE_DLL_REFERENCES) data/libproxy-0.4.15/libmodman/module_manager.cpp:51:9: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. return LoadLibrary(filename); data/libproxy-0.4.15/libmodman/module_manager.cpp:144:22: [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* debug = getenv("_MM_DEBUG"); data/libproxy-0.4.15/libmodman/module_manager.cpp:230:22: [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* debug = getenv("_MM_DEBUG"); data/libproxy-0.4.15/libmodman/module_manager.cpp:240:22: [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* debug = getenv("_MM_DEBUG"); data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:33:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!(proxy = getenv("ftp_proxy"))) data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:34:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. proxy = getenv("FTP_PROXY"); data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:39:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!(proxy = getenv("https_proxy"))) data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:40:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. proxy = getenv("HTTPS_PROXY"); data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:45:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!(proxy = getenv("http_proxy"))) data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:46:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. proxy = getenv("HTTP_PROXY"); data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:57:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *ignore = getenv("no_proxy"); data/libproxy-0.4.15/libproxy/modules/config_envvar.cpp:58:36: [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. ignore = ignore ? ignore : getenv("NO_PROXY"); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:159:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *pxgconf = getenv("PX_GCONF"); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:299:10: [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. return (getenv("GNOME_DESKTOP_SESSION_ID") data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:300:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. || (getenv("DESKTOP_SESSION") data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:301:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. && string(getenv("DESKTOP_SESSION")) == "gnome")); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:134:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *pxgconf = getenv("PX_GSETTINGS"); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:297:10: [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. return (getenv("GNOME_DESKTOP_SESSION_ID") data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:298:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. || (getenv("DESKTOP_SESSION") data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:299:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. && string(getenv("DESKTOP_SESSION")) == "gnome") data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:300:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. || (getenv("DESKTOP_SESSION") data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:301:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. && string(getenv("DESKTOP_SESSION")) == "mate")); data/libproxy-0.4.15/libproxy/modules/config_kde.cpp:231: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. MM_MODULE_INIT_EZ(kde_config_extension, getenv("KDE_FULL_SESSION"), NULL, NULL); data/libproxy-0.4.15/libproxy/proxy.cpp:162:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. module_dir = getenv("PX_MODULE_PATH"); data/libproxy-0.4.15/libproxy/proxy.cpp:168:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. this->debug = (getenv("_PX_DEBUG") != NULL); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:87:17: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch (*pid = vfork()) { data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:272:8: [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. for (char l[BUFFERSIZE] ; num != 0 && fgets(l, BUFFERSIZE, this->read) != NULL ; ) { data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:78:17: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. switch (*pid = vfork()) { data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:266:8: [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. for (char l[BUFFERSIZE] ; num != 0 && fgets(l, BUFFERSIZE, this->read) != NULL ; ) { data/libproxy-0.4.15/libproxy/modules/config_kde.cpp:144: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 buffer[128]; data/libproxy-0.4.15/libproxy/modules/config_w32reg.cpp:59:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy(*sval, buffer, buflen) != NULL; data/libproxy-0.4.15/libproxy/modules/config_w32reg.cpp:61: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. if (ival) return memcpy(ival, buffer, buflen < sizeof(uint32_t) ? buflen : sizeof(uint32_t)) != NULL; data/libproxy-0.4.15/libproxy/modules/ignore_ip.cpp:82:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, info->ai_addr, info->ai_addrlen); data/libproxy-0.4.15/libproxy/modules/pacrunner_natus.cpp:58:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[1024]; data/libproxy-0.4.15/libproxy/modules/pacrunner_webkit.cpp:88:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[1024]; data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:98:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libproxy-0.4.15/libproxy/url.cpp:25:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define open _open data/libproxy-0.4.15/libproxy/url.cpp:79:45: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define _copyaddr_t(type, addr) (sockaddr*) memcpy(new type, &(addr), sizeof(type)) data/libproxy-0.4.15/libproxy/url.cpp:243:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). m_port = atoi(hier_part.c_str() + port_start); data/libproxy-0.4.15/libproxy/url.cpp:419:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((sock = ::open(m_path.c_str(), O_RDONLY)) < 0) data/libproxy-0.4.15/libproxy/url.cpp:537:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, dynamic_buffer.data(), dynamic_buffer.size()); data/libproxy-0.4.15/utils/proxy.c:64:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char url[102400]; // Should be plently long for most URLs data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:69:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static int popen2(const char *program, FILE** read, FILE** write, pid_t* pid) { data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:70:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read || !write || !pid || !program || !*program) data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:118:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (*read != NULL) fclose(*read); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:118:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (*read != NULL) fclose(*read); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:171:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (popen2(cmd.c_str(), &this->read, &this->write, &this->pid) != 0) data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:178:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fcntl(fileno(this->read), F_SETFL, O_NONBLOCK) == -1) { data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:179:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fclose(this->read); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:187:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fclose(this->read); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:199:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET(fileno(this->read), &rfds); data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:200:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select(fileno(this->read)+1, &rfds, NULL, NULL, &timeout) > 0) data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:263:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FILE* read; data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:270:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!this->read) return false; // We need the pipe to be open data/libproxy-0.4.15/libproxy/modules/config_gnome.cpp:272:68: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (char l[BUFFERSIZE] ; num != 0 && fgets(l, BUFFERSIZE, this->read) != NULL ; ) { data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:60:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static int popen2(const char *program, FILE** read, FILE** write, pid_t* pid) { data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:61:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read || !write || !pid || !program || !*program) data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:109:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (*read != NULL) fclose(*read); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:109:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (*read != NULL) fclose(*read); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:146:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (popen2(cmd.c_str(), &this->read, &this->write, &this->pid) != 0) data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:150:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fcntl(fileno(this->read), F_SETFL, O_NONBLOCK) == -1) { data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:151:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fclose(this->read); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:163:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fclose(this->read); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:192:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET(fileno(this->read), &rfds); data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:193:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (select(fileno(this->read)+1, &rfds, NULL, NULL, &timeout) > 0) data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:256:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FILE* read; data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:264:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!this->read) return false; // We need the pipe to be open data/libproxy-0.4.15/libproxy/modules/config_gnome3.cpp:266:68: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (char l[BUFFERSIZE] ; num != 0 && fgets(l, BUFFERSIZE, this->read) != NULL ; ) { data/libproxy-0.4.15/libproxy/modules/pacrunner_mozjs.cpp:93:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). JSString *myhost = JS_NewStringCopyN(cx, hostname, strlen(hostname)); data/libproxy-0.4.15/libproxy/modules/pacrunner_mozjs.cpp:143:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(JAVASCRIPT_ROUTINES), &rval); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:187: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). ret = send(csock, (void*)basic, strlen(basic), 0); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:188:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(ret == strlen(basic)); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:202: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). ret = send(csock, (void*)basic, strlen(basic), 0); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:203:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(ret == strlen(basic)); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:220: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). ret = send(csock, (void*)basic, strlen(basic), MSG_NOSIGNAL); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:221:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(ret == strlen(basic)); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:244:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = send(csock, (void*)chunked, strlen(chunked), 0); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:245:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(ret == strlen(chunked)); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:258: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). ret = send(csock, (void*)basic, strlen(basic), 0); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:259:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(ret == strlen(basic)); data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:287:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(pac != NULL && strlen(pac) == 10 && !strcmp("0123456789", pac))) data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:300:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(pac != NULL && strlen(pac) == 10 && !strcmp("0123456789", pac))) data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:304:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(pac != NULL && strlen(pac) == 10 && !strcmp("0123456789", pac))) data/libproxy-0.4.15/libproxy/test/get-pac-test.cpp:309:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(pac != NULL && strlen(pac) == 10 && !strcmp("0123456789", pac))) data/libproxy-0.4.15/libproxy/url.cpp:41:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define read _read data/libproxy-0.4.15/libproxy/url.cpp:425:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(sock, buffer, st.st_size) == 0) { data/libproxy-0.4.15/utils/proxy.c:92:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (url[strlen(url)-1] == '\n') url[strlen(url)-1] = '\0'; data/libproxy-0.4.15/utils/proxy.c:92:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (url[strlen(url)-1] == '\n') url[strlen(url)-1] = '\0'; ANALYSIS SUMMARY: Hits = 92 Lines analyzed = 5991 in approximately 0.24 seconds (25226 lines/second) Physical Source Lines of Code (SLOC) = 3955 Hits@level = [0] 46 [1] 46 [2] 17 [3] 26 [4] 3 [5] 0 Hits@level+ = [0+] 138 [1+] 92 [2+] 46 [3+] 29 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 34.8925 [1+] 23.2617 [2+] 11.6308 [3+] 7.33249 [4+] 0.758534 [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.