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/malaga-7.12/allomorphs.c
Examining data/malaga-7.12/allomorphs.h
Examining data/malaga-7.12/analysis.c
Examining data/malaga-7.12/analysis.h
Examining data/malaga-7.12/avl_trees.c
Examining data/malaga-7.12/avl_trees.h
Examining data/malaga-7.12/basic.c
Examining data/malaga-7.12/basic.h
Examining data/malaga-7.12/breakpoints.c
Examining data/malaga-7.12/breakpoints.h
Examining data/malaga-7.12/cache.c
Examining data/malaga-7.12/cache.h
Examining data/malaga-7.12/canvas.c
Examining data/malaga-7.12/canvas.h
Examining data/malaga-7.12/commands.c
Examining data/malaga-7.12/commands.h
Examining data/malaga-7.12/commands_interactive.c
Examining data/malaga-7.12/commands_interactive.h
Examining data/malaga-7.12/debugger.c
Examining data/malaga-7.12/debugger.h
Examining data/malaga-7.12/display.c
Examining data/malaga-7.12/display.h
Examining data/malaga-7.12/expressions.c
Examining data/malaga-7.12/expressions.h
Examining data/malaga-7.12/generation.c
Examining data/malaga-7.12/generation.h
Examining data/malaga-7.12/hangul.c
Examining data/malaga-7.12/hangul.h
Examining data/malaga-7.12/input.c
Examining data/malaga-7.12/input.h
Examining data/malaga-7.12/lex_compiler.h
Examining data/malaga-7.12/lexicon.h
Examining data/malaga-7.12/libmalaga.c
Examining data/malaga-7.12/libmalaga.h
Examining data/malaga-7.12/malaga.c
Examining data/malaga-7.12/malaga_files.c
Examining data/malaga-7.12/malaga_files.h
Examining data/malaga-7.12/malaga.h
Examining data/malaga-7.12/malaga_lib.c
Examining data/malaga-7.12/malaga_lib.h
Examining data/malaga-7.12/maldump.c
Examining data/malaga-7.12/mallex.c
Examining data/malaga-7.12/malmake.c
Examining data/malaga-7.12/malrul.c
Examining data/malaga-7.12/malshow.c
Examining data/malaga-7.12/malsym.c
Examining data/malaga-7.12/options.c
Examining data/malaga-7.12/options.h
Examining data/malaga-7.12/patterns.c
Examining data/malaga-7.12/patterns.h
Examining data/malaga-7.12/pools.c
Examining data/malaga-7.12/pools.h
Examining data/malaga-7.12/processes.c
Examining data/malaga-7.12/processes.h
Examining data/malaga-7.12/result.c
Examining data/malaga-7.12/result.h
Examining data/malaga-7.12/rule_code.c
Examining data/malaga-7.12/rule_code.h
Examining data/malaga-7.12/rule_compiler.c
Examining data/malaga-7.12/rule_compiler.h
Examining data/malaga-7.12/rule_parser.c
Examining data/malaga-7.12/rule_parser.h
Examining data/malaga-7.12/rules.c
Examining data/malaga-7.12/rules.h
Examining data/malaga-7.12/rule_symbols.c
Examining data/malaga-7.12/rule_symbols.h
Examining data/malaga-7.12/rule_type.h
Examining data/malaga-7.12/scanner.c
Examining data/malaga-7.12/scanner.h
Examining data/malaga-7.12/symbols.c
Examining data/malaga-7.12/symbols.h
Examining data/malaga-7.12/sym_compiler.c
Examining data/malaga-7.12/sym_compiler.h
Examining data/malaga-7.12/transmit.c
Examining data/malaga-7.12/transmit.h
Examining data/malaga-7.12/tree.c
Examining data/malaga-7.12/tree.h
Examining data/malaga-7.12/tries.c
Examining data/malaga-7.12/tries.h
Examining data/malaga-7.12/value_parser.c
Examining data/malaga-7.12/value_parser.h
Examining data/malaga-7.12/values.c
Examining data/malaga-7.12/values.h
Examining data/malaga-7.12/variables.c
Examining data/malaga-7.12/variables.h
Examining data/malaga-7.12/files.c
Examining data/malaga-7.12/files.h
Examining data/malaga-7.12/lex_compiler.c
Examining data/malaga-7.12/lexicon.c

FINAL RESULTS:

