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/pgn-extract-19.04/taglist.h
Examining data/pgn-extract-19.04/hashing.c
Examining data/pgn-extract-19.04/zobrist.c
Examining data/pgn-extract-19.04/lex.c
Examining data/pgn-extract-19.04/main.c
Examining data/pgn-extract-19.04/fenmatcher.h
Examining data/pgn-extract-19.04/output.c
Examining data/pgn-extract-19.04/end.h
Examining data/pgn-extract-19.04/argsfile.c
Examining data/pgn-extract-19.04/map.h
Examining data/pgn-extract-19.04/typedef.h
Examining data/pgn-extract-19.04/zobrist.h
Examining data/pgn-extract-19.04/apply.h
Examining data/pgn-extract-19.04/eco.h
Examining data/pgn-extract-19.04/argsfile.h
Examining data/pgn-extract-19.04/mymalloc.c
Examining data/pgn-extract-19.04/defs.h
Examining data/pgn-extract-19.04/grammar.h
Examining data/pgn-extract-19.04/end.c
Examining data/pgn-extract-19.04/moves.h
Examining data/pgn-extract-19.04/apply.c
Examining data/pgn-extract-19.04/decode.c
Examining data/pgn-extract-19.04/tokens.h
Examining data/pgn-extract-19.04/hashing.h
Examining data/pgn-extract-19.04/lines.h
Examining data/pgn-extract-19.04/lists.c
Examining data/pgn-extract-19.04/taglines.h
Examining data/pgn-extract-19.04/fenmatcher.c
Examining data/pgn-extract-19.04/mymalloc.h
Examining data/pgn-extract-19.04/output.h
Examining data/pgn-extract-19.04/map.c
Examining data/pgn-extract-19.04/decode.h
Examining data/pgn-extract-19.04/taglines.c
Examining data/pgn-extract-19.04/lists.h
Examining data/pgn-extract-19.04/lines.c
Examining data/pgn-extract-19.04/bool.h
Examining data/pgn-extract-19.04/lex.h
Examining data/pgn-extract-19.04/moves.c
Examining data/pgn-extract-19.04/eco.c
Examining data/pgn-extract-19.04/grammar.c

FINAL RESULTS:

