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/lnav-0.8.5/test/test_auto_fd.cc
Examining data/lnav-0.8.5/test/drive_view_colors.cc
Examining data/lnav-0.8.5/test/lnav_doctests.cc
Examining data/lnav-0.8.5/test/drive_sql_anno.cc
Examining data/lnav-0.8.5/test/test_yajlpp.cc
Examining data/lnav-0.8.5/test/drive_line_buffer.cc
Examining data/lnav-0.8.5/test/test_line_buffer2.cc
Examining data/lnav-0.8.5/test/test_abbrev.cc
Examining data/lnav-0.8.5/test/slicer.cc
Examining data/lnav-0.8.5/test/drive_grep_proc.cc
Examining data/lnav-0.8.5/test/test_reltime.cc
Examining data/lnav-0.8.5/test/scripty.cc
Examining data/lnav-0.8.5/test/drive_sql.cc
Examining data/lnav-0.8.5/test/test_ansi_scrubber.cc
Examining data/lnav-0.8.5/test/test_auto_mem.cc
Examining data/lnav-0.8.5/test/drive_logfile.cc
Examining data/lnav-0.8.5/test/drive_vt52_curses.cc
Examining data/lnav-0.8.5/test/test_json_ptr.cc
Examining data/lnav-0.8.5/test/drive_shlexer.cc
Examining data/lnav-0.8.5/test/drive_listview.cc
Examining data/lnav-0.8.5/test/test_grep_proc2.cc
Examining data/lnav-0.8.5/test/drive_data_scanner.cc
Examining data/lnav-0.8.5/test/test_bookmarks.cc
Examining data/lnav-0.8.5/test/test_log_accel.cc
Examining data/lnav-0.8.5/test/test_ncurses_unicode.cc
Examining data/lnav-0.8.5/test/drive_json_ptr_walk.cc
Examining data/lnav-0.8.5/test/drive_mvwattrline.cc
Examining data/lnav-0.8.5/test/drive_sequencer.cc
Examining data/lnav-0.8.5/test/test_pcrepp.cc
Examining data/lnav-0.8.5/test/test_date_time_scanner.cc
Examining data/lnav-0.8.5/test/drive_readline_curses.cc
Examining data/lnav-0.8.5/test/test_top_status.cc
Examining data/lnav-0.8.5/test/drive_json_op.cc
Examining data/lnav-0.8.5/src/filter_sub_source.cc
Examining data/lnav-0.8.5/src/strnatcmp.h
Examining data/lnav-0.8.5/src/time-extension-functions.cc
Examining data/lnav-0.8.5/src/vt52_curses.cc
Examining data/lnav-0.8.5/src/readline_curses.cc
Examining data/lnav-0.8.5/src/logfile_sub_source.cc
Examining data/lnav-0.8.5/src/lnav_log.cc
Examining data/lnav-0.8.5/src/db_sub_source.cc
Examining data/lnav-0.8.5/src/grep_proc.cc
Examining data/lnav-0.8.5/src/bookmarks.cc
Examining data/lnav-0.8.5/src/ptimec.cc
Examining data/lnav-0.8.5/src/ptimec_rt.cc
Examining data/lnav-0.8.5/src/log_accel.cc
Examining data/lnav-0.8.5/src/json_op.cc
Examining data/lnav-0.8.5/src/state-extension-functions.cc
Examining data/lnav-0.8.5/src/is_utf8.cc
Examining data/lnav-0.8.5/src/log_actions.cc
Examining data/lnav-0.8.5/src/json-extension-functions.cc
Examining data/lnav-0.8.5/src/intern_string.cc
Examining data/lnav-0.8.5/src/xterm_mouse.cc
Examining data/lnav-0.8.5/src/readline_possibilities.cc
Examining data/lnav-0.8.5/src/field_overlay_source.cc
Examining data/lnav-0.8.5/src/views_vtab.cc
Examining data/lnav-0.8.5/src/papertrail_proc.cc
Examining data/lnav-0.8.5/src/logfile.cc
Examining data/lnav-0.8.5/src/curl_looper.cc
Examining data/lnav-0.8.5/src/log_vtab_impl.cc
Examining data/lnav-0.8.5/src/readline_callbacks.cc
Examining data/lnav-0.8.5/src/string-extension-functions.cc
Examining data/lnav-0.8.5/src/extension-functions.cc
Examining data/lnav-0.8.5/src/hist_source.cc
Examining data/lnav-0.8.5/src/log_format_loader.cc
Examining data/lnav-0.8.5/src/pcrepp.cc
Examining data/lnav-0.8.5/src/pretty_printer.cc
Examining data/lnav-0.8.5/src/fstat_vtab.cc
Examining data/lnav-0.8.5/src/ansi_scrubber.cc
Examining data/lnav-0.8.5/src/test_override.c
Examining data/lnav-0.8.5/src/fts_fuzzy_match.cc
Examining data/lnav-0.8.5/src/view_curses.cc
Examining data/lnav-0.8.5/src/lnav_util.cc
Examining data/lnav-0.8.5/src/sysclip.cc
Examining data/lnav-0.8.5/src/shared_buffer.cc
Examining data/lnav-0.8.5/src/view_helpers.cc
Examining data/lnav-0.8.5/src/sequence_matcher.cc
Examining data/lnav-0.8.5/src/statusview_curses.cc
Examining data/lnav-0.8.5/src/file_vtab.cc
Examining data/lnav-0.8.5/src/filesystem/fwd.h
Examining data/lnav-0.8.5/src/filesystem/path.h
Examining data/lnav-0.8.5/src/filesystem/resolver.h
Examining data/lnav-0.8.5/src/input_dispatcher.cc
Examining data/lnav-0.8.5/src/shlex.cc
Examining data/lnav-0.8.5/src/textfile_highlighters.cc
Examining data/lnav-0.8.5/src/command_executor.cc
Examining data/lnav-0.8.5/src/log_level_re.cc
Examining data/lnav-0.8.5/src/line_buffer.cc
Examining data/lnav-0.8.5/src/readline_highlighters.cc
Examining data/lnav-0.8.5/src/lnav_config.cc
Examining data/lnav-0.8.5/src/yajlpp.cc
Examining data/lnav-0.8.5/src/filter_status_source.cc
Examining data/lnav-0.8.5/src/relative_time.cc
Examining data/lnav-0.8.5/src/listview_curses.cc
Examining data/lnav-0.8.5/src/xterm-palette.c
Examining data/lnav-0.8.5/src/strnatcmp.c
Examining data/lnav-0.8.5/src/timer.cc
Examining data/lnav-0.8.5/src/optional.hpp
Examining data/lnav-0.8.5/src/textview_curses.cc
Examining data/lnav-0.8.5/src/spookyhash/SpookyV2.h
Examining data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp
Examining data/lnav-0.8.5/src/sql_util.cc
Examining data/lnav-0.8.5/src/hotkeys.cc
Examining data/lnav-0.8.5/src/data_parser.cc
Examining data/lnav-0.8.5/src/log_level.cc
Examining data/lnav-0.8.5/src/piper_proc.cc
Examining data/lnav-0.8.5/src/filter_observer.cc
Examining data/lnav-0.8.5/src/session_data.cc
Examining data/lnav-0.8.5/src/fs-extension-functions.cc
Examining data/lnav-0.8.5/src/sqlite-extension-func.cc
Examining data/lnav-0.8.5/src/collation-functions.cc
Examining data/lnav-0.8.5/src/log_format_impls.cc
Examining data/lnav-0.8.5/src/regexp_vtab.cc
Examining data/lnav-0.8.5/src/simdutf8check.h
Examining data/lnav-0.8.5/src/environ_vtab.cc
Examining data/lnav-0.8.5/src/mapbox/variant_io.hpp
Examining data/lnav-0.8.5/src/mapbox/recursive_wrapper.hpp
Examining data/lnav-0.8.5/src/mapbox/variant.hpp
Examining data/lnav-0.8.5/src/mapbox/variant_visitor.hpp
Examining data/lnav-0.8.5/src/bin2c.c
Examining data/lnav-0.8.5/src/help_text_formatter.cc
Examining data/lnav-0.8.5/src/k_merge_tree.h
Examining data/lnav-0.8.5/src/network-extension-functions.cc
Examining data/lnav-0.8.5/src/json_ptr.cc
Examining data/lnav-0.8.5/src/log_format.cc
Examining data/lnav-0.8.5/src/yajl/yajl_common.h
Examining data/lnav-0.8.5/src/yajl/yajl_buf.h
Examining data/lnav-0.8.5/src/yajl/yajl_version.h
Examining data/lnav-0.8.5/src/yajl/yajl_parser.c
Examining data/lnav-0.8.5/src/yajl/yajl_encode.h
Examining data/lnav-0.8.5/src/yajl/yajl_alloc.c
Examining data/lnav-0.8.5/src/yajl/yajl_lex.c
Examining data/lnav-0.8.5/src/yajl/yajl_gen.c
Examining data/lnav-0.8.5/src/yajl/yajl_tree.c
Examining data/lnav-0.8.5/src/yajl/yajl_version.c
Examining data/lnav-0.8.5/src/yajl/api/yajl_tree.h
Examining data/lnav-0.8.5/src/yajl/api/yajl_gen.h
Examining data/lnav-0.8.5/src/yajl/api/yajl_common.h
Examining data/lnav-0.8.5/src/yajl/api/yajl_parse.h
Examining data/lnav-0.8.5/src/yajl/yajl_buf.c
Examining data/lnav-0.8.5/src/yajl/yajl.c
Examining data/lnav-0.8.5/src/yajl/yajl_parser.h
Examining data/lnav-0.8.5/src/yajl/yajl_bytestack.h
Examining data/lnav-0.8.5/src/yajl/yajl_lex.h
Examining data/lnav-0.8.5/src/yajl/yajl_alloc.h
Examining data/lnav-0.8.5/src/yajl/yajl_encode.c
Examining data/lnav-0.8.5/src/vtab_module.cc
Examining data/lnav-0.8.5/src/lnav_commands.cc
Examining data/lnav-0.8.5/src/data_scanner_re.cc
Examining data/lnav-0.8.5/src/data_scanner.cc
Examining data/lnav-0.8.5/src/bottom_status_source.cc
Examining data/lnav-0.8.5/src/elem_to_json.cc
Examining data/lnav-0.8.5/src/time_fmts.cc
Examining data/lnav-0.8.5/src/text_format.cc
Examining data/lnav-0.8.5/src/lnav.cc

