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/porg-0.10/porg/logger.cc Examining data/porg-0.10/porg/pkg.h Examining data/porg-0.10/porg/db.cc Examining data/porg-0.10/porg/main.cc Examining data/porg-0.10/porg/newpkg.h Examining data/porg-0.10/porg/opt.h Examining data/porg-0.10/porg/util.h Examining data/porg-0.10/porg/newpkg.cc Examining data/porg-0.10/porg/opt.cc Examining data/porg-0.10/porg/out.cc Examining data/porg-0.10/porg/main.h Examining data/porg-0.10/porg/out.h Examining data/porg-0.10/porg/util.cc Examining data/porg-0.10/porg/logger.h Examining data/porg-0.10/porg/pkg.cc Examining data/porg-0.10/porg/db.h Examining data/porg-0.10/lib/porg-log/log.c Examining data/porg-0.10/lib/porg/basepkg.h Examining data/porg-0.10/lib/porg/common.h Examining data/porg-0.10/lib/porg/rexp.h Examining data/porg-0.10/lib/porg/file.cc Examining data/porg-0.10/lib/porg/rexp.cc Examining data/porg-0.10/lib/porg/common.cc Examining data/porg-0.10/lib/porg/baseopt.h Examining data/porg-0.10/lib/porg/file.h Examining data/porg-0.10/lib/porg/basepkg.cc Examining data/porg-0.10/lib/porg/baseopt.cc Examining data/porg-0.10/grop/find.cc Examining data/porg-0.10/grop/find.h Examining data/porg-0.10/grop/properties.cc Examining data/porg-0.10/grop/maintreeview.h Examining data/porg-0.10/grop/removepkg.cc Examining data/porg-0.10/grop/infotextview.cc Examining data/porg-0.10/grop/pkg.h Examining data/porg-0.10/grop/db.cc Examining data/porg-0.10/grop/main.cc Examining data/porg-0.10/grop/opt.h Examining data/porg-0.10/grop/util.h Examining data/porg-0.10/grop/filestreeview.h Examining data/porg-0.10/grop/infotextview.h Examining data/porg-0.10/grop/opt.cc Examining data/porg-0.10/grop/mainwindow.h Examining data/porg-0.10/grop/preferences.cc Examining data/porg-0.10/grop/porgball.cc Examining data/porg-0.10/grop/mainwindow.cc Examining data/porg-0.10/grop/lock.cc Examining data/porg-0.10/grop/maintreeview.cc Examining data/porg-0.10/grop/properties.h Examining data/porg-0.10/grop/util.cc Examining data/porg-0.10/grop/filestreeview.cc Examining data/porg-0.10/grop/removepkg.h Examining data/porg-0.10/grop/db.h Examining data/porg-0.10/grop/porgball.h Examining data/porg-0.10/grop/lock.h Examining data/porg-0.10/grop/preferences.h FINAL RESULTS: data/porg-0.10/lib/porg/file.cc:33:13: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. int cnt = readlink(m_name.c_str(), ln, sizeof(ln) - 1); data/porg-0.10/grop/lock.cc:23:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(s_lockfile.c_str(), F_OK)) data/porg-0.10/grop/porgball.cc:196:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dir.c_str(), W_OK) < 0) { data/porg-0.10/grop/porgball.cc:204:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(zipfile.c_str(), F_OK)) { data/porg-0.10/lib/porg-log/log.c:69:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/porg-0.10/lib/porg-log/log.c:245:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(oldbuf, oldpath); data/porg-0.10/lib/porg-log/log.c:246:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newbuf, newpath); data/porg-0.10/lib/porg/baseopt.cc:58:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return !access(s_logdir.c_str(), W_OK); data/porg-0.10/lib/porg/basepkg.cc:91:11: [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. switch (sscanf(buf.c_str(), "%[^|]|%lu|%s", path, &size, link_path)) { data/porg-0.10/porg/logger.cc:154:3: [4] (shell) execv: 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. execv("/bin/sh", cmd); data/porg-0.10/porg/newpkg.cc:121:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(config.c_str(), R_OK) < 0) { data/porg-0.10/porg/newpkg.cc:123:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(config.c_str(), R_OK) < 0) data/porg-0.10/porg/newpkg.cc:191:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. found = !access(path.c_str(), F_OK); data/porg-0.10/lib/porg-log/log.c:142:23: [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 (!(porg_tmpfile = getenv("PORG_TMPFILE"))) data/porg-0.10/lib/porg-log/log.c:145: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. porg_debug = getenv("PORG_DEBUG"); data/porg-0.10/porg/logger.cc:95:17: [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* tmpdir = getenv("TMPDIR"); data/porg-0.10/porg/opt.cc:163:14: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, optstring.c_str(), opt, 0)) >= 0) { data/porg-0.10/porg/opt.cc:220:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, optstring.c_str(), opt, 0)) >= 0) { data/porg-0.10/porg/opt.cc:272:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, optstring.c_str(), opt, 0)) >= 0) { data/porg-0.10/porg/util.cc:49:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!::realpath(dir.c_str(), real_dir)) data/porg-0.10/lib/porg-log/log.c:91: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. static char cwd[PORG_BUFSIZE], aux[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:183: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. static char abs_path[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:222: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 oldbuf[PORG_BUFSIZE], newbuf[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:274:5: [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). int open(const char* path, int flags, ...) data/porg-0.10/lib/porg-log/log.c:352:7: [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* fopen(const char* path, const char* mode) data/porg-0.10/lib/porg-log/log.c:453: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. static char abs_path[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:476: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. static char old_abs_path[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:477: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. static char new_abs_path[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:495: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. static char new_abs_path[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:512: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. static char new_abs_path[PORG_BUFSIZE]; data/porg-0.10/lib/porg-log/log.c:534: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. static char abs_path[PORG_BUFSIZE]; data/porg-0.10/lib/porg/basepkg.cc:86: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 path[4096], link_path[4096]; data/porg-0.10/lib/porg/common.cc:50: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 str[32] = ""; data/porg-0.10/lib/porg/file.cc:32:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ln[4096]; data/porg-0.10/porg/logger.cc:96: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 tmpfile[4096]; data/porg-0.10/porg/logger.cc:96:7: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char tmpfile[4096]; data/porg-0.10/porg/logger.cc:98:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). snprintf(tmpfile, sizeof(tmpfile), "%s/porgXXXXXX", tmpdir ? tmpdir : "/tmp"); data/porg-0.10/porg/logger.cc:98:27: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). snprintf(tmpfile, sizeof(tmpfile), "%s/porgXXXXXX", tmpdir ? tmpdir : "/tmp"); data/porg-0.10/porg/logger.cc:100:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if (close(mkstemp(tmpfile)) < 0) data/porg-0.10/porg/logger.cc:100:20: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (close(mkstemp(tmpfile)) < 0) data/porg-0.10/porg/logger.cc:101:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). snprintf(tmpfile, sizeof(tmpfile), "/tmp/porg%d", getpid()); data/porg-0.10/porg/logger.cc:101:28: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). snprintf(tmpfile, sizeof(tmpfile), "/tmp/porg%d", getpid()); data/porg-0.10/porg/logger.cc:107:16: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). exec_command(tmpfile); data/porg-0.10/porg/logger.cc:108:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). FileStream<ifstream> f(tmpfile); data/porg-0.10/porg/logger.cc:110:10: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(tmpfile); data/porg-0.10/porg/logger.cc:114:10: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(tmpfile); data/porg-0.10/porg/logger.cc:120:41: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). void Logger::exec_command(string const& tmpfile) const data/porg-0.10/porg/logger.cc:137:27: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). set_env("PORG_TMPFILE", tmpfile); data/porg-0.10/porg/newpkg.cc:143:5: [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). f.open("configure.log"); data/porg-0.10/porg/opt.cc:145: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(p, "+p", 2); data/porg-0.10/porg/opt.cc:472: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 dirname[4096]; data/porg-0.10/porg/util.cc:32:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cwd[4096]; data/porg-0.10/porg/util.cc:47: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 real_dir[4096]; data/porg-0.10/lib/porg-log/log.c:96:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(abs_path, path, PORG_BUFSIZE - 1); data/porg-0.10/lib/porg-log/log.c:100:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(abs_path, cwd, PORG_BUFSIZE - 1); data/porg-0.10/lib/porg-log/log.c:101:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(abs_path, "/", PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:101: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). strncat(abs_path, "/", PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:102:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(abs_path, path, PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:102: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). strncat(abs_path, path, PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:106:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(abs_path, aux, PORG_BUFSIZE - 1); data/porg-0.10/lib/porg-log/log.c:107:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(abs_path, "/", PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:107: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). strncat(abs_path, "/", PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:108:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(abs_path, path, PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:108: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). strncat(abs_path, path, PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:111:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(abs_path, path, PORG_BUFSIZE - 1); data/porg-0.10/lib/porg-log/log.c:204:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(abs_path, "\n", PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:204: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). strncat(abs_path, "\n", PORG_BUFSIZE - strlen(abs_path) - 1); data/porg-0.10/lib/porg-log/log.c:205:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(abs_path); data/porg-0.10/lib/porg-log/log.c:240:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). oldlen = strlen(oldpath); data/porg-0.10/lib/porg-log/log.c:241:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newlen = strlen(newpath); data/porg-0.10/lib/porg-log/log.c:256:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(oldbuf, e->d_name, PORG_BUFSIZE - oldlen - 1); data/porg-0.10/lib/porg-log/log.c:257:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(newbuf, e->d_name, PORG_BUFSIZE - newlen - 1); data/porg-0.10/porg/db.cc:54:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (string name; dir.read(name); add_pkg(name)) ; data/porg-0.10/porg/db.cc:73:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (string name; dir.read(name); ) data/porg-0.10/porg/util.cc:73:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool Dir::read(string &name) data/porg-0.10/porg/util.cc:82:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(name); data/porg-0.10/porg/util.h:29:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(std::string&); ANALYSIS SUMMARY: Hits = 77 Lines analyzed = 6343 in approximately 0.19 seconds (33454 lines/second) Physical Source Lines of Code (SLOC) = 4217 Hits@level = [0] 2 [1] 24 [2] 33 [3] 7 [4] 12 [5] 1 Hits@level+ = [0+] 79 [1+] 77 [2+] 53 [3+] 20 [4+] 13 [5+] 1 Hits/KSLOC@level+ = [0+] 18.7337 [1+] 18.2594 [2+] 12.5682 [3+] 4.74271 [4+] 3.08276 [5+] 0.237135 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.