data/malaga-7.12/basic.c:297: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( text->buffer + text->string_size, string );
data/malaga-7.12/basic.c:332: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( text->buffer + text->string_size, buf );
data/malaga-7.12/basic.c:564: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( string, first_string );
data/malaga-7.12/basic.c:570: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( string_p, next_string );
data/malaga-7.12/malmake.c:79:5:  [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( command_name, command_name, arg1, arg2, arg3, NULL );
data/malaga-7.12/processes.c:119: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( args[0], (char **) args );
data/malaga-7.12/basic.c:782: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.
  in_emacs_malaga_mode = (getenv( "MALAGA_MODE" ) != NULL);
data/malaga-7.12/basic.c:785:7:  [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( "EMACS" ) != NULL) 
data/malaga-7.12/files.c:235:13:  [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.
  content = getenv( name );
data/malaga-7.12/files.c:409:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    relative_to = getenv( "USERPROFILE" );
data/malaga-7.12/options.c:171: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("DISPLAY") != NULL)
data/malaga-7.12/processes.c:217:9:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  if (! CreateProcess( NULL, process->command_line, NULL, NULL, TRUE, 
data/malaga-7.12/processes.c:217:9:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  if (! CreateProcess( NULL, process->command_line, NULL, NULL, TRUE, 
data/malaga-7.12/basic.c:322:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[7];
data/malaga-7.12/basic.c:356:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy( text->buffer + position, string, sizeof( char_t ) * string_len );
data/malaga-7.12/basic.c:417: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[7]; \
data/malaga-7.12/basic.c:710: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( buffer, "%.11G", number );
data/malaga-7.12/basic.c:722: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( buffer, "%d", number );
data/malaga-7.12/files.c:44:12:  [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).
  stream = fopen( file_name, "r" );
data/malaga-7.12/files.c:60:12:  [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).
  stream = fopen( file_name, stream_mode );
data/malaga-7.12/files.c:143:21:  [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).
  file_descriptor = open( file_name, O_RDONLY );
data/malaga-7.12/malaga_files.c:100:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy( header->malaga, malaga, sizeof( char_t ) * MALAGA_LEN );
data/malaga-7.12/pools.c:100: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( vector_p, CHUNK_DATA( chunk ), 
data/malaga-7.12/pools.c:229:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy( new_address, address, pool->item_size * item_count );
data/malaga-7.12/scanner.c:623: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 token_buffer[2];
data/malaga-7.12/values.c:141:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy( destination, source, n * sizeof( cell_t ) );
data/malaga-7.12/values.c:150:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy( destination, source, length_of_value( source ) * sizeof( cell_t ) );
data/malaga-7.12/analysis.c:364: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( surface );
data/malaga-7.12/basic.c:291: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).
  string_len = strlen( string );
data/malaga-7.12/basic.c:344: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).
  string_len = strlen( string );
data/malaga-7.12/basic.c:483: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).
    end = string + strlen( string );
data/malaga-7.12/basic.c:505:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    from_end = from + strlen( from );
data/malaga-7.12/basic.c:552: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( first_string );
data/malaga-7.12/basic.c:557: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).
    length += strlen( next_string ); 
data/malaga-7.12/basic.c:565:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  string_p = string + strlen( first_string );
data/malaga-7.12/basic.c:571: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).
    string_p += strlen( next_string );
data/malaga-7.12/basic.c:669: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).
  argument_count = strlen( chars );
data/malaga-7.12/expressions.c:41:22:  [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.
static pos_string_t *equal, *dots;
data/malaga-7.12/expressions.c:54:22:  [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.
  config_pos_string( equal, canvas );
data/malaga-7.12/expressions.c:102:22:  [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.
    draw_pos_string( equal, canvas );
data/malaga-7.12/files.c:211: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).
  for (name = path_name + strlen( path_name ); name > path_name; name--)
data/malaga-7.12/files.c:371: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).
      relative_end = relative_to + strlen( relative_to );
data/malaga-7.12/files.c:441: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).
    relative_end = relative_to + strlen( relative_to );
data/malaga-7.12/hangul.c:396:10:  [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( romans[i].roman ) ) == 0) 
data/malaga-7.12/hangul.c:399: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).
            roman_string += strlen( romans[i].roman );
data/malaga-7.12/input.c:188:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = getc( stream );
data/malaga-7.12/input.c:197:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc( stream );
data/malaga-7.12/lex_compiler.c:687: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).
  write_vector( tree->name, sizeof( char_t ), strlen( tree->name ) + 1, 
data/malaga-7.12/lex_compiler.c:760: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).
    (*strings_size_p) += strlen( tree->name ) + 1;
data/malaga-7.12/lex_compiler.c:795: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).
    (*strings_size_p) += strlen( tree->name ) + 1;
data/malaga-7.12/maldump.c:324:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = getc( stream );
data/malaga-7.12/maldump.c:341:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = getc( stream )) != EOF) 
data/malaga-7.12/pools.c:241: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).
  return (string_t) copy_to_pool( pool, string, strlen( string ) + 1, index );
data/malaga-7.12/scanner.c:132:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = getc( source->stream );
data/malaga-7.12/values.c:460: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).
    string_end = string_start + strlen( string_start );
data/malaga-7.12/variables.c:50:22:  [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.
static pos_string_t *equal, *dots;
data/malaga-7.12/variables.c:63:22:  [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.
  config_pos_string( equal, canvas );
data/malaga-7.12/variables.c:111:22:  [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.
    draw_pos_string( equal, canvas );
data/malaga-7.12/variables.c:209:21:  [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.
  free_pos_string( &equal );

ANALYSIS SUMMARY:

Hits = 59
Lines analyzed = 29712 in approximately 0.79 seconds (37787 lines/second)
Physical Source Lines of Code (SLOC) = 21457
Hits@level = [0] 249 [1]  32 [2]  14 [3]   7 [4]   6 [5]   0
Hits@level+ = [0+] 308 [1+]  59 [2+]  27 [3+]  13 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 14.3543 [1+] 2.74969 [2+] 1.25833 [3+] 0.605863 [4+] 0.279629 [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.