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/lv-4.51/src/ascii.h
Examining data/lv-4.51/src/attr.h
Examining data/lv-4.51/src/begin.h
Examining data/lv-4.51/src/big5.h
Examining data/lv-4.51/src/boolean.h
Examining data/lv-4.51/src/conf.h
Examining data/lv-4.51/src/console.h
Examining data/lv-4.51/src/conv.h
Examining data/lv-4.51/src/ctable.h
Examining data/lv-4.51/src/ctable_e.h
Examining data/lv-4.51/src/ctable_t.h
Examining data/lv-4.51/src/decode.h
Examining data/lv-4.51/src/dfa.h
Examining data/lv-4.51/src/display.h
Examining data/lv-4.51/src/encode.h
Examining data/lv-4.51/src/escape.h
Examining data/lv-4.51/src/eucjapan.h
Examining data/lv-4.51/src/fetch.h
Examining data/lv-4.51/src/find.h
Examining data/lv-4.51/src/guess.h
Examining data/lv-4.51/src/guesslocale.h
Examining data/lv-4.51/src/hz.h
Examining data/lv-4.51/src/ichar.h
Examining data/lv-4.51/src/import.h
Examining data/lv-4.51/src/iso2022.h
Examining data/lv-4.51/src/iso2cn.h
Examining data/lv-4.51/src/iso2jp.h
Examining data/lv-4.51/src/iso2kr.h
Examining data/lv-4.51/src/iso8859.h
Examining data/lv-4.51/src/istr.h
Examining data/lv-4.51/src/itable.h
Examining data/lv-4.51/src/itable_e.h
Examining data/lv-4.51/src/itable_t.h
Examining data/lv-4.51/src/kana.h
Examining data/lv-4.51/src/keybind.h
Examining data/lv-4.51/src/nfa.h
Examining data/lv-4.51/src/position.h
Examining data/lv-4.51/src/raw.h
Examining data/lv-4.51/src/re.h
Examining data/lv-4.51/src/screen.h
Examining data/lv-4.51/src/shiftjis.h
Examining data/lv-4.51/src/str.h
Examining data/lv-4.51/src/stream.h
Examining data/lv-4.51/src/unimap.h
Examining data/lv-4.51/src/unirev.h
Examining data/lv-4.51/src/utf.h
Examining data/lv-4.51/src/uty.h
Examining data/lv-4.51/src/big5.c
Examining data/lv-4.51/src/conv.c
Examining data/lv-4.51/src/ctable.c
Examining data/lv-4.51/src/decode.c
Examining data/lv-4.51/src/dfa.c
Examining data/lv-4.51/src/display.c
Examining data/lv-4.51/src/encode.c
Examining data/lv-4.51/src/escape.c
Examining data/lv-4.51/src/eucjapan.c
Examining data/lv-4.51/src/find.c
Examining data/lv-4.51/src/hz.c
Examining data/lv-4.51/src/iso2022.c
Examining data/lv-4.51/src/iso2cn.c
Examining data/lv-4.51/src/iso2jp.c
Examining data/lv-4.51/src/iso2kr.c
Examining data/lv-4.51/src/iso8859.c
Examining data/lv-4.51/src/istr.c
Examining data/lv-4.51/src/itable.c
Examining data/lv-4.51/src/kana.c
Examining data/lv-4.51/src/lv.c
Examining data/lv-4.51/src/nfa.c
Examining data/lv-4.51/src/raw.c
Examining data/lv-4.51/src/re.c
Examining data/lv-4.51/src/screen.c
Examining data/lv-4.51/src/shiftjis.c
Examining data/lv-4.51/src/unimap.c
Examining data/lv-4.51/src/unirev.c
Examining data/lv-4.51/src/utf.c
Examining data/lv-4.51/src/uty.c
Examining data/lv-4.51/src/command.h
Examining data/lv-4.51/src/conf.c
Examining data/lv-4.51/src/fetch.c
Examining data/lv-4.51/src/file.c
Examining data/lv-4.51/src/version.c
Examining data/lv-4.51/src/version.h
Examining data/lv-4.51/src/console.c
Examining data/lv-4.51/src/stream.c
Examining data/lv-4.51/src/guess.c
Examining data/lv-4.51/src/guesslocale.c
Examining data/lv-4.51/src/file.h
Examining data/lv-4.51/src/command.c

