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/libdispatch-0~svn197/dispatch/base.h Examining data/libdispatch-0~svn197/dispatch/benchmark.h Examining data/libdispatch-0~svn197/dispatch/group.h Examining data/libdispatch-0~svn197/dispatch/time.h Examining data/libdispatch-0~svn197/dispatch/dispatch.h Examining data/libdispatch-0~svn197/dispatch/source.h Examining data/libdispatch-0~svn197/dispatch/semaphore.h Examining data/libdispatch-0~svn197/dispatch/once.h Examining data/libdispatch-0~svn197/dispatch/queue.h Examining data/libdispatch-0~svn197/dispatch/object.h Examining data/libdispatch-0~svn197/config/config.h Examining data/libdispatch-0~svn197/src/shims/time.c Examining data/libdispatch-0~svn197/src/shims/tsd.h Examining data/libdispatch-0~svn197/src/shims/time.h Examining data/libdispatch-0~svn197/src/shims/malloc_zone.h Examining data/libdispatch-0~svn197/src/shims/mach.c Examining data/libdispatch-0~svn197/src/shims/tsd.c Examining data/libdispatch-0~svn197/src/shims/perfmon.h Examining data/libdispatch-0~svn197/src/shims/getprogname.h Examining data/libdispatch-0~svn197/src/time.c Examining data/libdispatch-0~svn197/src/source_private.h Examining data/libdispatch-0~svn197/src/source.c Examining data/libdispatch-0~svn197/src/queue_kevent.c Examining data/libdispatch-0~svn197/src/source_internal.h Examining data/libdispatch-0~svn197/src/legacy.c Examining data/libdispatch-0~svn197/src/object.c Examining data/libdispatch-0~svn197/src/object_internal.h Examining data/libdispatch-0~svn197/src/legacy.h Examining data/libdispatch-0~svn197/src/source_kevent.c Examining data/libdispatch-0~svn197/src/private.h Examining data/libdispatch-0~svn197/src/internal.h Examining data/libdispatch-0~svn197/src/semaphore.c Examining data/libdispatch-0~svn197/src/queue_private.h Examining data/libdispatch-0~svn197/src/once.c Examining data/libdispatch-0~svn197/src/semaphore_internal.h Examining data/libdispatch-0~svn197/src/queue_internal.h Examining data/libdispatch-0~svn197/src/apply.c Examining data/libdispatch-0~svn197/src/os_shims.h Examining data/libdispatch-0~svn197/src/benchmark.c Examining data/libdispatch-0~svn197/src/kevent_internal.h Examining data/libdispatch-0~svn197/src/queue.c Examining data/libdispatch-0~svn197/src/hw_shims.h Examining data/libdispatch-0~svn197/testing/shims/arc4random.h Examining data/libdispatch-0~svn197/testing/shims/fgetln.c Examining data/libdispatch-0~svn197/testing/shims/fgetln.h Examining data/libdispatch-0~svn197/testing/shims/asprintf.c Examining data/libdispatch-0~svn197/testing/shims/arc4random.c Examining data/libdispatch-0~svn197/testing/shims/asprintf.h Examining data/libdispatch-0~svn197/testing/dispatch_test.c Examining data/libdispatch-0~svn197/testing/dispatch_pingpong.c Examining data/libdispatch-0~svn197/testing/dispatch_priority.c Examining data/libdispatch-0~svn197/testing/dispatch_timer_bit31.c Examining data/libdispatch-0~svn197/testing/dispatch_cascade.c Examining data/libdispatch-0~svn197/testing/harness.c Examining data/libdispatch-0~svn197/testing/dispatch_test.h Examining data/libdispatch-0~svn197/testing/dispatch_sema.c Examining data/libdispatch-0~svn197/testing/dispatch_debug.c Examining data/libdispatch-0~svn197/testing/dispatch_plusplus.cpp Examining data/libdispatch-0~svn197/testing/dispatch_group.c Examining data/libdispatch-0~svn197/testing/dispatch_cffd.c Examining data/libdispatch-0~svn197/testing/dispatch_drift.c Examining data/libdispatch-0~svn197/testing/dispatch_timer_set_time.c Examining data/libdispatch-0~svn197/testing/os_shims.h Examining data/libdispatch-0~svn197/testing/fd_stress.c Examining data/libdispatch-0~svn197/testing/dispatch_starfish.c Examining data/libdispatch-0~svn197/testing/dispatch_apply.c Examining data/libdispatch-0~svn197/testing/dispatch_timer_bit63.c Examining data/libdispatch-0~svn197/testing/summarize.c Examining data/libdispatch-0~svn197/testing/dispatch_after.c Examining data/libdispatch-0~svn197/testing/dispatch_proc.c Examining data/libdispatch-0~svn197/testing/dispatch_c99.c Examining data/libdispatch-0~svn197/testing/dispatch_readsync.c Examining data/libdispatch-0~svn197/testing/queue_finalizer.c Examining data/libdispatch-0~svn197/testing/dispatch_api.c Examining data/libdispatch-0~svn197/testing/func.c Examining data/libdispatch-0~svn197/testing/dispatch_read.c FINAL RESULTS: data/libdispatch-0~svn197/dispatch/object.h:44:68: [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. DISPATCH_EXPORT DISPATCH_NONNULL2 DISPATCH_NOTHROW DISPATCH_FORMAT(printf,2,3) data/libdispatch-0~svn197/dispatch/object.h:49:68: [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. DISPATCH_EXPORT DISPATCH_NONNULL2 DISPATCH_NOTHROW DISPATCH_FORMAT(printf,2,0) data/libdispatch-0~svn197/src/internal.h:184:81: [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 _dispatch_log(const char *msg, ...) __attribute__((__noinline__,__format__(printf,1,2))); data/libdispatch-0~svn197/src/internal.h:185:86: [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 _dispatch_logv(const char *msg, va_list) __attribute__((__noinline__,__format__(printf,1,0))); data/libdispatch-0~svn197/src/os_shims.h:51:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/libdispatch-0~svn197/src/os_shims.h:51:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/libdispatch-0~svn197/src/queue.c:573: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(dq->dq_label, label); data/libdispatch-0~svn197/src/queue.c:1828:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newbuf, "%s\n", msg); data/libdispatch-0~svn197/src/queue.c:1843:2: [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(logfile, newbuf, ap); data/libdispatch-0~svn197/testing/dispatch_cffd.c:45: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. if (debug) fprintf(stderr, __VA_ARGS__); \ data/libdispatch-0~svn197/testing/dispatch_test.c:21:3: [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. snprintf(_linestr, sizeof(_linestr), \ data/libdispatch-0~svn197/testing/fd_stress.c:53: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. if (debug) fprintf(stderr, __VA_ARGS__); \ data/libdispatch-0~svn197/testing/fd_stress.c:292:9: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). name = mktemp(path); data/libdispatch-0~svn197/testing/shims/asprintf.c:48:8: [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. ret = vsnprintf(string, INIT_SZ, fmt, ap2); data/libdispatch-0~svn197/testing/shims/asprintf.c:62:10: [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. ret = vsnprintf(newstr, len, fmt, ap2); data/libdispatch-0~svn197/src/queue.c:1184:20: [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. bool disable_wq = getenv("LIBDISPATCH_DISABLE_KWQ"); data/libdispatch-0~svn197/src/source_kevent.c:356:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. valstr = getenv("LIBDISPATCH_DEBUGGER"); data/libdispatch-0~svn197/testing/dispatch_test.c:139:6: [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 (getenv("NOLEAKS")) _exit(EXIT_SUCCESS); data/libdispatch-0~svn197/testing/dispatch_test.c:142:6: [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 (getenv("DYLD_IMAGE_SUFFIX")) _exit(EXIT_SUCCESS); data/libdispatch-0~svn197/testing/fd_stress.c:385:15: [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 ((ch = getopt(argc, argv, "d")) != -1) { data/libdispatch-0~svn197/src/internal.h:192: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 __compile_time_assert__[(bool)(e) ? 1 : -1] __attribute__((unused)); \ data/libdispatch-0~svn197/src/internal.h:203: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 __compile_time_assert__[(bool)(!(e)) ? 1 : -1] __attribute__((unused)); \ data/libdispatch-0~svn197/src/internal.h:222: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 __compile_time_assert__[(e) ? 1 : -1]; \ data/libdispatch-0~svn197/src/internal.h:234: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 __compile_time_assert__[(e) ? -1 : 1]; \ data/libdispatch-0~svn197/src/internal.h:247: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 __compile_time_assert__[(bool)(e) ? 1 : -1] __attribute__((unused)); \ data/libdispatch-0~svn197/src/object.c:38: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 buf[4096]; data/libdispatch-0~svn197/src/queue.c:1769: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. static char _dispatch_build[16]; data/libdispatch-0~svn197/src/queue.c:1825: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 newbuf[strlen(msg) + 2]; data/libdispatch-0~svn197/src/queue.c:1826: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[PATH_MAX]; data/libdispatch-0~svn197/src/queue.c:1832:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). tmp = fopen(path, "a"); data/libdispatch-0~svn197/src/queue_internal.h:87: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 dq_label[DISPATCH_QUEUE_MIN_LABEL_SIZE]; // must be last data/libdispatch-0~svn197/src/source.c:374:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(rval, proto, sizeof(struct dispatch_source_attr_s)); data/libdispatch-0~svn197/src/source.c:395: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 source_label[sizeof(ds->dq_label)] = "source"; data/libdispatch-0~svn197/src/source.c:409: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(ds->dq_label, source_label, sizeof(source_label)); data/libdispatch-0~svn197/src/source_internal.h:66:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char _ds_pad[DISPATCH_QUEUE_MIN_LABEL_SIZE]; data/libdispatch-0~svn197/src/source_internal.h:68: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 dq_label[8]; data/libdispatch-0~svn197/src/source_kevent.c:360:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). val = atoi(valstr); data/libdispatch-0~svn197/testing/dispatch_cascade.c:39: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 padding[64]; data/libdispatch-0~svn197/testing/dispatch_priority.c:47:1: [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 *labels[PRIORITIES] = { "LOW", "DEFAULT", "HIGH" }; data/libdispatch-0~svn197/testing/dispatch_priority.c:52: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 padding[64]; data/libdispatch-0~svn197/testing/dispatch_read.c:47: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). int infd = open(path, O_RDONLY); data/libdispatch-0~svn197/testing/dispatch_read.c:75: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. static char buffer[1024*500]; // 500 KB buffer data/libdispatch-0~svn197/testing/dispatch_starfish.c:134: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[1000]; data/libdispatch-0~svn197/testing/dispatch_test.c:19: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 _linestr[BUFSIZ]; \ data/libdispatch-0~svn197/testing/dispatch_test.c:131: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 pidstr[10]; data/libdispatch-0~svn197/testing/fd_stress.c:91: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 label[64]; data/libdispatch-0~svn197/testing/fd_stress.c:94: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 buf[8192]; data/libdispatch-0~svn197/testing/fd_stress.c:97: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 md5[CC_MD5_DIGEST_LENGTH]; data/libdispatch-0~svn197/testing/fd_stress.c:123: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(ctx->buf, &len, ctx->buflen); data/libdispatch-0~svn197/testing/fd_stress.c:155:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->buf, ctx->md5, ctx->buflen); data/libdispatch-0~svn197/testing/fd_stress.c:290: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[MAXPATHLEN]; data/libdispatch-0~svn197/testing/fd_stress.c:299: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). *rfd = open(name, O_RDONLY | O_NONBLOCK); data/libdispatch-0~svn197/testing/fd_stress.c:302: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). *wfd = open(name, O_WRONLY | O_NONBLOCK); data/libdispatch-0~svn197/testing/fd_stress.c:433: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 host[NI_MAXHOST], serv[NI_MAXSERV]; data/libdispatch-0~svn197/testing/shims/arc4random.c:116: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). fd = open(RANDOMDEV, O_RDONLY, 0); data/libdispatch-0~svn197/src/os_shims.h:54:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int res = strlen(dst) + strlen(src) + 1; data/libdispatch-0~svn197/src/os_shims.h:54: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). int res = strlen(dst) + strlen(src) + 1; data/libdispatch-0~svn197/src/os_shims.h:57:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, src, n); data/libdispatch-0~svn197/src/queue.c:561:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). label_len = strlen(label); data/libdispatch-0~svn197/src/queue.c:1825:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char newbuf[strlen(msg) + 2]; data/libdispatch-0~svn197/testing/dispatch_read.c:76:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t actual = read(infd, buffer, sizeof(buffer)); data/libdispatch-0~svn197/testing/dispatch_read.c:80:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). actual = read(infd, buffer, sizeof(buffer)); data/libdispatch-0~svn197/testing/dispatch_test.c:55:2: [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(100000); // give 'gdb --waitfor=' a chance to find this proc data/libdispatch-0~svn197/testing/fd_stress.c:212:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read(rfd, &ctx->buf[ctx->offset], rdsz); data/libdispatch-0~svn197/testing/shims/arc4random.c:118:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) read(fd, rdat.rnd, sizeof(rdat.rnd)); data/libdispatch-0~svn197/testing/summarize.c:29: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). return (strncmp(str, prefix, strlen(prefix)) == 0); ANALYSIS SUMMARY: Hits = 66 Lines analyzed = 14938 in approximately 0.35 seconds (43166 lines/second) Physical Source Lines of Code (SLOC) = 9250 Hits@level = [0] 79 [1] 11 [2] 35 [3] 5 [4] 15 [5] 0 Hits@level+ = [0+] 145 [1+] 66 [2+] 55 [3+] 20 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 15.6757 [1+] 7.13514 [2+] 5.94595 [3+] 2.16216 [4+] 1.62162 [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.