data/pgn-extract-19.04/apply.c:166: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(result, str);
data/pgn-extract-19.04/apply.c:1584: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((char *) &new_move_str[new_move_index],
data/pgn-extract-19.04/apply.c:1593:21:  [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 *) &new_move_str[0], piece);
data/pgn-extract-19.04/apply.c:1654:21:  [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 *) new_move_str, (char *) NULL_MOVE_STRING);
data/pgn-extract-19.04/apply.c:1678:13:  [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 *) move_details->move,
data/pgn-extract-19.04/apply.c:2489:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(FEN_string, "%s %s", epd, fen_suffix);
data/pgn-extract-19.04/decode.c:430: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 *) move_details->move, (const char *) move_string);
data/pgn-extract-19.04/eco.c:328: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(filename, suffix);
data/pgn-extract-19.04/fenmatcher.c:198: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(rlabel, label);
data/pgn-extract-19.04/grammar.c:224:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(filename, "%u%s",
data/pgn-extract-19.04/lex.c:1030: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 *) last_move, (const char *) move);
data/pgn-extract-19.04/lex.c:1101: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(filename, R_OK) != 0) {
data/pgn-extract-19.04/lex.c:1267: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(token, str);
data/pgn-extract-19.04/lists.c:162:13:  [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(list->tag_strings[ix].tag_string, str);
data/pgn-extract-19.04/map.c:1920:21:  [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 *) alternative_move,
data/pgn-extract-19.04/output.c:434:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(&(output_line[line_length]), "%s", str);
data/pgn-extract-19.04/output.c:647:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(small_number,
data/pgn-extract-19.04/output.c:702:33:  [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(algebraic, NULL_MOVE_STRING);
data/pgn-extract-19.04/output.c:735:29:  [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(algebraic, (char *) move_text);
data/pgn-extract-19.04/output.c:744:33:  [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(algebraic,
data/pgn-extract-19.04/output.c:777:33:  [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(algebraic, NULL_MOVE_STRING);
data/pgn-extract-19.04/output.c:795:37:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                                    sprintf(&algebraic[ind],
data/pgn-extract-19.04/output.c:1397: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(comment, c0_prefix);
data/pgn-extract-19.04/output.c:1399: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(comment, Tags[WHITE_TAG]);
data/pgn-extract-19.04/output.c:1401: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(comment, player_separator);
data/pgn-extract-19.04/output.c:1403: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(comment, Tags[BLACK_TAG]);
data/pgn-extract-19.04/output.c:1407: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(comment, Tags[EVENT_TAG]);
data/pgn-extract-19.04/output.c:1411: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(comment, Tags[SITE_TAG]);
data/pgn-extract-19.04/output.c:1415: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(comment, Tags[DATE_TAG]);
data/pgn-extract-19.04/output.c:1418: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(comment, c1_prefix);
data/pgn-extract-19.04/output.c:1420: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(comment, Tags[RESULT_TAG]);
data/pgn-extract-19.04/output.c:1575:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(comment, "%s%s%s", prefix, fen, suffix);
data/pgn-extract-19.04/argsfile.c:588: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.
            else if ((filename = getenv("ECO_FILE")) != NULL) {
data/pgn-extract-19.04/apply.c:76:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char SAN_piece_characters[NUM_PIECE_VALUES] = {
data/pgn-extract-19.04/apply.c:86: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 *output_piece_characters[NUM_PIECE_VALUES] = {
data/pgn-extract-19.04/apply.c:876: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 epd[FEN_SPACE], fen_suffix[FEN_SPACE];
data/pgn-extract-19.04/apply.c:1497: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 new_move_str[MAX_MOVE_LEN + 1] = "";
data/pgn-extract-19.04/apply.c:1648:21:  [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((char *) new_move_str, "O-O");
data/pgn-extract-19.04/apply.c:1651:21:  [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((char *) new_move_str, "O-O-O");
data/pgn-extract-19.04/apply.c:1669:29:  [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 *) new_move_str, "++");
data/pgn-extract-19.04/apply.c:2485: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 epd[FEN_SPACE], fen_suffix[FEN_SPACE];
data/pgn-extract-19.04/apply.c:2505: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(fen_suffix, "%u", board->halfmove_clock);
data/pgn-extract-19.04/apply.c:2511: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(&fen_suffix[ix], "%u", board->move_number);
data/pgn-extract-19.04/apply.c:2548: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(hashcode_comment, "%llx", hash);
data/pgn-extract-19.04/apply.c:2574: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(evaluation, "%.2f", value);
data/pgn-extract-19.04/argsfile.c:268:16:  [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 *fp = fopen(infile, "r");
data/pgn-extract-19.04/argsfile.c:558:39:  [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).
                GlobalState.logfile = fopen(filename, "w");
data/pgn-extract-19.04/argsfile.c:561:39:  [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).
                GlobalState.logfile = fopen(filename, "a");
data/pgn-extract-19.04/eco.c:310: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 filename[MAXNAME + 1];
data/pgn-extract-19.04/eco.c:313: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(filename, "noeco.pgn");
data/pgn-extract-19.04/eco.c:318: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(filename, "noeco");
data/pgn-extract-19.04/eco.c:323: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(filename, "noeco");
data/pgn-extract-19.04/end.c:720:16:  [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 *fp = fopen(infile, "r");
data/pgn-extract-19.04/fenmatcher.c:87: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 *pattern_match_rank(const Board *board, 
data/pgn-extract-19.04/fenmatcher.c:89: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 ranks[BOARDSIZE+1][BOARDSIZE+1]);
data/pgn-extract-19.04/fenmatcher.c:344: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 ranks[BOARDSIZE+1][BOARDSIZE+1];
data/pgn-extract-19.04/fenmatcher.c:358: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 *pattern_match_rank(const Board *board, FENPatternMatch *pattern, int patternIndex, char ranks[BOARDSIZE+1][BOARDSIZE+1])
data/pgn-extract-19.04/fenmatcher.c:358:103:  [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 *pattern_match_rank(const Board *board, FENPatternMatch *pattern, int patternIndex, char ranks[BOARDSIZE+1][BOARDSIZE+1])
data/pgn-extract-19.04/grammar.c:134: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).
    fp = fopen(filename, mode);
data/pgn-extract-19.04/grammar.c:215: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 filename[FILENAME_LENGTH];
data/pgn-extract-19.04/hashing.c:286: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).
        hash_file = fopen(VIRTUAL_FILE, "w+b");
data/pgn-extract-19.04/lex.c:67: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.
static unsigned char last_move[MAX_MOVE_LEN + 1];
data/pgn-extract-19.04/lex.c:78: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.
static unsigned char yytext[MAX_YYTEXT + 1];
data/pgn-extract-19.04/lex.c:1173: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).
    yyin = fopen(infile, "rb");
data/pgn-extract-19.04/lists.c:208: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 sbuf[MAXSOUNDEX + 1];
data/pgn-extract-19.04/output.c:644:28:  [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 small_number[SMALL_MOVE_NUMBER_LENGTH];
data/pgn-extract-19.04/output.c:676: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 algebraic[MAX_MOVE_LEN + 1];
data/pgn-extract-19.04/output.c:685:33:  [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(algebraic,
data/pgn-extract-19.04/output.c:693:33:  [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(algebraic,
data/pgn-extract-19.04/output.c:705:33:  [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(algebraic, "???");
data/pgn-extract-19.04/output.c:729: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 algebraic[MAX_MOVE_LEN + 1];
data/pgn-extract-19.04/output.c:750:33:  [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(&algebraic[ind],
data/pgn-extract-19.04/output.c:766:37:  [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(&algebraic[ind],
data/pgn-extract-19.04/output.c:770:33:  [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(&algebraic[ind],
data/pgn-extract-19.04/output.c:790:41:  [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(algebraic, "ep");
data/pgn-extract-19.04/output.c:801:37:  [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(algebraic, "???");
data/pgn-extract-19.04/output.c:928:13:  [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(evaluation, "%.2f", move_details->evaluation);
data/pgn-extract-19.04/output.c:964:13:  [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(hashcode, "%llx", move_details->zobrist);
data/pgn-extract-19.04/output.c:1417: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(comment, "; ");
data/pgn-extract-19.04/output.c:1534: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 epd[FEN_SPACE];
data/pgn-extract-19.04/output.c:1619: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 formatted_count[FORMATTED_NUMBER_SIZE];
data/pgn-extract-19.04/output.c:1620: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(formatted_count, "%u", count);
data/pgn-extract-19.04/output.c:1635: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 formatted_count[FORMATTED_NUMBER_SIZE];
data/pgn-extract-19.04/output.c:1636: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(formatted_count, "%u", count);
data/pgn-extract-19.04/output.c:1651: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 formatted_code[FORMATTED_NUMBER_SIZE];
data/pgn-extract-19.04/output.c:1652: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(formatted_code, "%08x", (unsigned) hashcode);
data/pgn-extract-19.04/taglines.c:49: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).
    yyin = fopen(TagFile, "r");
data/pgn-extract-19.04/typedef.h:100: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.
    unsigned char move[MAX_MOVE_LEN+1];
data/pgn-extract-19.04/zobrist.c:309: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 board[8][8] = {
data/pgn-extract-19.04/apply.c:163: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).
        size_t len = strlen(str);
data/pgn-extract-19.04/apply.c:1586: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).
                        new_move_index += strlen(promoted_piece);
data/pgn-extract-19.04/apply.c:1594: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).
                    new_move_index += strlen(piece);
data/pgn-extract-19.04/apply.c:1665:25:  [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 *) new_move_str, "+");
data/pgn-extract-19.04/apply.c:1672:29:  [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 *) new_move_str, "#");
data/pgn-extract-19.04/apply.c:2487: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).
    char *FEN_string = (char *) malloc_or_die(strlen(epd) + 1 + 
data/pgn-extract-19.04/apply.c:2488: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).
            strlen(fen_suffix) + 1);
data/pgn-extract-19.04/apply.c:2506: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).
    ix = strlen(fen_suffix);
data/pgn-extract-19.04/apply.c:2575: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(evaluation) > strlen(valueSpace)) {
data/pgn-extract-19.04/apply.c:2575: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).
    if (strlen(evaluation) > strlen(valueSpace)) {
data/pgn-extract-19.04/argsfile.c:88: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).
    size_t prefixLen = strlen(prefix);
data/pgn-extract-19.04/argsfile.c:89: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(str) >= prefixLen) {
data/pgn-extract-19.04/argsfile.c:363:29:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                            strncpy(just_arg, arg, arglen);
data/pgn-extract-19.04/argsfile.c:436: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 line_length = strlen(line);
data/pgn-extract-19.04/argsfile.c:635: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).
                size_t len = strlen(filename);
data/pgn-extract-19.04/argsfile.c:639: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).
                if ((len > strlen(suffix)) &&
data/pgn-extract-19.04/argsfile.c:640:56:  [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).
                        (stringcompare(&filename[len - strlen(suffix)],
data/pgn-extract-19.04/eco.c:326:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filename, eco, ECO_level);
data/pgn-extract-19.04/fenmatcher.c:122:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(ranks[dividers], rank_start, num_chars);
data/pgn-extract-19.04/fenmatcher.c:178:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ranks[dividers], rank_start, num_chars);
data/pgn-extract-19.04/fenmatcher.c:197:55:  [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 *rlabel = (char *) malloc_or_die(strlen(label) + 1 + 1);
data/pgn-extract-19.04/fenmatcher.c:199:17:  [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(rlabel, "I");
data/pgn-extract-19.04/fenmatcher.c:230:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(rows[row], start, end - start);
data/pgn-extract-19.04/fenmatcher.c:238: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).
    char *reversed = (char *) malloc_or_die(strlen(pattern) + 1);
data/pgn-extract-19.04/grammar.c:584:13:  [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 *) move_details->move, "+");
data/pgn-extract-19.04/lex.c:339:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(str, (const char *) (linep - len - 1), len);
data/pgn-extract-19.04/lex.c:441:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(comment_str, (const char *) (str + start), end - start);
data/pgn-extract-19.04/lex.c:612:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy((char *) tag_string, (const char *) (linep - len), len);
data/pgn-extract-19.04/lex.c:649:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((char *) yytext, (const char *) symbol_start, len);
data/pgn-extract-19.04/lex.c:653:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((char *) yytext, (const char *) symbol_start, MAX_YYTEXT);
data/pgn-extract-19.04/lex.c:1023:8:  [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((char *) move) > MAX_MOVE_LEN) {
data/pgn-extract-19.04/lex.c:1263: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).
    const size_t len = strlen(str);
data/pgn-extract-19.04/lines.c:48:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = getc(fpin);
data/pgn-extract-19.04/lines.c:64:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ch = getc(fpin);
data/pgn-extract-19.04/lines.c:69:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ch = getc(fpin);
data/pgn-extract-19.04/lists.c:156: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).
        const unsigned len = strlen(str) + 1;
data/pgn-extract-19.04/lists.c:458: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).
                wanted = strncmp(date_string, list_string, strlen(list_string)) == 0;
data/pgn-extract-19.04/lists.c:515: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).
            if (strncmp(elo_string, list_string, strlen(list_string)) == 0) {
data/pgn-extract-19.04/lists.c:553: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).
            if (strncmp(search_str, list_string, strlen(list_string)) == 0) {
data/pgn-extract-19.04/map.c:1863: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).
                size_t last_char = strlen((const char *) move) - 1;
data/pgn-extract-19.04/map.c:1919: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).
                           (unsigned char *) malloc_or_die(strlen((char *) move_details->move) + 1);
data/pgn-extract-19.04/moves.c:204: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).
                if (strlen(move) > 1) {
data/pgn-extract-19.04/moves.c:414: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).
            if (move_char(match_point[strlen((const char *) actual_move)])) {
data/pgn-extract-19.04/output.c:175: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).
        const size_t format_prefix_len = strlen(format_prefix);
data/pgn-extract-19.04/output.c:192: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).
                (strlen(arg) > format_prefix_len)) {
data/pgn-extract-19.04/output.c:421: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).
    size_t len = strlen(str);
data/pgn-extract-19.04/output.c:713:37:  [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(algebraic, "+");
data/pgn-extract-19.04/output.c:716:37:  [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(algebraic, "#");
data/pgn-extract-19.04/output.c:736: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).
                            ind += strlen((char *) algebraic);
data/pgn-extract-19.04/output.c:746: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).
                                ind = strlen(algebraic);
data/pgn-extract-19.04/output.c:778: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).
                                ind += strlen(NULL_MOVE_STRING);
data/pgn-extract-19.04/output.c:798: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).
                                    ind = strlen(algebraic);
data/pgn-extract-19.04/output.c:811:37:  [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(algebraic, "+");
data/pgn-extract-19.04/output.c:815:37:  [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(algebraic, "#");
data/pgn-extract-19.04/output.c:929: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).
            if (strlen(evaluation) > strlen(valueSpace)) {
data/pgn-extract-19.04/output.c:929: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).
            if (strlen(evaluation) > strlen(valueSpace)) {
data/pgn-extract-19.04/output.c:1097: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).
                size_t len = strlen(chunk);
data/pgn-extract-19.04/output.c:1365: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).
        space_needed += strlen(Tags[WHITE_TAG]);
data/pgn-extract-19.04/output.c:1368: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).
        space_needed += strlen(Tags[BLACK_TAG]);
data/pgn-extract-19.04/output.c:1372: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).
        space_needed += 1 + strlen(Tags[EVENT_TAG]);
data/pgn-extract-19.04/output.c:1375: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).
        space_needed += 1 + strlen(Tags[SITE_TAG]);
data/pgn-extract-19.04/output.c:1378: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).
        space_needed += 1 + strlen(Tags[DATE_TAG]);
data/pgn-extract-19.04/output.c:1385: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).
    space_needed += strlen(c1_prefix);
data/pgn-extract-19.04/output.c:1387: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).
        space_needed += 1 + strlen(Tags[RESULT_TAG]);
data/pgn-extract-19.04/output.c:1390: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).
        space_needed += 1 + strlen("*");
data/pgn-extract-19.04/output.c:1406: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(comment, " ");
data/pgn-extract-19.04/output.c:1410: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(comment, " ");
data/pgn-extract-19.04/output.c:1414: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(comment, " ");
data/pgn-extract-19.04/output.c:1423: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(comment, "*");
data/pgn-extract-19.04/output.c:1425:5:  [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(comment, ";");
data/pgn-extract-19.04/output.c:1427: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(comment) >= space_needed) {
data/pgn-extract-19.04/output.c:1574: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).
    char *comment = (char *) malloc_or_die(strlen(prefix) + strlen(fen) + strlen(suffix) + 1);
data/pgn-extract-19.04/output.c:1574: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).
    char *comment = (char *) malloc_or_die(strlen(prefix) + strlen(fen) + strlen(suffix) + 1);
data/pgn-extract-19.04/output.c:1574:75:  [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 *comment = (char *) malloc_or_die(strlen(prefix) + strlen(fen) + strlen(suffix) + 1);

ANALYSIS SUMMARY:

Hits = 163
Lines analyzed = 18492 in approximately 0.49 seconds (37777 lines/second)
Physical Source Lines of Code (SLOC) = 13372
Hits@level = [0] 290 [1]  74 [2]  56 [3]   1 [4]  32 [5]   0
Hits@level+ = [0+] 453 [1+] 163 [2+]  89 [3+]  33 [4+]  32 [5+]   0
Hits/KSLOC@level+ = [0+] 33.8768 [1+] 12.1897 [2+] 6.6557 [3+] 2.46784 [4+] 2.39306 [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.