FINAL RESULTS:

data/lv-4.51/src/command.c:579: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( com, editor );
data/lv-4.51/src/command.c:593:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf( num, argv[ argc ], line );
data/lv-4.51/src/command.c:617:5:  [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 ], (char **)argv );
data/lv-4.51/src/command.c:721:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if( access( f->fileName, 0 ) ){
data/lv-4.51/src/command.c:1090: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( *argv, 0 ) ){
data/lv-4.51/src/conf.c:276:4:  [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( editor_program, s + 1 );
data/lv-4.51/src/conf.c:321: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( initcmd_str, s );
data/lv-4.51/src/conf.c:403: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( buf, ptr );
data/lv-4.51/src/conf.c:404: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( buf, "/" LV_CONF );
data/lv-4.51/src/conf.c:432: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( helpFile, argv[ 0 ] );
data/lv-4.51/src/conf.c:441: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( helpFile, LV_HELP );
data/lv-4.51/src/conf.c:445: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( helpFile, LV_HELP_PATH "/" LV_HELP );
data/lv-4.51/src/file.c:570:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf( fileStatus, "%s %lu/%lu [%s|%s|%s|%s]",
data/lv-4.51/src/guesslocale.c:66: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( language, lang );
data/lv-4.51/src/guesslocale.c:103: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( language, lang );
data/lv-4.51/src/stream.c:68:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if( access( file, 0 ) ){
data/lv-4.51/src/stream.c:127:10:  [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.
	if( 0 > execlp( filter, filter, file, NULL ) )
data/lv-4.51/src/command.c:107: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.
  if ((!(editor_program = getenv("VISUAL"))) &&
data/lv-4.51/src/command.c:108: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.
      (!(editor_program = getenv("EDITOR")))) {
data/lv-4.51/src/command.c:486:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if( shell = getenv( "SHELL" ) )
data/lv-4.51/src/command.c:488:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  else if( shell = getenv( "COMSPEC" ) )
data/lv-4.51/src/command.c:642:35:  [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( NULL == (editor_program = getenv( "EDITOR" )) ){
data/lv-4.51/src/conf.c:402: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.
  if( NULL != (ptr = getenv( "HOME" )) ){
data/lv-4.51/src/conf.c:412: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.
  if( NULL != (*argv = getenv( "LV" )) )
data/lv-4.51/src/conf.c:454: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.
    if( NULL != (env = getenv( "MAN_PN" )) )
data/lv-4.51/src/console.c:260: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.
  if( NULL != (ptr = getenv("TERM")) ){
data/lv-4.51/src/console.c:308: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( NULL == (term = getenv( "TERM" )) )
data/lv-4.51/src/console.c:354: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( NULL == (term = getenv( "TERM" )) )
data/lv-4.51/src/command.c:354:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf( buf, "%u", n );
data/lv-4.51/src/command.c:520: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).
  if( NULL == (fp = fopen( f->fileName, "rb" )) ){
data/lv-4.51/src/conf.c:79: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 dummy[6];
data/lv-4.51/src/conf.c:223: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 dummy[6];
data/lv-4.51/src/conf.c:265: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).
      case 'W': conf->width = atoi( s + 1 ); break;
data/lv-4.51/src/conf.c:266:32:  [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).
      case 'H': conf->height = atoi( s + 1 ); break;
data/lv-4.51/src/conf.c:280: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).
      case 'T': unicode_width_threshold = (ic_t)atoi( s + 1 ); break;
data/lv-4.51/src/conf.c:377: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).
  if( NULL == (fp = fopen( file, "r" )) )
data/lv-4.51/src/console.c:61: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.
private char tbuf[ 16 ];
data/lv-4.51/src/console.c:109: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.
private char entry[ 1024 ];
data/lv-4.51/src/console.c:110: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.
private char func[ 1024 ];
data/lv-4.51/src/console.c:302:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open("/dev/tty", O_RDONLY);
data/lv-4.51/src/console.c:578:3:  [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( tbuf, "\x1b[%d;%dH", y + 1, x + 1 );
data/lv-4.51/src/guess.c:215: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 *nl, language[6];
data/lv-4.51/src/guesslocale.c:53:3:  [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( language, "ja_JP" );
data/lv-4.51/src/guesslocale.c:58:3:  [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( language, "ja_JP" );
data/lv-4.51/src/guesslocale.c:61:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 lang[6];
data/lv-4.51/src/guesslocale.c:124:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char country[3], language2[3], *cp;
data/lv-4.51/src/stream.c:92:35:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    if( NULL == (st->fp = (FILE *)tmpfile()) )
data/lv-4.51/src/stream.c:147: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( NULL == (st->fp = fopen( file, "rb" )) ){
data/lv-4.51/src/stream.c:184:35:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    if( NULL == (st->fp = (FILE *)tmpfile()) )
data/lv-4.51/src/stream.c:190: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( IsAtty( 1 ) && 0 != open( "/dev/tty", O_RDONLY ) )
data/lv-4.51/src/command.c:576: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).
  if( strlen( editor ) + strlen( filename ) + 2 > COM_SIZE )
data/lv-4.51/src/command.c:576: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).
  if( strlen( editor ) + strlen( filename ) + 2 > COM_SIZE )
data/lv-4.51/src/command.c:742:7:  [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(300000); // 300msec
data/lv-4.51/src/command.c:1182:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if ( strlen(label) >= f->width )
data/lv-4.51/src/conf.c:275: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).
	  editor_program = Malloc( strlen( s + 1 ) + 1 );
data/lv-4.51/src/conf.c:317: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).
      size_t initcmd_len = strlen( s );
data/lv-4.51/src/conf.c:383:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for( i = strlen( buf ) - 1 ; i >= 0 ; i-- ){
data/lv-4.51/src/conf.c:431: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).
    helpFile = Malloc( strlen( argv[ 0 ] ) + strlen( LV_HELP ) + 1 );
data/lv-4.51/src/conf.c:431: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).
    helpFile = Malloc( strlen( argv[ 0 ] ) + strlen( LV_HELP ) + 1 );
data/lv-4.51/src/conf.c:433:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for( i = strlen( helpFile ) - 1 ; i >= 0 ; i-- ){
data/lv-4.51/src/conf.c:444: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).
  helpFile = Malloc( strlen( LV_HELP_PATH "/" LV_HELP ) + 1 );
data/lv-4.51/src/console.c:513:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if( 0 > read( 0, &buf, 1 ) )
data/lv-4.51/src/file.c:550:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    length = strlen( f->fileName );
data/lv-4.51/src/file.h:161:26:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
# define IobufGetc( a )		getc( (a)->iop )
data/lv-4.51/src/guesslocale.c:72:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( lang, nl, 5 ); lang[5] = 0;
data/lv-4.51/src/guesslocale.c:128:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(country, cp + 1, 2);
data/lv-4.51/src/guesslocale.c:132:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( language2, language, 2 );
data/lv-4.51/src/lv.c:85: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).
  if( !strncmp( ptr, GREP_COMMAND, strlen( GREP_COMMAND ) )
data/lv-4.51/src/lv.c:86: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).
     || !strncmp( ptr, GREP_COMMAND_DOS, strlen( GREP_COMMAND_DOS ) ) )
data/lv-4.51/src/lv.c:120:12:  [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).
  length = strlen( conf->pattern );
data/lv-4.51/src/uty.c:225:12:  [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( i = strlen( s ) - 1 ; i >= 0 ; i-- ){

ANALYSIS SUMMARY:

Hits = 71
Lines analyzed = 12382 in approximately 0.36 seconds (34863 lines/second)
Physical Source Lines of Code (SLOC) = 9048
Hits@level = [0]  65 [1]  21 [2]  22 [3]  11 [4]  17 [5]   0
Hits@level+ = [0+] 136 [1+]  71 [2+]  50 [3+]  28 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 15.0309 [1+] 7.84704 [2+] 5.52608 [3+] 3.09461 [4+] 1.87887 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.