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/traceshark-0.9.11~beta/analyzer/abstracttask.cpp Examining data/traceshark-0.9.11~beta/analyzer/abstracttask.h Examining data/traceshark-0.9.11~beta/analyzer/cpu.h Examining data/traceshark-0.9.11~beta/analyzer/cpufreq.cpp Examining data/traceshark-0.9.11~beta/analyzer/cpufreq.h Examining data/traceshark-0.9.11~beta/analyzer/cpuidle.cpp Examining data/traceshark-0.9.11~beta/analyzer/cpuidle.h Examining data/traceshark-0.9.11~beta/analyzer/cputask.cpp Examining data/traceshark-0.9.11~beta/analyzer/cputask.h Examining data/traceshark-0.9.11~beta/analyzer/filterstate.cpp Examining data/traceshark-0.9.11~beta/analyzer/filterstate.h Examining data/traceshark-0.9.11~beta/analyzer/migration.h Examining data/traceshark-0.9.11~beta/analyzer/task.cpp Examining data/traceshark-0.9.11~beta/analyzer/task.h Examining data/traceshark-0.9.11~beta/analyzer/tcolor.cpp Examining data/traceshark-0.9.11~beta/analyzer/tcolor.h Examining data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp Examining data/traceshark-0.9.11~beta/analyzer/traceanalyzer.h Examining data/traceshark-0.9.11~beta/misc/chunk.h Examining data/traceshark-0.9.11~beta/misc/errors.cpp Examining data/traceshark-0.9.11~beta/misc/errors.h Examining data/traceshark-0.9.11~beta/misc/gitversion-template.h Examining data/traceshark-0.9.11~beta/misc/main.cpp Examining data/traceshark-0.9.11~beta/misc/maplist.h Examining data/traceshark-0.9.11~beta/misc/osapi.h Examining data/traceshark-0.9.11~beta/misc/pngresources.h Examining data/traceshark-0.9.11~beta/misc/resources.h Examining data/traceshark-0.9.11~beta/misc/setting.cpp Examining data/traceshark-0.9.11~beta/misc/setting.h Examining data/traceshark-0.9.11~beta/misc/settingstore.cpp Examining data/traceshark-0.9.11~beta/misc/settingstore.h Examining data/traceshark-0.9.11~beta/misc/string.h Examining data/traceshark-0.9.11~beta/misc/svgresources.h Examining data/traceshark-0.9.11~beta/misc/traceshark.h Examining data/traceshark-0.9.11~beta/misc/translate.cpp Examining data/traceshark-0.9.11~beta/misc/translate.h Examining data/traceshark-0.9.11~beta/misc/tstring.h Examining data/traceshark-0.9.11~beta/misc/types.h Examining data/traceshark-0.9.11~beta/mm/mempool.cpp Examining data/traceshark-0.9.11~beta/mm/mempool.h Examining data/traceshark-0.9.11~beta/mm/stringpool.h Examining data/traceshark-0.9.11~beta/mm/stringtree.h Examining data/traceshark-0.9.11~beta/parser/fileinfo.cpp Examining data/traceshark-0.9.11~beta/parser/fileinfo.h Examining data/traceshark-0.9.11~beta/parser/ftrace/ftracegrammar.cpp Examining data/traceshark-0.9.11~beta/parser/ftrace/ftracegrammar.h Examining data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.cpp Examining data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h Examining data/traceshark-0.9.11~beta/parser/genericparams.h Examining data/traceshark-0.9.11~beta/parser/paramhelpers.h Examining data/traceshark-0.9.11~beta/parser/perf/helpers.h Examining data/traceshark-0.9.11~beta/parser/perf/perfgrammar.cpp Examining data/traceshark-0.9.11~beta/parser/perf/perfgrammar.h Examining data/traceshark-0.9.11~beta/parser/perf/perfparams.cpp Examining data/traceshark-0.9.11~beta/parser/perf/perfparams.h Examining data/traceshark-0.9.11~beta/parser/traceevent.cpp Examining data/traceshark-0.9.11~beta/parser/traceevent.h Examining data/traceshark-0.9.11~beta/parser/tracefile.cpp Examining data/traceshark-0.9.11~beta/parser/tracefile.h Examining data/traceshark-0.9.11~beta/parser/traceline.h Examining data/traceshark-0.9.11~beta/parser/tracelinedata.h Examining data/traceshark-0.9.11~beta/parser/traceparser.cpp Examining data/traceshark-0.9.11~beta/parser/traceparser.h Examining data/traceshark-0.9.11~beta/threads/indexwatcher.cpp Examining data/traceshark-0.9.11~beta/threads/indexwatcher.h Examining data/traceshark-0.9.11~beta/threads/loadbuffer.cpp Examining data/traceshark-0.9.11~beta/threads/loadbuffer.h Examining data/traceshark-0.9.11~beta/threads/loadthread.cpp Examining data/traceshark-0.9.11~beta/threads/loadthread.h Examining data/traceshark-0.9.11~beta/threads/threadbuffer.h Examining data/traceshark-0.9.11~beta/threads/tthread.cpp Examining data/traceshark-0.9.11~beta/threads/tthread.h Examining data/traceshark-0.9.11~beta/threads/workitem.h Examining data/traceshark-0.9.11~beta/threads/workqueue.cpp Examining data/traceshark-0.9.11~beta/threads/workqueue.h Examining data/traceshark-0.9.11~beta/threads/workthread.h Examining data/traceshark-0.9.11~beta/ui/abstracttaskmodel.cpp Examining data/traceshark-0.9.11~beta/ui/abstracttaskmodel.h Examining data/traceshark-0.9.11~beta/ui/cpuselectdialog.cpp Examining data/traceshark-0.9.11~beta/ui/cpuselectdialog.h Examining data/traceshark-0.9.11~beta/ui/cpuselectmodel.cpp Examining data/traceshark-0.9.11~beta/ui/cpuselectmodel.h Examining data/traceshark-0.9.11~beta/ui/cursor.cpp Examining data/traceshark-0.9.11~beta/ui/cursor.h Examining data/traceshark-0.9.11~beta/ui/cursorinfo.cpp Examining data/traceshark-0.9.11~beta/ui/cursorinfo.h Examining data/traceshark-0.9.11~beta/ui/errordialog.cpp Examining data/traceshark-0.9.11~beta/ui/errordialog.h Examining data/traceshark-0.9.11~beta/ui/eventinfodialog.cpp Examining data/traceshark-0.9.11~beta/ui/eventinfodialog.h Examining data/traceshark-0.9.11~beta/ui/eventselectdialog.cpp Examining data/traceshark-0.9.11~beta/ui/eventselectdialog.h Examining data/traceshark-0.9.11~beta/ui/eventselectmodel.cpp Examining data/traceshark-0.9.11~beta/ui/eventselectmodel.h Examining data/traceshark-0.9.11~beta/ui/eventsmodel.cpp Examining data/traceshark-0.9.11~beta/ui/eventsmodel.h Examining data/traceshark-0.9.11~beta/ui/eventswidget.cpp Examining data/traceshark-0.9.11~beta/ui/eventswidget.h Examining data/traceshark-0.9.11~beta/ui/graphenabledialog.cpp Examining data/traceshark-0.9.11~beta/ui/graphenabledialog.h Examining data/traceshark-0.9.11~beta/ui/infowidget.cpp Examining data/traceshark-0.9.11~beta/ui/infowidget.h Examining data/traceshark-0.9.11~beta/ui/licensedialog.cpp Examining data/traceshark-0.9.11~beta/ui/licensedialog.h Examining data/traceshark-0.9.11~beta/ui/mainwindow.cpp Examining data/traceshark-0.9.11~beta/ui/mainwindow.h Examining data/traceshark-0.9.11~beta/ui/migrationarrow.cpp Examining data/traceshark-0.9.11~beta/ui/migrationarrow.h Examining data/traceshark-0.9.11~beta/ui/migrationline.cpp Examining data/traceshark-0.9.11~beta/ui/migrationline.h Examining data/traceshark-0.9.11~beta/ui/qcustomplot.h Examining data/traceshark-0.9.11~beta/ui/statslimitedmodel.cpp Examining data/traceshark-0.9.11~beta/ui/statslimitedmodel.h Examining data/traceshark-0.9.11~beta/ui/statsmodel.cpp Examining data/traceshark-0.9.11~beta/ui/statsmodel.h Examining data/traceshark-0.9.11~beta/ui/tableview.cpp Examining data/traceshark-0.9.11~beta/ui/tableview.h Examining data/traceshark-0.9.11~beta/ui/taskgraph.cpp Examining data/traceshark-0.9.11~beta/ui/taskgraph.h Examining data/traceshark-0.9.11~beta/ui/taskmodel.cpp Examining data/traceshark-0.9.11~beta/ui/taskmodel.h Examining data/traceshark-0.9.11~beta/ui/taskrangeallocator.cpp Examining data/traceshark-0.9.11~beta/ui/taskrangeallocator.h Examining data/traceshark-0.9.11~beta/ui/taskselectdialog.cpp Examining data/traceshark-0.9.11~beta/ui/taskselectdialog.h Examining data/traceshark-0.9.11~beta/ui/tasktoolbar.cpp Examining data/traceshark-0.9.11~beta/ui/tasktoolbar.h Examining data/traceshark-0.9.11~beta/ui/traceplot.cpp Examining data/traceshark-0.9.11~beta/ui/traceplot.h Examining data/traceshark-0.9.11~beta/ui/tracesharkstyle.cpp Examining data/traceshark-0.9.11~beta/ui/tracesharkstyle.h Examining data/traceshark-0.9.11~beta/ui/valuebox.cpp Examining data/traceshark-0.9.11~beta/ui/valuebox.h Examining data/traceshark-0.9.11~beta/ui/yaxisticker.cpp Examining data/traceshark-0.9.11~beta/ui/yaxisticker.h Examining data/traceshark-0.9.11~beta/vtl/avltree.h Examining data/traceshark-0.9.11~beta/vtl/bitvector.cpp Examining data/traceshark-0.9.11~beta/vtl/bitvector.h Examining data/traceshark-0.9.11~beta/vtl/bsdexits.h Examining data/traceshark-0.9.11~beta/vtl/compiler.h Examining data/traceshark-0.9.11~beta/vtl/error.cpp Examining data/traceshark-0.9.11~beta/vtl/error.h Examining data/traceshark-0.9.11~beta/vtl/heapsort.h Examining data/traceshark-0.9.11~beta/vtl/time.h Examining data/traceshark-0.9.11~beta/vtl/tlist.h FINAL RESULTS: data/traceshark-0.9.11~beta/mm/stringpool.h:104:3: [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(node->key.ptr, key.ptr); data/traceshark-0.9.11~beta/mm/stringpool.h:208: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(entry->cache, refStr.ptr); data/traceshark-0.9.11~beta/mm/stringpool.h:241: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(newstr->ptr, str->ptr); data/traceshark-0.9.11~beta/ui/errordialog.cpp:197:6: [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. r = vsnprintf(buf, bufSize, fmt, ap); data/traceshark-0.9.11~beta/ui/errordialog.cpp:211: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. int r = vsnprintf(buf, bufSize, fmt, ap); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:456:9: [3] (random) lrand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = lrand48(); data/traceshark-0.9.11~beta/misc/settingstore.cpp:382:19: [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 *homedir = getenv("HOME"); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:90: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). return open(pathname, flags, mode); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:123: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). int TraceAnalyzer::open(const QString &fileName) data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:125:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int retval = parser->open(fileName); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:1239: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 tbuf[40]; data/traceshark-0.9.11~beta/analyzer/traceanalyzer.h:113:6: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int open(const QString &fileName); data/traceshark-0.9.11~beta/misc/errors.cpp:89:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *errorstrings[TS_NR_ERRORS] = { data/traceshark-0.9.11~beta/misc/settingstore.cpp:397:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::Truncate | QIODevice::WriteOnly)) { data/traceshark-0.9.11~beta/misc/settingstore.cpp:447:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly)) { data/traceshark-0.9.11~beta/mm/stringpool.h:136: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 cache[SP_CACHE_SIZE]; data/traceshark-0.9.11~beta/parser/ftrace/ftracegrammar.h:198: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 nbuf[256]; data/traceshark-0.9.11~beta/parser/ftrace/ftracegrammar.h:199: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 fbuf[256]; data/traceshark-0.9.11~beta/parser/ftrace/ftracegrammar.h:262: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[512]; data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h:153: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h:225: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h:413: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h:504: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h:588: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/perf/perfgrammar.h:229: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 cstr[256]; data/traceshark-0.9.11~beta/parser/perf/perfparams.h:227: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/perf/perfparams.h:292: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/perf/perfparams.h:426: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/perf/perfparams.h:536: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 sbuf[TASKNAME_MAXLEN + 1]; data/traceshark-0.9.11~beta/parser/traceevent.cpp:72: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 *eventstrings[NR_EVENTS] = { data/traceshark-0.9.11~beta/parser/tracefile.cpp:84: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(name, O_RDONLY); data/traceshark-0.9.11~beta/parser/traceparser.cpp:117: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). int TraceParser::open(const QString &fileName) data/traceshark-0.9.11~beta/parser/traceparser.h:89:6: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int open(const QString &fileName); data/traceshark-0.9.11~beta/ui/cursorinfo.cpp:146: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[40]; data/traceshark-0.9.11~beta/ui/cursorinfo.cpp:147:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. int s = sprintf(buf, "0000000."); data/traceshark-0.9.11~beta/ui/licensedialog.cpp:72:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly)) data/traceshark-0.9.11~beta/ui/mainwindow.cpp:2064:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rval = analyzer->open(fileName); data/traceshark-0.9.11~beta/ui/statslimitedmodel.cpp:174: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[10]; data/traceshark-0.9.11~beta/ui/statsmodel.cpp:171: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[10]; data/traceshark-0.9.11~beta/vtl/time.h:343: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[40]; data/traceshark-0.9.11~beta/vtl/time.h:374:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s = sprintf(b, "%u", sec); data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:82:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). scaledSchedData[i] = schedData.read(i) * schedScale + offset; data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:114:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (schedData.read(0) == SCHED_BIT) { data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:123:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (schedData.read(0) == SCHED_BIT) { data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:146:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prevState = schedData.read(0); data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:151:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). state = schedData.read(i); data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:195:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (schedData.read(0) == SCHED_BIT) { data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:204:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (schedData.read(0) == SCHED_BIT) { data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:242:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prevState = schedData.read(startidx); data/traceshark-0.9.11~beta/analyzer/abstracttask.cpp:246:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). state = schedData.read(i); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:260:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d = task.schedData.read(task.schedData.size() - 1); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:281:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d = task.schedData.read(task.schedData.size() - 1); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:1189: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). const int TraceAnalyzer::spaceStrLen = strlen(spaceStr); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:1337: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). nrspaces = TSMAX(1, spaceStrLen - strlen(ename)); data/traceshark-0.9.11~beta/analyzer/traceanalyzer.cpp:1340:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wb, spaceStr, nrspaces); data/traceshark-0.9.11~beta/misc/string.h:59: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). strncmp(STR, PREFIX, strlen(PREFIX)) data/traceshark-0.9.11~beta/misc/tstring.h:142:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ptr + len + 1, s->ptr, s->len); data/traceshark-0.9.11~beta/misc/tstring.h:151:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ptr, s->ptr, len); data/traceshark-0.9.11~beta/mm/stringtree.h:104:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(node->key.ptr, key.ptr, key.len + 1); data/traceshark-0.9.11~beta/parser/ftrace/ftracegrammar.cpp:94:13: [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). str.len = strlen(eventstrings[t]); data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h:530:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(c, d, sublen); data/traceshark-0.9.11~beta/parser/ftrace/ftraceparams.h:543:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(c, event.argv[i]->ptr, event.argv[i]->len); data/traceshark-0.9.11~beta/parser/paramhelpers.h:167:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, flen); data/traceshark-0.9.11~beta/parser/paramhelpers.h:209:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, flen); data/traceshark-0.9.11~beta/parser/paramhelpers.h:248:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(c, event.argv[i]->ptr, event.argv[i]->len); data/traceshark-0.9.11~beta/parser/paramhelpers.h:283:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(c, event.argv[i]->ptr, event.argv[i]->len); data/traceshark-0.9.11~beta/parser/perf/perfgrammar.cpp:88:13: [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). str.len = strlen(eventstrings[t]); data/traceshark-0.9.11~beta/parser/tracefile.cpp:190:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, mappedFile + chunk->offset, chunk->len); data/traceshark-0.9.11~beta/parser/tracefile.cpp:213:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, mappedFile + chunk->offset, chunk->len); data/traceshark-0.9.11~beta/parser/tracefile.h:263:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(fd, b, count); data/traceshark-0.9.11~beta/parser/tracefile.h:310:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(fd, b, count); data/traceshark-0.9.11~beta/threads/loadbuffer.cpp:103:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, lineBegin->ptr, lineBegin->len); data/traceshark-0.9.11~beta/threads/loadbuffer.cpp:106:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nRawBytes = read(fd, readBegin, bufSize); data/traceshark-0.9.11~beta/threads/loadbuffer.cpp:133:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lineBegin->ptr, c, lineBegin->len); data/traceshark-0.9.11~beta/vtl/bitvector.h:67:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). vtl_always_inline unsigned int read(unsigned int index) const; data/traceshark-0.9.11~beta/vtl/bitvector.h:84:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return BitVector::read(index) == 0x1; data/traceshark-0.9.11~beta/vtl/bitvector.h:111:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). vtl_always_inline unsigned int BitVector::read(unsigned int index) const ANALYSIS SUMMARY: Hits = 77 Lines analyzed = 29271 in approximately 0.84 seconds (35015 lines/second) Physical Source Lines of Code (SLOC) = 17821 Hits@level = [0] 12 [1] 36 [2] 34 [3] 2 [4] 5 [5] 0 Hits@level+ = [0+] 89 [1+] 77 [2+] 41 [3+] 7 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 4.99411 [1+] 4.32075 [2+] 2.30066 [3+] 0.392795 [4+] 0.280568 [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.