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/integrit-4.1/rules_p.h Examining data/integrit-4.1/hexprint_p.h Examining data/integrit-4.1/cdb_make.h Examining data/integrit-4.1/xml.c Examining data/integrit-4.1/cdb_put.h Examining data/integrit-4.1/gnupg/util.h Examining data/integrit-4.1/gnupg/rmd160.c Examining data/integrit-4.1/gnupg/bithelp.h Examining data/integrit-4.1/gnupg/rmd160.h Examining data/integrit-4.1/gnupg/types.h Examining data/integrit-4.1/packint.h Examining data/integrit-4.1/cdb_hash.h Examining data/integrit-4.1/hashtbl/hashtest.c Examining data/integrit-4.1/hashtbl/hashtbl.h Examining data/integrit-4.1/hashtbl/hforeach.c Examining data/integrit-4.1/hashtbl/hhash.c Examining data/integrit-4.1/hashtbl/leakfind.h Examining data/integrit-4.1/hashtbl/hashtbl.c Examining data/integrit-4.1/hashtbl/hgrow.c Examining data/integrit-4.1/hashtbl/hhash.h Examining data/integrit-4.1/hashtbl/hgrow.h Examining data/integrit-4.1/hashtbl/hfree.c Examining data/integrit-4.1/xstrdup.h Examining data/integrit-4.1/show.h Examining data/integrit-4.1/dbinfo.h Examining data/integrit-4.1/missing.c Examining data/integrit-4.1/cdb_hash.c Examining data/integrit-4.1/elcwft.h Examining data/integrit-4.1/rules.h Examining data/integrit-4.1/digest.h Examining data/integrit-4.1/main.c Examining data/integrit-4.1/istat.c Examining data/integrit-4.1/cdb.h Examining data/integrit-4.1/xstrdup.c Examining data/integrit-4.1/checkset.h Examining data/integrit-4.1/xstradd.h Examining data/integrit-4.1/options.c Examining data/integrit-4.1/leakfind.h Examining data/integrit-4.1/elcwft.c Examining data/integrit-4.1/cdb_seq.c Examining data/integrit-4.1/elcerror.c Examining data/integrit-4.1/integrit.h Examining data/integrit-4.1/eachfile.c Examining data/integrit-4.1/show.c Examining data/integrit-4.1/hexprint.c Examining data/integrit-4.1/cdb_make.c Examining data/integrit-4.1/cdb_get.c Examining data/integrit-4.1/cdb_seq.h Examining data/integrit-4.1/missing.h Examining data/integrit-4.1/xml_p.h Examining data/integrit-4.1/examples/integrit-run.c Examining data/integrit-4.1/utils/viewdb.c Examining data/integrit-4.1/utils/ls.c Examining data/integrit-4.1/elcerror_p.h Examining data/integrit-4.1/checkset_p.h Examining data/integrit-4.1/options_p.h Examining data/integrit-4.1/xstradd.c Examining data/integrit-4.1/cdb_put.c Examining data/integrit-4.1/eachfile.h Examining data/integrit-4.1/checkset.c Examining data/integrit-4.1/rules.c Examining data/integrit-4.1/xml.h Examining data/integrit-4.1/cdb.c Examining data/integrit-4.1/elcwft_p.h Examining data/integrit-4.1/missing_p.h Examining data/integrit-4.1/cdb_get.h Examining data/integrit-4.1/eachfile_p.h Examining data/integrit-4.1/elcerror.h Examining data/integrit-4.1/istat.h FINAL RESULTS: data/integrit-4.1/eachfile.c:134: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. ret = readlink(inf->path, buf, BUFSIZ); data/integrit-4.1/elcerror.c:53:5: [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, args); data/integrit-4.1/elcerror.c:65:5: [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, args); data/integrit-4.1/examples/integrit-run.c:81:2: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl(ibin, ibin, "-C", cpath_buf, "-c", "-u", NULL); data/integrit-4.1/gnupg/util.h:96:42: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((noreturn, format (printf,1,2))); data/integrit-4.1/gnupg/util.h:99:42: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((noreturn, format (printf,1,2))); data/integrit-4.1/gnupg/util.h:100:70: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void g10_log_error( const char *fmt, ... ) __attribute__ ((format (printf,1,2))); data/integrit-4.1/gnupg/util.h:101:70: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void g10_log_info( const char *fmt, ... ) __attribute__ ((format (printf,1,2))); data/integrit-4.1/gnupg/util.h:102:70: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void g10_log_debug( const char *fmt, ... ) __attribute__ ((format (printf,1,2))); data/integrit-4.1/gnupg/util.h:104:42: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((noreturn, format (printf,2,3))); data/integrit-4.1/gnupg/util.h:106:32: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf,2,3))); data/integrit-4.1/gnupg/util.h:108:32: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf,2,3))); data/integrit-4.1/gnupg/util.h:110:32: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf,2,3))); data/integrit-4.1/hashtbl/hashtbl.c:74:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newstr, orig); data/integrit-4.1/options.c:88:5: [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. fprintf(out, PROGNAME ": ---- integrit, version %s -----------------\n", data/integrit-4.1/options.c:90:5: [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. fprintf(out, PROGNAME ": %27s : %s\n", "output", options_output_str(it)); data/integrit-4.1/options.c:91:5: [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. fprintf(out, PROGNAME ": %27s : %s\n", "conf file", it->conffile); data/integrit-4.1/options.c:92:5: [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. fprintf(out, PROGNAME ": %27s : %s\n", "known db", it->knowndbname); data/integrit-4.1/options.c:93:5: [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. fprintf(out, PROGNAME ": %27s : %s\n", "current db", it->currdbname); data/integrit-4.1/options.c:94:5: [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. fprintf(out, PROGNAME ": %27s : %s\n", "root", it->root); data/integrit-4.1/options.c:95:5: [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. fprintf(out, PROGNAME ": %27s : %s\n", "do check", data/integrit-4.1/options.c:97:5: [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. fprintf(out, PROGNAME ": %27s : %s\n", "do update", data/integrit-4.1/options.c:190:5: [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. fprintf(stderr, PROGNAME " (%s) Error: no value for property: %s\n", data/integrit-4.1/xml.h:25:36: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define XML_START_PRINT(out, tag) (fprintf(out, XML_START(tag))) data/integrit-4.1/xml.h:26:34: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define XML_END_PRINT(out, tag) (fprintf(out, XML_END(tag))) data/integrit-4.1/xstradd.c:47:5: [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. fprintf(stderr, PROGNAME ": Error in %s (%s): %s\n", \ data/integrit-4.1/xstradd.c:70:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newstr, str1); data/integrit-4.1/xstradd.c:74:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(newstr, str); data/integrit-4.1/xstrdup.c:38:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newstr, str); data/integrit-4.1/options.c:371:18: [3] (buffer) getopt: 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(argc, argv, "hVvqC:cuxN:O:")) != -1) { data/integrit-4.1/cdb.c:123:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/integrit-4.1/cdb.c:142:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/integrit-4.1/cdb_make.c:93:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/integrit-4.1/cdb_make.c:124:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/integrit-4.1/cdb_make.h:41: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 bspace[8192]; data/integrit-4.1/cdb_make.h:42: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 final[2048]; data/integrit-4.1/cdb_seq.c:45:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[4]; data/integrit-4.1/dbinfo.h:31:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sum[DIGEST_LENGTH]; data/integrit-4.1/eachfile.c:118:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/integrit-4.1/eachfile.c:142: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 ( (fd = open(inf->path, O_RDONLY)) == -1) { data/integrit-4.1/eachfile.c:169: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(dbinf->sum, digest_read(&context), DIGEST_LENGTH); data/integrit-4.1/eachfile.c:210:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[ELC_TIMEBUFSIZ]; data/integrit-4.1/examples/integrit-run.c:61:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cpath_buf[1024]; data/integrit-4.1/gnupg/rmd160.c:175:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[150]; data/integrit-4.1/gnupg/rmd160.c:229: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( x, data, 64 ); data/integrit-4.1/gnupg/rmd160.c:579: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( outbuf, hd.buf, 20 ); data/integrit-4.1/gnupg/types.h:131:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c[1]; data/integrit-4.1/gnupg/types.h:143:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[1]; data/integrit-4.1/gnupg/util.h:231:28: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memmove(d, s, n) bcopy((s), (d), (n)) data/integrit-4.1/hashtbl/hashtest.c:56:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/integrit-4.1/hashtbl/hashtest.c:58: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 *words = fopen(SYSTEM_DICTIONARY, "r"); data/integrit-4.1/istat.h:5:18: [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. typedef unsigned char packed[ELC_INT64_SIZ]; data/integrit-4.1/main.c:62:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(it->knowndbname, data/integrit-4.1/main.c:76: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). fd = open(it->currdbname, data/integrit-4.1/main.c:101:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/integrit-4.1/main.c:104: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). int fd = open(fname, O_RDONLY); data/integrit-4.1/main.c:118: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(sumbuf, digest_read(&context), DIGEST_LENGTH); data/integrit-4.1/main.c:148:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char newdb_checksum[DIGEST_LENGTH]; data/integrit-4.1/missing.c:125:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(dbname, O_RDONLY | O_NDELAY); data/integrit-4.1/options.c:234:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). it->stop_on_err = atoi(val); data/integrit-4.1/options.c:264:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[BUFSIZ]; data/integrit-4.1/options.c:426:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/integrit-4.1/options.c:432:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (! (conf = fopen(it->conffile, "r")) ) data/integrit-4.1/show.c:58:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[ELC_TIMEBUFSIZ]; data/integrit-4.1/utils/ls.c:61:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/integrit-4.1/utils/ls.c:63: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). int fd = open(filename, O_RDONLY); data/integrit-4.1/utils/ls.c:81: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(dbinf->sum, digest_read(&context), DIGEST_LENGTH); data/integrit-4.1/utils/viewdb.c:68: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 ( (seq.fd = open(opts->targetname, O_RDONLY | O_NDELAY)) == -1) data/integrit-4.1/cdb.c:106:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(c->fd,buf,len); data/integrit-4.1/cdb_seq.c:48:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (err = read(fd, &buf, sizeof(*n))) == -1) data/integrit-4.1/cdb_seq.c:121:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (err = read(c->fd, key, klen)) == -1) { data/integrit-4.1/cdb_seq.c:130:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (err = read(c->fd, data, dlen)) == -1) { data/integrit-4.1/cdb_seq.c:146:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (err = read(c->fd, key, klen)) == -1) { data/integrit-4.1/eachfile.c:158:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (n = read(fd, buf, BUFSIZ)) > 0) data/integrit-4.1/eachfile.c:579:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t plen = strlen(path); data/integrit-4.1/eachfile.c:608:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(5); /* debug */ data/integrit-4.1/hashtbl/hashtest.c:80:34: [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 (hashtbl_store(&h, buf, strlen(buf), intp, &replaced) == -1) { data/integrit-4.1/hashtbl/hashtest.c:93: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). if (! (intp = hashtbl_lookup(&h, buf, strlen(buf))) ) data/integrit-4.1/hashtbl/hashtest.c:104: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). if (! (intp = hashtbl_remove(&h, buf, strlen(buf))) ) { data/integrit-4.1/hashtbl/hashtest.c:120:34: [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 (hashtbl_store(&h, buf, strlen(buf), intp, &replaced) == -1) { data/integrit-4.1/main.c:110:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (n = read(fd, buf, BUFSIZ)) ) { data/integrit-4.1/options.c:309:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n_switches = strlen(buf); data/integrit-4.1/rules.c:151: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). p += strlen(root); data/integrit-4.1/rules.c:161: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). if ( (thisrule = hashtbl_lookup(rules, path, strlen(path))) ) { data/integrit-4.1/utils/ls.c:72:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (n = read(fd, buf, BUFSIZ)) > 0) data/integrit-4.1/utils/ls.c:133: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). show_entry(opts->checksums, fullpath, strlen(fullpath), dbinf_buf, data/integrit-4.1/utils/ls.c:158: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). show_entry(opts->checksums, target, strlen(target), data/integrit-4.1/xstradd.c:60:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). totalchars += strlen(str1); data/integrit-4.1/xstradd.c:64:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). totalchars += strlen(str); data/integrit-4.1/xstradd.c:79:6: [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(newstr), newstr, __FUNCTION__); data/integrit-4.1/xstrdup.c:35:44: [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 *newstr = malloc(sizeof(char) * (strlen(str) + 1)); ANALYSIS SUMMARY: Hits = 91 Lines analyzed = 6767 in approximately 0.39 seconds (17349 lines/second) Physical Source Lines of Code (SLOC) = 4234 Hits@level = [0] 50 [1] 23 [2] 38 [3] 1 [4] 28 [5] 1 Hits@level+ = [0+] 141 [1+] 91 [2+] 68 [3+] 30 [4+] 29 [5+] 1 Hits/KSLOC@level+ = [0+] 33.3018 [1+] 21.4927 [2+] 16.0605 [3+] 7.0855 [4+] 6.84932 [5+] 0.236183 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.