FINAL RESULTS:

data/lnav-0.8.5/src/fs-extension-functions.cc:145:10:  [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.
    rc = readlink(path, buf, sizeof(buf));
data/lnav-0.8.5/src/bin2c.c:68: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(buf, cp);
data/lnav-0.8.5/src/command_executor.cc:328:17:  [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(row_count_buf, sizeof(row_count_buf),
data/lnav-0.8.5/src/command_executor.cc:493:18:  [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.
        else if (access(script_name.c_str(), R_OK) == 0) {
data/lnav-0.8.5/src/command_executor.cc:506:17:  [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(local_path.c_str(), R_OK) == 0) {
data/lnav-0.8.5/src/extension-functions.cc:211:12:  [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).
    return strcpy( res, z );
data/lnav-0.8.5/src/extension-functions.cc:698: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((char*)zo, (char*)sqlite3_value_text(argv[0]));
data/lnav-0.8.5/src/extension-functions.cc:701: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((char*)(z+i*nLen), (char*)zo);
data/lnav-0.8.5/src/extension-functions.cc:806: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(zt,zi);
data/lnav-0.8.5/src/extension-functions.cc:856:12:  [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).
      zt = strcpy(zo,zi)+zll;
data/lnav-0.8.5/src/extension-functions.cc:915: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(zt, zi);
data/lnav-0.8.5/src/extension-functions.cc:1148: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((char*) rz, (char*) (zt));
data/lnav-0.8.5/src/hist_source.cc:85:5:  [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(line, sizeof(line),
data/lnav-0.8.5/src/lnav.cc:617:17:  [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(path.c_str(), R_OK) == 0) {
data/lnav-0.8.5/src/lnav.cc:857: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, usage_msg, lnav_data.ld_program_name);
data/lnav-0.8.5/src/lnav.cc:1014:17:  [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(path.c_str(), F_OK) == -1) {
data/lnav-0.8.5/src/lnav.cc:1031:34:  [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.
            else if (required || access(abspath.in(), R_OK) == 0) {
data/lnav-0.8.5/src/lnav.cc:1907:17:  [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(optarg, X_OK) != 0) {
data/lnav-0.8.5/src/lnav_commands.cc:991:13:  [4] (shell) execvp:
  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.
            execvp(args[0], (char *const *) args);
data/lnav-0.8.5/src/lnav_commands.cc:1750: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.
        if (access(fn.c_str(), R_OK) != 0 &&
data/lnav-0.8.5/src/lnav_commands.cc:1840:22:  [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.
            else if (access(fn.c_str(), R_OK) == -1) {
data/lnav-0.8.5/src/lnav_commands.cc:3030:20:  [4] (shell) system:
  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.
        log_perror(system(cmdline.substr(args[0].size()).c_str()));
data/lnav-0.8.5/src/lnav_config.cc:76:17:  [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 (home && access(home, W_OK|X_OK) == 0) {
data/lnav-0.8.5/src/lnav_config.cc:158: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.
        if (access(local_path.c_str(), R_OK) == 0) {
data/lnav-0.8.5/src/lnav_config.cc:161:13:  [4] (shell) execlp:
  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.
            execlp("git", "git", "pull", NULL);
data/lnav-0.8.5/src/lnav_config.cc:164:13:  [4] (shell) execlp:
  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.
            execlp("git", "git", "clone", repo, local_path.c_str(), NULL);
data/lnav-0.8.5/src/lnav_config.cc:188:23:  [4] (shell) system:
  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.
            int ret = system(pull_cmd);
data/lnav-0.8.5/src/lnav_config.cc:233:9:  [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_root.c_str(), R_OK) == 0) {
data/lnav-0.8.5/src/lnav_config.cc:240:20:  [4] (shell) system:
  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.
        log_perror(system(pull_cmd));
data/lnav-0.8.5/src/lnav_config.cc:249:20:  [4] (shell) system:
  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.
        log_perror(system(clone_cmd));
data/lnav-0.8.5/src/lnav_log.cc:262: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.
    rc = vsnprintf(&line[prefix_size], MAX_LOG_LINE_SIZE - prefix_size,
data/lnav-0.8.5/src/lnav_log.cc:286: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.
    rc = vsnprintf(line, MAX_LOG_LINE_SIZE - 1, fmt, args);
data/lnav-0.8.5/src/lnav_log.cc:394: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, CRASH_MSG, crash_path);
data/lnav-0.8.5/src/lnav_log.cc:412:21:  [4] (shell) execlp:
  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.
                    execlp("gdb", "gdb", pid_str, NULL);
data/lnav-0.8.5/src/lnav_log.cc:416:21:  [4] (shell) execlp:
  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.
                    execlp("lldb", "lldb", pid_str, NULL);
data/lnav-0.8.5/src/lnav_util.cc:183:5:  [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(buffer, sizeof(buffer), fmt, amount);
data/lnav-0.8.5/src/log_actions.cc:102:13:  [4] (shell) execvp:
  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.
            execvp(args[0], (char *const *) args);
data/lnav-0.8.5/src/piper_proc.cc:65:5:  [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(time_str, ms_str);
data/lnav-0.8.5/src/readline_callbacks.cc:126:17:  [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(example_txt, sizeof(example_txt),
data/lnav-0.8.5/src/readline_callbacks.cc:194:21:  [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(help_text, sizeof(help_text),
data/lnav-0.8.5/src/readline_callbacks.cc:259:17:  [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(help_text, sizeof(help_text),
data/lnav-0.8.5/src/readline_curses.cc:606:25:  [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(rl_line_buffer, initial);
data/lnav-0.8.5/src/readline_curses.cc:665:30:  [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.
                    else if (sscanf(msg, "cp:%d:%s", &context, type)) {
data/lnav-0.8.5/src/relative_time.cc:257:25:  [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. If the scanf format is influenceable by an
  attacker, it's exploitable.
                    if (sscanf(numstr.c_str(), "%" PRId64, &number) != 1) {
data/lnav-0.8.5/src/relative_time.cc:477:16:  [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.
        pos += snprintf(pos, sizeof(dst) - (pos - dst),
data/lnav-0.8.5/src/relative_time.cc:483:20:  [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.
            pos += snprintf(pos, sizeof(dst) - (pos - dst),
data/lnav-0.8.5/src/relative_time.cc:488:24:  [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.
                pos += snprintf(pos, sizeof(dst) - (pos - dst),
data/lnav-0.8.5/src/relative_time.cc:550: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.
        snprintf(segment, sizeof(segment), curr_interval->format, amount,
data/lnav-0.8.5/src/sysclip.cc:61:9:  [4] (shell) system:
  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.
    if (system("which pbcopy > /dev/null 2>&1") == 0) {
data/lnav-0.8.5/src/sysclip.cc:64:9:  [4] (shell) system:
  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.
    if (system("which xclip > /dev/null 2>&1") == 0) {
data/lnav-0.8.5/src/sysclip.cc:70:9:  [4] (shell) system:
  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.
    if (system("which clip.exe > /dev/null 2>&1") == 0) {
data/lnav-0.8.5/src/sysclip.cc:87:17:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        pfile = popen(cc[type].cc_cmd[op], mode);
data/lnav-0.8.5/src/yajl/yajl_parser.c:96:9:  [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((char *) str, errorType);
data/lnav-0.8.5/src/yajl/yajl_parser.c:100:13:  [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((char *) str, errorText);
data/lnav-0.8.5/src/yajl/yajl_parser.c:137:17:  [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((char *) newStr, (char *) str);
data/lnav-0.8.5/src/yajl/yajl_parser.c:138:17:  [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((char *) newStr, text);
data/lnav-0.8.5/src/yajl/yajl_parser.c:139:17:  [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((char *) newStr, arrow);
data/lnav-0.8.5/src/yajl/yajl_tree.c:29: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 sprintf_s
data/lnav-0.8.5/src/yajl/yajl_tree.c:55:13:  [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 ((ctx)->errbuf, (ctx)->errbuf_size, __VA_ARGS__);  \
data/lnav-0.8.5/test/drive_data_scanner.cc:140:17:  [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(log_line, &line[13]);
data/lnav-0.8.5/test/drive_data_scanner.cc:208:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(cmd, "diff -u %s %s", argv[lpc], TMP_NAME);
data/lnav-0.8.5/test/drive_data_scanner.cc:209:22:  [4] (shell) system:
  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.
                rc = system(cmd);
data/lnav-0.8.5/test/scripty.cc:362: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, usage_msg, scripty_data.sd_program_name);
data/lnav-0.8.5/test/scripty.cc:513:6:  [4] (shell) execvp:
  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.
	    execvp(argv[0], argv);
data/lnav-0.8.5/test/test_abbrev.cc:55:9:  [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(buffer, td.str);
data/lnav-0.8.5/src/command_executor.cc:188:39:  [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.
                else if ((env_value = getenv(&name[1])) != NULL) {
data/lnav-0.8.5/src/environ_vtab.cc:249:32:  [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.
    } else if (name != NULL && getenv(name) != NULL) {
data/lnav-0.8.5/src/filesystem/path.h:82:13:  [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(str().c_str(), temp) == NULL)
data/lnav-0.8.5/src/fs-extension-functions.cc:161: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(path, resolved_path) == NULL) {
data/lnav-0.8.5/src/lnav.cc:621:32:  [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 ((abspath = realpath(path.c_str(), NULL)) == NULL) {
data/lnav-0.8.5/src/lnav.cc:1025:28:  [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 ((abspath = realpath(gl->gl_pathv[lpc], nullptr)) == NULL) {
data/lnav-0.8.5/src/lnav.cc:1819:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *LANG = getenv("LANG");
data/lnav-0.8.5/src/lnav.cc:1832:9:  [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("LNAVSECURE") != nullptr) {
data/lnav-0.8.5/src/lnav.cc:1858:17:  [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, "hHarRCc:I:iuf:d:nqtw:vVW")) != -1) {
data/lnav-0.8.5/src/lnav.cc:2289:29:  [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.
        else if ((abspath = realpath(argv[lpc], NULL)) == NULL) {
data/lnav-0.8.5/src/lnav_commands.cc:1652:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        else if (getenv("HOME") == NULL) {
data/lnav-0.8.5/src/lnav_commands.cc:1825:33:  [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.
            else if ((abspath = realpath(fn.c_str(), NULL)) == NULL) {
data/lnav-0.8.5/src/lnav_commands.cc:2603:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                     getenv("LNAV_SRC"),
data/lnav-0.8.5/src/lnav_commands.cc:4415:9:  [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("LNAV_SRC") != nullptr) {
data/lnav-0.8.5/src/lnav_commands.cc:4421:9:  [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("lnav_test") != nullptr) {
data/lnav-0.8.5/src/lnav_config.cc:75:12:  [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.
    home = getenv("HOME");
data/lnav-0.8.5/src/lnav_config.cc:91:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *env_value = getenv("LNAV_EXP");
data/lnav-0.8.5/src/lnav_log.cc:154:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *log_path = getenv("LNAV_LOG_PATH");
data/lnav-0.8.5/src/lnav_log.cc:180:27:  [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.
    log_info("  HOME=%s", getenv("HOME"));
data/lnav-0.8.5/src/lnav_log.cc:181:27:  [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.
    log_info("  LANG=%s", getenv("LANG"));
data/lnav-0.8.5/src/lnav_log.cc:182:27:  [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.
    log_info("  PATH=%s", getenv("PATH"));
data/lnav-0.8.5/src/lnav_log.cc:183:27:  [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.
    log_info("  TERM=%s", getenv("TERM"));
data/lnav-0.8.5/src/lnav_log.cc:184:25:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    log_info("  TZ=%s", getenv("TZ"));
data/lnav-0.8.5/src/lnav_util.cc:679:28:  [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.
    retval += ":" + string(getenv("PATH"));
data/lnav-0.8.5/src/log_actions.cc:96:34:  [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.
            path += ":" + string(getenv("PATH"));
data/lnav-0.8.5/src/logfile.cc:66:13:  [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(filename.c_str(), resolved_path) == NULL) {
data/lnav-0.8.5/src/piper_proc.cc:86: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 ((tmpdir = getenv("TMPDIR")) == NULL) {
data/lnav-0.8.5/src/readline_curses.cc:716:16:  [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.
        home = getenv("HOME");
data/lnav-0.8.5/src/sql_util.cc:704:41:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                } else if ((env_value = getenv(&name[1])) != NULL) {
data/lnav-0.8.5/src/vt52_curses.cc:148: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.
        tgetent(NULL, getenv("TERM"));
data/lnav-0.8.5/test/drive_data_scanner.cc:74:17:  [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, "pPl")) != -1) {
data/lnav-0.8.5/test/drive_line_buffer.cc:63:14:  [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, "o:i:n:c:")) != -1) {
data/lnav-0.8.5/test/drive_listview.cc:100:17:  [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, "y:t:l:r:h:w")) != -1) {
data/lnav-0.8.5/test/drive_logfile.cc:77:9:  [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("test_dir") != NULL) {
data/lnav-0.8.5/test/drive_logfile.cc:78: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.
      paths.push_back(getenv("test_dir"));
data/lnav-0.8.5/test/drive_logfile.cc:83: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 ((c = getopt(argc, argv, "ef:ltv")) != -1) {
data/lnav-0.8.5/test/drive_mvwattrline.cc:44:17:  [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, "w")) != -1) {
data/lnav-0.8.5/test/drive_readline_curses.cc:98:17:  [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, "h")) != -1) {
data/lnav-0.8.5/test/drive_view_colors.cc:102:14:  [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, "w")) != -1) {
data/lnav-0.8.5/test/drive_vt52_curses.cc:73: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 ((c = getopt(argc, argv, "y:")) != -1) {
data/lnav-0.8.5/test/drive_vt52_curses.cc:84:25:  [3] (random) random:
  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.
    assert(vt.map_input(random(), len) != NULL);
data/lnav-0.8.5/test/scripty.cc:375:17:  [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, "ht:f:r:e:ns")) != -1) {
data/lnav-0.8.5/test/test_bookmarks.cc:86:31:  [3] (random) random:
  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.
    bv.insert_once(vis_line_t(random() % LINE_COUNT));
data/lnav-0.8.5/src/bin2c.c:45:10:  [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).
	ifile = fopen(ifname, "rb");
data/lnav-0.8.5/src/bin2c.c:51:10:  [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).
	ofile = fopen(ofname, "wb");
data/lnav-0.8.5/src/bin2c.c:57: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[PATH_MAX], *p;
data/lnav-0.8.5/src/collation-functions.cc:53: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[MAX_ADDR_LEN + 1];
data/lnav-0.8.5/src/collation-functions.cc:87: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 a_addr[sizeof(struct in6_addr)],
data/lnav-0.8.5/src/command_executor.cc:324:17:  [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 row_count_buf[128];
data/lnav-0.8.5/src/command_executor.cc:376:22:  [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).
    else if ((file = fopen(path.c_str(), "r")) == nullptr) {
data/lnav-0.8.5/src/command_executor.cc:463:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char env_arg_name[32];
data/lnav-0.8.5/src/command_executor.cc:744:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[1024];
data/lnav-0.8.5/src/command_executor.cc:760:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char desc[128];
data/lnav-0.8.5/src/data_scanner.cc:154:7:  [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.
const char *DNT_NAMES[DNT_MAX - DNT_KEY] = {
data/lnav-0.8.5/src/data_scanner.cc:326:25:  [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 in6str[INET6_ADDRSTRLEN];
data/lnav-0.8.5/src/data_scanner.cc:327:25:  [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[sizeof(struct in6_addr)];
data/lnav-0.8.5/src/elem_to_json.cc:103:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[32];
data/lnav-0.8.5/src/environ_vtab.cc:215:27:  [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.
        argc > 2 ? (const char *)sqlite3_value_text(argv[2]) : NULL);
data/lnav-0.8.5/src/environ_vtab.cc:242:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char name[namelen + 1];
data/lnav-0.8.5/src/environ_vtab.cc:244:9:  [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(name, var, namelen);
data/lnav-0.8.5/src/extension-functions.cc:779: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.
    zi = (char *)sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/extension-functions.cc:833: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.
    zi = (char *)sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/extension-functions.cc:888: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.
    zi = (char *)sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/extension-functions.cc:947: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.
    zi1 = (char *)sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/extension-functions.cc:948: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.
    zi2 = (char *)sqlite3_value_text(argv[1]);
data/lnav-0.8.5/src/extension-functions.cc:1123: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.
  z  = (char *)sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/extension-functions.cc:1332: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.
  z = (char *)sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/extension-functions.cc:1666:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(zResult, "?000");
data/lnav-0.8.5/src/extension-functions.cc:1674: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 zResult1[8];
data/lnav-0.8.5/src/extension-functions.cc:1675: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 zResult2[8];
data/lnav-0.8.5/src/field_overlay_source.cc:231: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 old_timestamp[64], curr_timestamp[64], orig_timestamp[64];
data/lnav-0.8.5/src/field_overlay_source.cc:314:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char offset_str[32];
data/lnav-0.8.5/src/filesystem/path.h:81:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char temp[PATH_MAX];
data/lnav-0.8.5/src/filesystem/path.h:269:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char temp[PATH_MAX];
data/lnav-0.8.5/src/filesystem/path.h:284:20:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        int size = MultiByteToWideChar(CP_UTF8, 0, &temp[0], (int)temp.size(), NULL, 0);
data/lnav-0.8.5/src/filesystem/path.h:286:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, 0, &temp[0], (int)temp.size(), &result[0], size);
data/lnav-0.8.5/src/filter_sub_source.cc:258: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 hits[32];
data/lnav-0.8.5/src/fs-extension-functions.cc:142: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[st.st_size];
data/lnav-0.8.5/src/fs-extension-functions.cc:159: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 resolved_path[PATH_MAX];
data/lnav-0.8.5/src/fstat_vtab.cc:148:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char time_buf[32];
data/lnav-0.8.5/src/fstat_vtab.cc:322:34:  [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.
    const char *pattern = (const char *) sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/fts_fuzzy_match.cc:75:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(matches, srcMatches, nextMatch);
data/lnav-0.8.5/src/fts_fuzzy_match.cc:86:25:  [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(bestRecursiveMatches, recursiveMatches, 256);
data/lnav-0.8.5/src/fts_fuzzy_match.cc:165:13:  [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(matches, bestRecursiveMatches, maxMatches);
data/lnav-0.8.5/src/grep_proc.cc:109: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 (out_pipe.open() < 0) {
data/lnav-0.8.5/src/grep_proc.cc:113: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 (err_pipe.open() < 0) {
data/lnav-0.8.5/src/grep_proc.cc:160: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   outbuf[BUFSIZ * 2];
data/lnav-0.8.5/src/grep_proc.cc:167:21:  [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).
    lnav_log_file = fopen("/tmp/lnav.grep.err", "a");
data/lnav-0.8.5/src/grep_proc.cc:321:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024 + 1];
data/lnav-0.8.5/src/hist_source.cc:73: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 tm_buffer[128];
data/lnav-0.8.5/src/hist_source.cc:74: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 line[256];
data/lnav-0.8.5/src/hotkeys.cc:176: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 keyseq[16];
data/lnav-0.8.5/src/hotkeys.cc:746:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char buffer[64];
data/lnav-0.8.5/src/hotkeys.cc:919:21:  [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[64];
data/lnav-0.8.5/src/intern_string.cc:73: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(strcp, str, len);
data/lnav-0.8.5/src/json-extension-functions.cc:190:34:  [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.
    const char *json_in = (const char *)sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/json-extension-functions.cc:197:33:  [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.
    const char *ptr_in = (const char *)sqlite3_value_text(argv[1]);
data/lnav-0.8.5/src/json_ptr.cc:109: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 partially_encoded_key[len + 32];
data/lnav-0.8.5/src/json_ptr.cc:120:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char fully_encoded_key[required_len];
data/lnav-0.8.5/src/line_buffer.cc:106:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char lockname[64];
data/lnav-0.8.5/src/line_buffer.cc:109: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).
        this->lh_fd = open(lockname, O_CREAT | O_RDWR, 0600);
data/lnav-0.8.5/src/line_buffer.cc:172:13:  [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 gz_id[2 + 1 + 1 + 4];
data/lnav-0.8.5/src/line_buffer.cc:372:17:  [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             scratch[32 * 1024];
data/lnav-0.8.5/src/lnav.cc:169:7:  [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.
const char *lnav_view_strings[LNV__MAX + 1] = {
data/lnav-0.8.5/src/lnav.cc:197: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 *view_titles[LNV__MAX] = {
data/lnav-0.8.5/src/lnav.cc:1176: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 keyseq[32] = "";
data/lnav-0.8.5/src/lnav.cc:1210: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 keyseq[32] = "";
data/lnav-0.8.5/src/lnav.cc:1240:13:  [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 linebuf[32];
data/lnav-0.8.5/src/lnav.cc:1982:21:  [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).
    lnav_log_file = fopen(lnav_data.ld_debug_log_name, "a");
data/lnav-0.8.5/src/lnav.cc:2033:26:  [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 ((in_fd = open(argv[lpc], O_RDONLY)) == -1) {
data/lnav-0.8.5/src/lnav.cc:2036:32:  [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).
            else if ((out_fd = open(dst_path.c_str(),
data/lnav-0.8.5/src/lnav.cc:2042:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buffer[2048];
data/lnav-0.8.5/src/lnav.cc:2214:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char start_dir[FILENAME_MAX];
data/lnav-0.8.5/src/lnav.cc:2270:28:  [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 ((fifo_fd = open(argv[lpc], O_RDONLY)) == -1) {
data/lnav-0.8.5/src/lnav.cc:2279:17:  [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 desc[128];
data/lnav-0.8.5/src/lnav_commands.cc:165:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[1024];
data/lnav-0.8.5/src/lnav_commands.cc:190:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char      ftime[128] = "";
data/lnav-0.8.5/src/lnav_commands.cc:242: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      ftime[128];
data/lnav-0.8.5/src/lnav_commands.cc:662:19:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        outfile = tmpfile();
data/lnav-0.8.5/src/lnav_commands.cc:698:25:  [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).
    else if ((outfile = fopen(split_args[0].c_str(), mode)) == nullptr) {
data/lnav-0.8.5/src/lnav_commands.cc:884:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[32 * 1024];
data/lnav-0.8.5/src/lnav_commands.cc:936: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).
    in_pipe.open();
data/lnav-0.8.5/src/lnav_commands.cc:937:14:  [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).
    out_pipe.open();
data/lnav-0.8.5/src/lnav_commands.cc:961:17:  [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 tmp_str[64];
data/lnav-0.8.5/src/lnav_commands.cc:1093:18:  [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 *file = fopen(split_args[0].c_str(), "w");
data/lnav-0.8.5/src/lnav_commands.cc:1806:32:  [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 ((fifo_fd = open(fn.c_str(), O_RDONLY)) == -1) {
data/lnav-0.8.5/src/lnav_commands.cc:1815:21:  [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 desc[128];
data/lnav-0.8.5/src/lnav_commands.cc:1890:36:  [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).
            else if ((preview_fd = open(fn.c_str(), O_RDONLY)) == -1) {
data/lnav-0.8.5/src/lnav_commands.cc:1895:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buffer[32 * 1024];
data/lnav-0.8.5/src/lnav_commands.cc:2300:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char ftime[64];
data/lnav-0.8.5/src/lnav_commands.cc:2594:13:  [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/lnav-0.8.5/src/lnav_commands.cc:2606:25:  [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 ((file = fopen(path, "w")) == NULL) {
data/lnav-0.8.5/src/lnav_commands.cc:2865:13:  [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 min_time_str[32], max_time_str[32];
data/lnav-0.8.5/src/lnav_commands.cc:2937:13:  [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 time_text[256];
data/lnav-0.8.5/src/lnav_config.cc:77:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char hpath[2048];
data/lnav-0.8.5/src/lnav_config.cc:182:13:  [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 pull_cmd[1024];
data/lnav-0.8.5/src/lnav_config.cc:234:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char pull_cmd[1024];
data/lnav-0.8.5/src/lnav_config.cc:243:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char clone_cmd[1024];
data/lnav-0.8.5/src/lnav_config.cc:253:15:  [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(config_json.c_str(), O_RDONLY)) == -1) {
data/lnav-0.8.5/src/lnav_config.cc:259: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.
        unsigned char buffer[4096];
data/lnav-0.8.5/src/lnav_config.cc:381:15:  [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(path.c_str(), O_RDONLY)) == -1) {
data/lnav-0.8.5/src/lnav_config.cc:383:13:  [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 errmsg[1024];
data/lnav-0.8.5/src/lnav_config.cc:393:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[2048];
data/lnav-0.8.5/src/lnav_config.cc:500:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char filename[128];
data/lnav-0.8.5/src/lnav_config.cc:524: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).
            if ((fd = open(user_config_tmp.c_str(),
data/lnav-0.8.5/src/lnav_log.cc:108: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 lr_data[BUFFER_SIZE];
data/lnav-0.8.5/src/lnav_log.cc:157:25:  [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).
        lnav_log_file = fopen(log_path, "a");
data/lnav-0.8.5/src/lnav_log.cc:168: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 cwd[MAXPATHLEN];
data/lnav-0.8.5/src/lnav_log.cc:314: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 crash_path[1024], latest_crash_path[1024];
data/lnav-0.8.5/src/lnav_log.cc:344:15:  [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(crash_path, O_CREAT|O_TRUNC|O_WRONLY, 0600)) != -1) {
data/lnav-0.8.5/src/lnav_log.cc:409:21:  [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 pid_str[32];
data/lnav-0.8.5/src/lnav_log.cc:462:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024];
data/lnav-0.8.5/src/lnav_util.cc:140: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        buffer[64];
data/lnav-0.8.5/src/lnav_util.cc:205:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[64];
data/lnav-0.8.5/src/lnav_util.cc:233: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        cwd[FILENAME_MAX];
data/lnav-0.8.5/src/lnav_util.cc:253: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 cwd[3] = "";
data/lnav-0.8.5/src/lnav_util.cc:306:15:  [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(filename.c_str(), O_RDONLY)) != -1) {
data/lnav-0.8.5/src/lnav_util.cc:307:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[32];
data/lnav-0.8.5/src/lnav_util.cc:511:13:  [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 time_cp[time_len + 1];
data/lnav-0.8.5/src/lnav_util.cc:515:13:  [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(time_cp, time_dest, time_len);
data/lnav-0.8.5/src/log_actions.cc:56: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).
    in_pipe.open();
data/lnav-0.8.5/src/log_actions.cc:58: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).
        out_pipe.open();
data/lnav-0.8.5/src/log_actions.cc:59:14:  [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).
    err_pipe.open();
data/lnav-0.8.5/src/log_actions.cc:72:19:  [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.
            const char *args[action.ad_cmdline.size() + 1];
data/lnav-0.8.5/src/log_actions.cc:74:13:  [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 env_buffer[64];
data/lnav-0.8.5/src/log_actions.cc:131:17:  [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 desc[128];
data/lnav-0.8.5/src/log_format.cc:321:13:  [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 level_buf[128];
data/lnav-0.8.5/src/log_format.cc:951:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char time_buf[64];
data/lnav-0.8.5/src/log_format.cc:1138:25:  [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 ts[64];
data/lnav-0.8.5/src/log_format.cc:1671:21:  [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 index_str[32];
data/lnav-0.8.5/src/log_format_impls.cc:451:25:  [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 field_copy[sf.length() + 1];
data/lnav-0.8.5/src/log_format_impls.cc:527:17:  [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 full_name[128];
data/lnav-0.8.5/src/log_format_loader.cc:662:22:  [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 ((sample_fd = open(sample_path.c_str(),
data/lnav-0.8.5/src/log_format_loader.cc:674: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 ((sh_fd = open(sh_path.c_str(), O_WRONLY|O_TRUNC|O_CREAT, 0755)) == -1 ||
data/lnav-0.8.5/src/log_format_loader.cc:692:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char path[2048];
data/lnav-0.8.5/src/log_format_loader.cc:704:26:  [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 ((script_fd = open(script_path.c_str(), O_WRONLY|O_TRUNC|O_CREAT, 0755)) == -1 ||
data/lnav-0.8.5/src/log_format_loader.cc:737:15:  [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(filename.c_str(), O_RDONLY)) == -1) {
data/lnav-0.8.5/src/log_format_loader.cc:738:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char errmsg[1024];
data/lnav-0.8.5/src/log_format_loader.cc:748:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[2048];
data/lnav-0.8.5/src/log_format_loader.cc:1043: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 buffer[8 * 1024];
data/lnav-0.8.5/src/log_format_loader.cc:1051:22:  [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).
    } else if ((fp = fopen(meta_inout.sm_path.c_str(), "r")) != NULL) {
data/lnav-0.8.5/src/log_level.cc:35:7:  [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.
const char *level_names[LEVEL__MAX + 1] = {
data/lnav-0.8.5/src/log_vtab_impl.cc:359:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char   buffer[64];
data/lnav-0.8.5/src/log_vtab_impl.cc:367:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[64];
data/lnav-0.8.5/src/log_vtab_impl.cc:798:9:  [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(index_copy, &indexes[0], len);
data/lnav-0.8.5/src/logfile.cc:63:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char resolved_path[PATH_MAX];
data/lnav-0.8.5/src/logfile.cc:78:27:  [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 ((loo.loo_fd = open(resolved_path, O_RDONLY)) == -1) {
data/lnav-0.8.5/src/logfile_sub_source.cc:79:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024];
data/lnav-0.8.5/src/logfile_sub_source.cc:231:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[128];
data/lnav-0.8.5/src/network-extension-functions.cc:55: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             buffer[INET6_ADDRSTRLEN];
data/lnav-0.8.5/src/network-extension-functions.cc:91: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        buffer[NI_MAXHOST];
data/lnav-0.8.5/src/optional.hpp:504:31:  [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 struct { unsigned char data[ sizeof(value_type) ]; } aligned_storage_t;
data/lnav-0.8.5/src/piper_proc.cc: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           time_str[64];
data/lnav-0.8.5/src/piper_proc.cc:60: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           ms_str[8];
data/lnav-0.8.5/src/piper_proc.cc:66:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(time_str, "  ");
data/lnav-0.8.5/src/piper_proc.cc:77: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).
                 open(filename, O_RDWR | O_CREAT | O_TRUNC, 0600)) == -1) {
data/lnav-0.8.5/src/piper_proc.cc:83:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char piper_tmpname[PATH_MAX];
data/lnav-0.8.5/src/piper_proc.cc:92:28:  [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 ((this->pp_fd = mkstemp(piper_tmpname)) == -1) {
data/lnav-0.8.5/src/piper_proc.cc:114: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).
        nullfd = open("/dev/null", O_RDWR);
data/lnav-0.8.5/src/ptimec.cc:45: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.
    static char charstr[4];
data/lnav-0.8.5/src/ptimec.cc:48:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(charstr, "\\'");
data/lnav-0.8.5/src/ptimec_rt.cc:43: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 zone[zone_len + 1];
data/lnav-0.8.5/src/ptimec_rt.cc:46: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(zone, &str[off_inout], zone_len);
data/lnav-0.8.5/src/readline_callbacks.cc:118:13:  [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 example_txt[1024];
data/lnav-0.8.5/src/readline_callbacks.cc:192:21:  [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 help_text[1024];
data/lnav-0.8.5/src/readline_callbacks.cc:257:17:  [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 help_text[1024];
data/lnav-0.8.5/src/readline_callbacks.cc:594:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        tmpout = std::tmpfile();
data/lnav-0.8.5/src/readline_callbacks.cc:602:13:  [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 desc[256], timestamp[32];
data/lnav-0.8.5/src/readline_curses.cc:161: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 prefix[2] = { cmd, ':' };
data/lnav-0.8.5/src/readline_curses.cc:406: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 msg[64];
data/lnav-0.8.5/src/readline_curses.cc:483:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024];
data/lnav-0.8.5/src/readline_curses.cc:590:17:  [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 msg[1024 + 1];
data/lnav-0.8.5/src/readline_curses.cc:599:21:  [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 type[32];
data/lnav-0.8.5/src/readline_curses.cc:627:25:  [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 reply[4];
data/lnav-0.8.5/src/readline_curses.cc:718:13:  [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 hpath[2048];
data/lnav-0.8.5/src/readline_curses.cc:734: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           msg[1024] = {0};
data/lnav-0.8.5/src/readline_curses.cc:801:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[128];
data/lnav-0.8.5/src/readline_curses.cc:814:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char msg[1024 + 1];
data/lnav-0.8.5/src/readline_curses.cc:909: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 buffer[1024];
data/lnav-0.8.5/src/readline_curses.cc:935: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 buffer[1024];
data/lnav-0.8.5/src/readline_curses.cc:947: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 buffer[1024];
data/lnav-0.8.5/src/readline_curses.cc:962: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 buffer[1024];
data/lnav-0.8.5/src/readline_curses.cc:982: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 buffer[1024];
data/lnav-0.8.5/src/readline_curses.cc:996: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 buffer[1024];
data/lnav-0.8.5/src/readline_possibilities.cc:195:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[64];
data/lnav-0.8.5/src/regexp_vtab.cc:227:32:  [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.
    const char *value = (const char *) sqlite3_value_text(argv[0]);
data/lnav-0.8.5/src/regexp_vtab.cc:228:34:  [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.
    const char *pattern = (const char *) sqlite3_value_text(argv[1]);
data/lnav-0.8.5/src/relative_time.cc:222:49:  [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).
                    this->rt_field[RTF_HOURS] = atoi(hstr.c_str());
data/lnav-0.8.5/src/relative_time.cc:223:51:  [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).
                    this->rt_field[RTF_MINUTES] = atoi(mstr.c_str());
data/lnav-0.8.5/src/relative_time.cc:226:55:  [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).
                        this->rt_field[RTF_SECONDS] = atoi(sstr.c_str());
data/lnav-0.8.5/src/relative_time.cc:233:41:  [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).
                                        atoi(substr.c_str()) * 1000;
data/lnav-0.8.5/src/relative_time.cc:237:41:  [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).
                                        atoi(substr.c_str());
data/lnav-0.8.5/src/relative_time.cc:439: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 dst[128] = "";
data/lnav-0.8.5/src/relative_time.cc:535:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char      segment[32];
data/lnav-0.8.5/src/session_data.cc:105: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 timestamp[64];
data/lnav-0.8.5/src/session_data.cc:223:13:  [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        hash_id[64];
data/lnav-0.8.5/src/session_data.cc:316: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   view_info_pattern_base[128];
data/lnav-0.8.5/src/session_data.cc:525:29:  [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 error_buffer[1024];
data/lnav-0.8.5/src/session_data.cc:843:15:  [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(view_info_name.c_str(), O_RDONLY)) < 0) {
data/lnav-0.8.5/src/session_data.cc:847: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.
        unsigned char buffer[1024];
data/lnav-0.8.5/src/session_data.cc:1203: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           view_base_name[256];
data/lnav-0.8.5/src/session_data.cc:1219:17:  [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 ((file = fopen(view_file_tmp_name.c_str(), "w")) == nullptr) {
data/lnav-0.8.5/src/session_data.cc:1341:25:  [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 min_time_str[32], max_time_str[32];
data/lnav-0.8.5/src/shared_buffer.cc:76:13:  [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(this->sb_data, &other.sb_data[offset], len);
data/lnav-0.8.5/src/simdutf8check.h:211:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[16];
data/lnav-0.8.5/src/simdutf8check.h:213:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer, src + i, len - i);
data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp:40:9:  [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(buf, message, length);
data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp:170:13:  [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(buf, u.p64, sc_blockSize);
data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp:178: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(buf, end, remainder);
data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp:217:9:  [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(&((uint8 *)m_data)[m_remainder], message, length);
data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp:251:9:  [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(&(((uint8 *)m_data)[m_remainder]), message, prefix);
data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp:278:13:  [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(m_data, u.p8, sc_blockSize);
data/lnav-0.8.5/src/spookyhash/SpookyV2.cpp:286: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(m_data, end, remainder);
data/lnav-0.8.5/src/state-extension-functions.cc:53: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 buffer[64];
data/lnav-0.8.5/src/string-extension-functions.cc:110:13:  [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(cap_copy, cap_start, cap->length());
data/lnav-0.8.5/src/string-extension-functions.cc:146:17:  [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(cap_copy, cap_start, cap->length());
data/lnav-0.8.5/src/sysclip.cc:40: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.
    const char *cc_cmd[2];
data/lnav-0.8.5/src/time-extension-functions.cc:87: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 ts[64];
data/lnav-0.8.5/src/views_vtab.cc:53:40:  [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.
        const char *view_name = (const char *) sqlite3_value_text(val[argi]);
data/lnav-0.8.5/src/views_vtab.cc:76:40:  [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.
        const char *type_name = (const char *) sqlite3_value_text(val[argi]);
data/lnav-0.8.5/src/views_vtab.cc:91:38:  [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.
        const char *pattern = (const char *) sqlite3_value_text(val[argi]);
data/lnav-0.8.5/src/views_vtab.cc:175:21:  [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 timestamp[64];
data/lnav-0.8.5/src/vt52_curses.cc:114:16:  [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 area_buffer[1024];
data/lnav-0.8.5/src/yajl/yajl.c:67: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((void *) &(hand->alloc), (void *) afs, sizeof(yajl_alloc_funcs));
data/lnav-0.8.5/src/yajl/yajl_buf.c:76:9:  [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(buf->data + buf->used, data, len);
data/lnav-0.8.5/src/yajl/yajl_encode.c:40: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 hexBuf[7];
data/lnav-0.8.5/src/yajl/yajl_encode.c:124:13:  [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 utf8Buf[5];
data/lnav-0.8.5/src/yajl/yajl_gen.c:119: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((void *) &(g->alloc), (void *) afs, sizeof(yajl_alloc_funcs));
data/lnav-0.8.5/src/yajl/yajl_gen.c:211: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 i[32];
data/lnav-0.8.5/src/yajl/yajl_gen.c:213:5:  [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.
    sprintf(i, "%lld", number);
data/lnav-0.8.5/src/yajl/yajl_gen.c:229: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 i[32];
data/lnav-0.8.5/src/yajl/yajl_gen.c:233:5:  [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.
    sprintf(i, "%.20g", number);
data/lnav-0.8.5/src/yajl/yajl_gen.c:235:9:  [2] (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). Risk is low because the
  source is a constant string.
        strcat(i, ".0");
data/lnav-0.8.5/src/yajl/yajl_lex.c:138: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 charLookupTable[256] =
data/lnav-0.8.5/src/yajl/yajl_parser.c:72: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 text[72];
data/lnav-0.8.5/src/yajl/yajl_parser.c:97:9:  [2] (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). Risk is low because the
  source is a constant string.
        strcat((char *) str, " error");
data/lnav-0.8.5/src/yajl/yajl_parser.c:99:13:  [2] (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). Risk is low because the
  source is a constant string.
            strcat((char *) str, ": ");
data/lnav-0.8.5/src/yajl/yajl_tree.c:286: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(v->u.string, string, string_length);
data/lnav-0.8.5/src/yajl/yajl_tree.c:307: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(v->u.number.r, string, string_length);
data/lnav-0.8.5/src/yajlpp.cc:220:9:  [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(&ypc->ypc_path[start], key, len);
data/lnav-0.8.5/test/drive_data_scanner.cc:122:24:  [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 ((out = fopen(TMP_NAME, "w")) == NULL) {
data/lnav-0.8.5/test/drive_data_scanner.cc:130:17:  [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   cmd[2048];
data/lnav-0.8.5/test/drive_data_scanner.cc:172:43:  [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).
                data_parser::TRACE_FILE = fopen("scanned.dpt", "w");
data/lnav-0.8.5/test/drive_data_scanner.cc:212:25:  [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 resp[4];
data/lnav-0.8.5/test/drive_grep_proc.cc:120: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).
    else if ((fd = open(argv[2], O_RDONLY)) == -1) {
data/lnav-0.8.5/test/drive_json_op.cc:147: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.
        unsigned char buffer[1024];
data/lnav-0.8.5/test/drive_json_ptr_walk.cc:43: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 buffer[1024];
data/lnav-0.8.5/test/drive_line_buffer.cc:94:17:  [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 ((file = fopen(optarg, "r")) == NULL) {
data/lnav-0.8.5/test/drive_line_buffer.cc:123:33:  [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).
	} else if ((argc > 0) && (fd = open(argv[0], O_RDONLY)) == -1) {
data/lnav-0.8.5/test/drive_listview.cc:62:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buffer[32];
data/lnav-0.8.5/test/drive_listview.cc:103:15:  [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).
	    lv.set_y(atoi(optarg));
data/lnav-0.8.5/test/drive_listview.cc:106:31:  [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).
	    lv.set_height(vis_line_t(atoi(optarg)));
data/lnav-0.8.5/test/drive_listview.cc:110:28:  [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).
	    lv.set_top(vis_line_t(atoi(optarg)));
data/lnav-0.8.5/test/drive_listview.cc:113:18:  [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).
	    lv.set_left(atoi(optarg));
data/lnav-0.8.5/test/drive_listview.cc:119:19:  [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).
	    ms.ms_rows = atoi(optarg);
data/lnav-0.8.5/test/drive_logfile.cc:152:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[1024];
data/lnav-0.8.5/test/drive_readline_curses.cc:93:10:  [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("/tmp/lnav.err", O_WRONLY|O_CREAT|O_APPEND, 0666);
data/lnav-0.8.5/test/drive_sequencer.cc:101: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).
    else if ((fd = open(argv[2], O_RDONLY)) == -1) {
data/lnav-0.8.5/test/drive_view_colors.cc:52: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 label[64];
data/lnav-0.8.5/test/drive_vt52_curses.cc:68:8:  [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("/tmp/lnav.err", O_WRONLY|O_CREAT|O_APPEND, 0666);
data/lnav-0.8.5/test/drive_vt52_curses.cc:76:16:  [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).
      vt.set_y(atoi(optarg));
data/lnav-0.8.5/test/lnav_doctests.cc:93:13:  [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 ftime_result[128];
data/lnav-0.8.5/test/lnav_doctests.cc:94:13:  [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 strftime_result[128];
data/lnav-0.8.5/test/scripty.cc:391:18:  [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 ((file = fopen(optarg, "r")) == NULL) {
data/lnav-0.8.5/test/scripty.cc:396: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 line[32 * 1024];
data/lnav-0.8.5/test/scripty.cc:426:18:  [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 ((file = fopen(optarg, "r")) == NULL) {
data/lnav-0.8.5/test/scripty.cc:431: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 line[32 * 1024];
data/lnav-0.8.5/test/scripty.cc:477:3:  [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).
	 fopen(scripty_data.sd_to_child_name, "w")) == NULL) {
data/lnav-0.8.5/test/scripty.cc:490:5:  [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).
		  fopen(scripty_data.sd_from_child_name, "w")) == NULL) {
data/lnav-0.8.5/test/scripty.cc:499:10:  [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("/tmp/scripty.err", O_WRONLY|O_CREAT|O_APPEND, 0666);
data/lnav-0.8.5/test/scripty.cc:522:6:  [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 out_buffer[8192];
data/lnav-0.8.5/test/scripty.cc:603:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		    char buffer[1024];
data/lnav-0.8.5/test/scripty.cc:669: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(&out_buffer[out_len],
data/lnav-0.8.5/test/slicer.cc:53: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).
    else if ((fd = open(argv[1], O_RDONLY)) == -1) {
data/lnav-0.8.5/test/test_abbrev.cc:53:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024];
data/lnav-0.8.5/test/test_auto_fd.cc:48: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).
    tmp = open("/dev/null", O_RDONLY);
data/lnav-0.8.5/test/test_auto_fd.cc:58: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).
    tmp = open("/dev/null", O_RDONLY);
data/lnav-0.8.5/test/test_date_time_scanner.cc:74:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char ts[64];
data/lnav-0.8.5/test/test_ncurses_unicode.cc:26: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[1024];
data/lnav-0.8.5/test/test_ncurses_unicode.cc:27:18:  [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 *file = fopen(argv[1], "r");
data/lnav-0.8.5/src/bin2c.c:33:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int c = fgetc(f);
data/lnav-0.8.5/src/collation-functions.cc:56:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, p, p_len);
data/lnav-0.8.5/src/command_executor.cc:751:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/src/db_sub_source.cc:52:24:  [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(this->dls_rows[row][lpc]) -
data/lnav-0.8.5/src/db_sub_source.cc:88:26:  [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 row_len = strlen(row_value);
data/lnav-0.8.5/src/db_sub_source.cc:144: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).
        value_len = strlen(colstr);
data/lnav-0.8.5/src/db_sub_source.cc:175:59:  [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).
        std::max(this->dls_headers[index].hm_column_size, strlen(colstr) + 1);
data/lnav-0.8.5/src/db_sub_source.cc:238:26:  [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 col_len = strlen(col_value);
data/lnav-0.8.5/src/extension-functions.cc:210: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).
    char *res = (char *) sqlite3_malloc(strlen(z) + 1 );
data/lnav-0.8.5/src/extension-functions.cc:796:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      zo = (char *) sqlite3_malloc(strlen(zi) + ilen - zl + 1);
data/lnav-0.8.5/src/extension-functions.cc:850: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).
      zll = strlen(zi);
data/lnav-0.8.5/src/extension-functions.cc:905: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).
      zll = strlen(zi);
data/lnav-0.8.5/src/extension-functions.cc:953: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).
    zo = (char *) sqlite3_malloc(strlen(zi1) + 1);
data/lnav-0.8.5/src/extension-functions.cc:968:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(zot, z21, z22-z21);
data/lnav-0.8.5/src/extension-functions.cc:1097:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char*) rz, (char*) z, zt-z);
data/lnav-0.8.5/src/extension-functions.cc:1168:16:  [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* ss = s+strlen(s)-1;
data/lnav-0.8.5/src/extension-functions.cc:1281:9:  [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).
  lz1 = strlen(z1);
data/lnav-0.8.5/src/extension-functions.cc:1282:9:  [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).
  lz2 = strlen(z2);
data/lnav-0.8.5/src/extension-functions.cc:1283:9:  [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).
  lz3 = strlen(z3);
data/lnav-0.8.5/src/extension-functions.cc:1333:7:  [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).
  l = strlen(z);
data/lnav-0.8.5/src/fs-extension-functions.cc:63:24:  [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).
    for (ssize_t lpc = strlen(path_in) - 1; lpc >= 0; lpc--) {
data/lnav-0.8.5/src/fs-extension-functions.cc:88:16:  [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).
    text_end = strlen(path_in) - 1;
data/lnav-0.8.5/src/grep_proc.cc:324:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc = read(this->gp_err_pipe, buffer, sizeof(buffer) - 1);
data/lnav-0.8.5/src/grep_proc.cc:329: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).
            if (strncmp(buffer, PREFIX, strlen(PREFIX)) == 0) {
data/lnav-0.8.5/src/grep_proc.cc:336:58:  [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).
                    this->gp_control->grep_error(&buffer[strlen(PREFIX)]);
data/lnav-0.8.5/src/help_text_formatter.cc:133:46:  [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).
                    out.append(body_indent + strlen(ht.ht_name) + 1, ' ');
data/lnav-0.8.5/src/help_text_formatter.cc:235: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).
            max_param_name_width = std::max(strlen(param.ht_name),
data/lnav-0.8.5/src/help_text_formatter.cc:253:48:  [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).
                .append(max_param_name_width - strlen(param.ht_name), ' ')
data/lnav-0.8.5/src/help_text_formatter.cc:264:46:  [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).
            max_result_name_width = std::max(strlen(result.ht_name),
data/lnav-0.8.5/src/help_text_formatter.cc:282:48:  [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).
               .append(max_result_name_width - strlen(result.ht_name), ' ')
data/lnav-0.8.5/src/hotkeys.cc:962: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).
                        size_t col_len = strlen(col_value);
data/lnav-0.8.5/src/intern_string.cc:60:15:  [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(str);
data/lnav-0.8.5/src/json-extension-functions.cc:122:66:  [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 (yajl_parse(handle.in(), (const unsigned char *) json_in, strlen(json_in)) != yajl_status_ok ||
data/lnav-0.8.5/src/json-extension-functions.cc:124:50:  [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).
        throw yajlpp_error(handle.in(), json_in, strlen(json_in));
data/lnav-0.8.5/src/json-extension-functions.cc:214:69:  [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).
    switch (yajl_parse(handle.in(), (const unsigned char *)json_in, strlen(json_in))) {
data/lnav-0.8.5/src/json-extension-functions.cc:216:78:  [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).
        err = yajl_get_error(handle.in(), 0, (const unsigned char *)json_in, strlen(json_in));
data/lnav-0.8.5/src/json-extension-functions.cc:233:78:  [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).
        err = yajl_get_error(handle.in(), 0, (const unsigned char *)json_in, strlen(json_in));
data/lnav-0.8.5/src/json-extension-functions.cc:308:49:  [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).
        yajl_gen_string(jac->jac_yajl_gen, key, strlen((const char *) key));
data/lnav-0.8.5/src/json-extension-functions.cc:322:37:  [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((const char *)value));
data/lnav-0.8.5/src/json-extension-functions.cc:328:37:  [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((const char *) value));
data/lnav-0.8.5/src/json-extension-functions.cc:339:33:  [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((const char *) value));
data/lnav-0.8.5/src/json-extension-functions.cc:402:37:  [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((const char *)value));
data/lnav-0.8.5/src/json-extension-functions.cc:408:37:  [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((const char *) value));
data/lnav-0.8.5/src/json-extension-functions.cc:419:33:  [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((const char *) value));
data/lnav-0.8.5/src/json_ptr.cc:183: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).
        src_len = strlen(src);
data/lnav-0.8.5/src/json_ptr.cc:221: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).
        src_len = strlen(src);
data/lnav-0.8.5/src/json_ptr.cc:296:15:  [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(component);
data/lnav-0.8.5/src/line_buffer.cc:427:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            rc = read(this->lb_fd,
data/lnav-0.8.5/src/lnav.cc:1179:27:  [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).
        snprintf(keyseq + strlen(keyseq), sizeof(keyseq) - strlen(keyseq),
data/lnav-0.8.5/src/lnav.cc:1179:60:  [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).
        snprintf(keyseq + strlen(keyseq), sizeof(keyseq) - strlen(keyseq),
data/lnav-0.8.5/src/lnav.cc:1201:9:  [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 (strlen(escape_buffer) < longest->first.size()) {
data/lnav-0.8.5/src/lnav.cc:1213:27:  [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).
        snprintf(keyseq + strlen(keyseq), sizeof(keyseq) - strlen(keyseq),
data/lnav-0.8.5/src/lnav.cc:1213:60:  [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).
        snprintf(keyseq + strlen(keyseq), sizeof(keyseq) - strlen(keyseq),
data/lnav-0.8.5/src/lnav.cc:1245:30:  [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).
            max_line_width = strlen(linebuf);
data/lnav-0.8.5/src/lnav.cc:1304:13:  [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(10000);
data/lnav-0.8.5/src/lnav.cc:1827:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(077);
data/lnav-0.8.5/src/lnav.cc:1958:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (isatty(STDIN_FILENO) && read(STDIN_FILENO, &b, 1) == -1) {
data/lnav-0.8.5/src/lnav.cc:2045:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((rc = read(in_fd, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/src/lnav_commands.cc:229: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).
            len = strlen(ftime);
data/lnav-0.8.5/src/lnav_commands.cc:253: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).
    len = strlen(ftime);
data/lnav-0.8.5/src/lnav_commands.cc:519:17:  [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(dls.dls_rows[row][col]));
data/lnav-0.8.5/src/lnav_commands.cc:534:68:  [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).
                    switch (yajl_parse(parse_handle.in(), json_in, strlen((const char *) json_in))) {
data/lnav-0.8.5/src/lnav_commands.cc:537:81:  [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).
                            err = yajl_get_error(parse_handle.in(), 0, json_in, strlen((const char *) json_in));
data/lnav-0.8.5/src/lnav_commands.cc:548:81:  [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).
                            err = yajl_get_error(parse_handle.in(), 0, json_in, strlen((const char *) json_in));
data/lnav-0.8.5/src/lnav_commands.cc:1898:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                rc = read(preview_fd, buffer, sizeof(buffer));
data/lnav-0.8.5/src/lnav_config.cc:264:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/src/lnav_config.cc:400:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            rc = read(fd, buffer, sizeof(buffer));
data/lnav-0.8.5/src/lnav_config.cc:442: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).
                   strlen(config_json)) != yajl_status_ok) {
data/lnav-0.8.5/src/lnav_config.cc:444:98:  [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).
                         string((char *)yajl_get_error(handle, 1, (unsigned char *) config_json, strlen(config_json))));
data/lnav-0.8.5/src/lnav_log.cc:466:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int rc = read(fd, buffer, sizeof(buffer));
data/lnav-0.8.5/src/lnav_util.cc:310:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/src/log_format.cc:81:15:  [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(msg);
data/lnav-0.8.5/src/log_format.cc:326:59:  [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).
            pcre_context::capture_t level_cap = {0, (int) strlen(level_buf)};
data/lnav-0.8.5/src/log_format_impls.cc:250:9:  [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(find);
data/lnav-0.8.5/src/log_format_impls.cc:274: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).
        this->ss_separator_len = strlen(this->ss_separator);
data/lnav-0.8.5/src/log_format_impls.cc:279: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).
        this->ss_separator_len = strlen(sep);
data/lnav-0.8.5/src/log_format_loader.cc:667:16:  [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(default_log_formats_json)) == -1)) {
data/lnav-0.8.5/src/log_format_loader.cc:675: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).
        write(sh_fd.get(), dump_pid_sh, strlen(dump_pid_sh)) == -1) {
data/lnav-0.8.5/src/log_format_loader.cc:696:22:  [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).
        script_len = strlen(script_content);
data/lnav-0.8.5/src/log_format_loader.cc:757:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            rc = read(fd, buffer, sizeof(buffer));
data/lnav-0.8.5/src/log_format_loader.cc:850:27:  [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(default_log_formats_json)) != yajl_status_ok) {
data/lnav-0.8.5/src/log_format_loader.cc:852:97:  [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).
            string((char *)yajl_get_error(handle, 1, (unsigned char *)default_log_formats_json, strlen(default_log_formats_json))));
data/lnav-0.8.5/src/log_format_loader.cc:1069:51:  [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).
            string script_name = string(filename, strlen(filename) - 5);
data/lnav-0.8.5/src/log_level_re.cc:45:15:  [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(levelstr);
data/lnav-0.8.5/src/log_vtab_impl.cc:362: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).
        sqlite3_result_text(ctx, buffer, strlen(buffer), SQLITE_TRANSIENT);
data/lnav-0.8.5/src/log_vtab_impl.cc:395:46:  [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).
            sqlite3_result_text(ctx, buffer, strlen(buffer), SQLITE_TRANSIENT);
data/lnav-0.8.5/src/log_vtab_impl.cc:426: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).
                            strlen(level_name),
data/lnav-0.8.5/src/log_vtab_impl.cc:725:49:  [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).
                dts.scan((const char *)datestr, strlen((const char *)datestr), NULL, &mytm, tv);
data/lnav-0.8.5/src/log_vtab_impl.cc:854:33:  [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).
            ypc.parse(log_tags, strlen((const char *) log_tags));
data/lnav-0.8.5/src/logfile_sub_source.cc:83:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/src/papertrail_proc.cc:173: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).
        write(this->ptp_fd, err_msg, strlen(err_msg));
data/lnav-0.8.5/src/papertrail_proc.cc:174: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).
        write(this->ptp_fd, this->cr_error_buffer, strlen(this->cr_error_buffer));
data/lnav-0.8.5/src/piper_proc.cc:67:33:  [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 pwrite(fd, time_str, strlen(time_str), woff);
data/lnav-0.8.5/src/piper_proc.cc:186:43:  [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).
                           STDIN_EOF_MSG, strlen(STDIN_EOF_MSG),
data/lnav-0.8.5/src/readline_curses.cc:227: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).
        auto len = strlen(text);
data/lnav-0.8.5/src/readline_curses.cc:319: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).
            space = rl_line_buffer + strlen(rl_line_buffer);
data/lnav-0.8.5/src/readline_curses.cc:411:37:  [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).
        max_len = max(max_len, (int)strlen(matches[lpc]));
data/lnav-0.8.5/src/readline_curses.cc:433:28:  [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(matches[lpc])) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:605:47:  [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).
                        rl_extend_line_buffer(strlen(initial) + 1);
data/lnav-0.8.5/src/readline_curses.cc:607: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).
                        rl_end = strlen(initial);
data/lnav-0.8.5/src/readline_curses.cc:638: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).
                                       strlen(reply)) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:742:24:  [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(msg)) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:779: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).
                   strlen(msg)) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:803:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc = read(this->rc_pty[RCF_MASTER], buffer, sizeof(buffer));
data/lnav-0.8.5/src/readline_curses.cc:918: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).
                   strlen(buffer) + 1) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:927:24:  [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(buffer) + 1) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:940: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).
                   strlen(buffer) + 1) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:953: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).
                   strlen(buffer)) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:973: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).
                   strlen(buffer) + 1) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:989: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).
                   strlen(buffer) + 1) == -1) {
data/lnav-0.8.5/src/readline_curses.cc:1003: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).
                   strlen(buffer) + 1) == -1) {
data/lnav-0.8.5/src/relative_time.cc:552: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).
        retval += strlen(segment);
data/lnav-0.8.5/src/session_data.cc:486: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).
                if (!dts.scan(log_time, strlen(log_time), NULL, &log_tm, log_tv)) {
data/lnav-0.8.5/src/session_data.cc:647: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).
                if (!dts.scan(log_time, strlen(log_time), nullptr, &log_tm, log_tv)) {
data/lnav-0.8.5/src/session_data.cc:851:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/src/sql_util.cc:578: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).
    alloc_size = strlen(ident) + quote_count * 2 + (needs_quote ? 2: 0) + 1;
data/lnav-0.8.5/src/string-extension-functions.cc:209: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).
        int64_t len = arg != nullptr ? strlen(arg) : 0;
data/lnav-0.8.5/src/string-extension-functions.cc:231: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).
        int64_t len = value != nullptr ? strlen((const char *) value) : 0;
data/lnav-0.8.5/src/time-extension-functions.cc:60: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).
    if (!rt.parse(slice_in, strlen(slice_in), pe)) {
data/lnav-0.8.5/src/time-extension-functions.cc:75:27:  [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 (dts.scan(time_in, strlen(time_in), NULL, &tm, tv) == NULL) {
data/lnav-0.8.5/src/view_curses.cc:102:25:  [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(xterm_palette_json));
data/lnav-0.8.5/src/view_helpers.cc:165:27:  [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).
    shlex lexer(help_txt, strlen(help_txt));
data/lnav-0.8.5/src/vt52_curses.cc:175: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).
        len_out = strlen(retval);
data/lnav-0.8.5/src/yajl/yajl_encode.c:69:47:  [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).
            print(ctx, escaped, (unsigned int)strlen(escaped));
data/lnav-0.8.5/src/yajl/yajl_encode.c:171:59:  [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).
            yajl_buf_append(buf, unescaped, (unsigned int)strlen(unescaped));
data/lnav-0.8.5/src/yajl/yajl_gen.c:133: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).
    if (sep != NULL) g->print(g->ctx, sep, strlen(sep));
data/lnav-0.8.5/src/yajl/yajl_gen.c:160: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).
                         (unsigned int)strlen(g->indentString));        \
data/lnav-0.8.5/src/yajl/yajl_gen.c:214:39:  [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).
    g->print(g->ctx, i, (unsigned int)strlen(i));
data/lnav-0.8.5/src/yajl/yajl_gen.c:234:37:  [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 (strspn(i, "0123456789-") == strlen(i)) {
data/lnav-0.8.5/src/yajl/yajl_gen.c:237:39:  [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).
    g->print(g->ctx, i, (unsigned int)strlen(i));
data/lnav-0.8.5/src/yajl/yajl_gen.c:278:30:  [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).
    g->print(g->ctx, "null", strlen("null"));
data/lnav-0.8.5/src/yajl/yajl_gen.c:290: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).
    g->print(g->ctx, val, (unsigned int)strlen(val));
data/lnav-0.8.5/src/yajl/yajl_parser.c:87:22:  [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).
        memneeded += strlen(errorType);
data/lnav-0.8.5/src/yajl/yajl_parser.c:88:22:  [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).
        memneeded += strlen(" error");
data/lnav-0.8.5/src/yajl/yajl_parser.c:90:26:  [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).
            memneeded += strlen(": ");
data/lnav-0.8.5/src/yajl/yajl_parser.c:91:26:  [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).
            memneeded += strlen(errorText);
data/lnav-0.8.5/src/yajl/yajl_parser.c:102:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat((char *) str, "\n");
data/lnav-0.8.5/src/yajl/yajl_parser.c:132:58:  [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).
                YA_MALLOC(&(hand->alloc), (unsigned int)(strlen((char *) str) +
data/lnav-0.8.5/src/yajl/yajl_parser.c:133:58:  [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((char *) text) +
data/lnav-0.8.5/src/yajl/yajl_parser.c:134:58:  [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(arrow) + 1));
data/lnav-0.8.5/src/yajl/yajl_tree.c:314: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).
                                       strlen(v->u.number.r));
data/lnav-0.8.5/src/yajl/yajl_tree.c:437:25:  [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 (input));
data/lnav-0.8.5/src/yajl/yajl_tree.c:443:22:  [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(input));
data/lnav-0.8.5/src/yajlpp.cc:380: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).
    if (handler != nullptr && strlen(handler->jph_synopsis) > 0 &&
data/lnav-0.8.5/src/yajlpp.cc:381:9:  [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(handler->jph_description) > 0) {
data/lnav-0.8.5/test/drive_data_scanner.cc:217:36:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                        log_perror(scanf("%3s", resp));
data/lnav-0.8.5/test/drive_json_op.cc:171:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((rc = read(STDIN_FILENO, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/test/drive_json_ptr_walk.cc:50:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((rc = read(STDIN_FILENO, buffer, sizeof(buffer))) > 0) {
data/lnav-0.8.5/test/drive_shlexer.cc:58:26:  [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).
    shlex lexer(argv[1], strlen(argv[1]));
data/lnav-0.8.5/test/drive_vt52_curses.cc:119: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).
      vt.map_output(CANNED_INPUT[lpc], strlen(CANNED_INPUT[lpc]));
data/lnav-0.8.5/test/lnav_doctests.cc:66:67:  [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).
    bool rc = ptime_fmt("%Y-%d-%m\t%H:%M:%S", &tm, date_str, off, strlen(date_str));
data/lnav-0.8.5/test/scripty.cc:213: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).
    len = strlen(src) / 2;
data/lnav-0.8.5/test/scripty.cc:241:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    	struct expect_read *read;
data/lnav-0.8.5/test/scripty.cc:609:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = read(STDIN_FILENO, buffer, sizeof(buffer));
data/lnav-0.8.5/test/scripty.cc:651:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = read(ct.get_fd(), buffer, sizeof(buffer));
data/lnav-0.8.5/test/test_abbrev.cc:56:48:  [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 actual = abbreviate_str(buffer, strlen(td.str), td.max_len);
data/lnav-0.8.5/test/test_bookmarks.cc:90:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  assert(equal(bv.begin(), bv.end(), bv_cp.begin()));
data/lnav-0.8.5/test/test_bookmarks.cc:92:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  assert(equal(bv.begin(), bv.end(), bv_cp.begin()));
data/lnav-0.8.5/test/test_date_time_scanner.cc:70: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).
        rc = dts.scan(GOOD_TIMES[lpc], strlen(GOOD_TIMES[lpc]), NULL, &tm, tv);
data/lnav-0.8.5/test/test_date_time_scanner.cc:103: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).
        assert(dts.scan(BAD_TIMES[lpc], strlen(BAD_TIMES[lpc]), NULL, &tm, tv) == NULL);
data/lnav-0.8.5/test/test_date_time_scanner.cc:114: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).
            assert(dts.scan(en_date, strlen(en_date), NULL, &en_tm, en_tv) != NULL);
data/lnav-0.8.5/test/test_date_time_scanner.cc:116: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).
            assert(dts.scan(es_date, strlen(es_date), NULL, &es_tm, es_tv) != NULL);
data/lnav-0.8.5/test/test_date_time_scanner.cc:128: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).
            assert(dts.scan(en_date, strlen(en_date), NULL, &en_tm, en_tv) != NULL);
data/lnav-0.8.5/test/test_date_time_scanner.cc:130: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).
            assert(dts.scan(fr_date, strlen(fr_date), NULL, &fr_tm, fr_tv) != NULL);
data/lnav-0.8.5/test/test_date_time_scanner.cc:139:61:  [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).
        bool rc = ptime_fmt("ts %s ]", &tm, epoch_str, off, strlen(epoch_str));
data/lnav-0.8.5/test/test_line_buffer2.cc:49:35:  [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).
    log_perror(write(pi[1], data, strlen(data)));
data/lnav-0.8.5/test/test_line_buffer2.cc:55:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(off == (off_t)strlen(data));
data/lnav-0.8.5/test/test_line_buffer2.cc:56:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(lv.lv_len == strlen(data) - lendiff);
data/lnav-0.8.5/test/test_yajlpp.cc:67:58:  [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).
    yajl_parse(handle, (const unsigned char *)TEST_DATA, strlen(TEST_DATA));

ANALYSIS SUMMARY:

Hits = 554
Lines analyzed = 141372 in approximately 2.78 seconds (50913 lines/second)
Physical Source Lines of Code (SLOC) = 127719
Hits@level = [0] 325 [1] 169 [2] 277 [3]  43 [4]  64 [5]   1
Hits@level+ = [0+] 879 [1+] 554 [2+] 385 [3+] 108 [4+]  65 [5+]   1
Hits/KSLOC@level+ = [0+] 6.8823 [1+] 4.33765 [2+] 3.01443 [3+] 0.845606 [4+] 0.50893 [5+] 0.00782969
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.