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/libtranscript-0.3.3/src/utf_endian.h Examining data/libtranscript-0.3.3/src/generic_fallbacks.h Examining data/libtranscript-0.3.3/src/handle.h Examining data/libtranscript-0.3.3/src/utf.h Examining data/libtranscript-0.3.3/src/transcript.h Examining data/libtranscript-0.3.3/src/static_assert.h Examining data/libtranscript-0.3.3/src/transcript_iconv.c Examining data/libtranscript-0.3.3/src/tables/cns11643f.c Examining data/libtranscript-0.3.3/src/tables/euccn.c Examining data/libtranscript-0.3.3/src/tables/ibm437p1001995.c Examining data/libtranscript-0.3.3/src/tables/iso2022jisx2121990.c Examining data/libtranscript-0.3.3/src/tables/viscii.c Examining data/libtranscript-0.3.3/src/tables/eucjis2004.c Examining data/libtranscript-0.3.3/src/tables/cns116435.c Examining data/libtranscript-0.3.3/src/tables/cns116434.c Examining data/libtranscript-0.3.3/src/tables/shiftjis.c Examining data/libtranscript-0.3.3/src/tables/ibm1047p1001995.c Examining data/libtranscript-0.3.3/src/tables/euckr.c Examining data/libtranscript-0.3.3/src/tables/cns116433.c Examining data/libtranscript-0.3.3/src/tables/jisx2011969.c Examining data/libtranscript-0.3.3/src/tables/cns116432.c Examining data/libtranscript-0.3.3/src/tables/eucjp.c Examining data/libtranscript-0.3.3/src/tables/iso8859.c Examining data/libtranscript-0.3.3/src/tables/isoir165.c Examining data/libtranscript-0.3.3/src/tables/gb18030table.c Examining data/libtranscript-0.3.3/src/tables/ibm37p1001995.c Examining data/libtranscript-0.3.3/src/tables/cns116431.c Examining data/libtranscript-0.3.3/src/tables/cns116432004b.c Examining data/libtranscript-0.3.3/src/tables/iso2022gb2312.c Examining data/libtranscript-0.3.3/src/tables/ibm1168p1002002.c Examining data/libtranscript-0.3.3/src/tables/cns116432004e.c Examining data/libtranscript-0.3.3/src/tables/cns116432004c.c Examining data/libtranscript-0.3.3/src/tables/iso2022ksc5601.c Examining data/libtranscript-0.3.3/src/tables/cns116432004d.c Examining data/libtranscript-0.3.3/src/tables/windows125x.c Examining data/libtranscript-0.3.3/src/tables/cns116436.c Examining data/libtranscript-0.3.3/src/tables/cns116437.c Examining data/libtranscript-0.3.3/src/tables/windows932.c Examining data/libtranscript-0.3.3/src/tables/windows9362000.c Examining data/libtranscript-0.3.3/src/tables/iso2022jisx213.c Examining data/libtranscript-0.3.3/src/tables/iso2022sbcs.c Examining data/libtranscript-0.3.3/src/tables/big5.c Examining data/libtranscript-0.3.3/src/tables/big5hkscs.c Examining data/libtranscript-0.3.3/src/tables/cp949.c Examining data/libtranscript-0.3.3/src/tables/iso2022jisx208.c Examining data/libtranscript-0.3.3/src/tables/shiftjis2004.c Examining data/libtranscript-0.3.3/src/tables/ibm878p1001996.c Examining data/libtranscript-0.3.3/src/tables/koi8ru.c Examining data/libtranscript-0.3.3/src/api.h Examining data/libtranscript-0.3.3/src/moduledefs.h Examining data/libtranscript-0.3.3/src/state_table_converter.c Examining data/libtranscript-0.3.3/src/transcript_dlfcn.h Examining data/libtranscript-0.3.3/src/modules/ascii.c Examining data/libtranscript-0.3.3/src/modules/iso2022.c Examining data/libtranscript-0.3.3/src/modules/unicode.c Examining data/libtranscript-0.3.3/src/modules/unicode_gb18030.c Examining data/libtranscript-0.3.3/src/modules/unicode.h Examining data/libtranscript-0.3.3/src/modules/unicode_utf7.c Examining data/libtranscript-0.3.3/src/modules/euctw.c Examining data/libtranscript-0.3.3/src/transcript_io.c Examining data/libtranscript-0.3.3/src/generic_fallbacks.c Examining data/libtranscript-0.3.3/src/pregen/generic_fallbacks.h Examining data/libtranscript-0.3.3/src/pregen/generic_fallbacks.c Examining data/libtranscript-0.3.3/src/bool.h Examining data/libtranscript-0.3.3/src/aliases.c Examining data/libtranscript-0.3.3/src/utf.c Examining data/libtranscript-0.3.3/src/sbcs_table_converter.c Examining data/libtranscript-0.3.3/src/transcript.c Examining data/libtranscript-0.3.3/src/transcript_internal.h Examining data/libtranscript-0.3.3/src.util/linkltc/linkltc.c Examining data/libtranscript-0.3.3/src.util/linkltc/optionMacros.h Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_analyse.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/minimize_state_machine.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucmparser.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.h Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucmparser.h Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_tables.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucmlexer.c Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucm.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/variant.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_simple.cc Examining data/libtranscript-0.3.3/src.util/ucm2ltc/optionMacros.h Examining data/libtranscript-0.3.3/doc/main_doc.h FINAL RESULTS: data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:45:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:98:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(base + orig_len, append); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:52:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/libtranscript-0.3.3/src/transcript.c:461: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(search_path_element, transcript_path); data/libtranscript-0.3.3/src/transcript.c:666:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/libtranscript-0.3.3/src/transcript_io.c:33:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, sym); data/libtranscript-0.3.3/src/transcript_io.c:34:2: [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(buffer, converter_name); data/libtranscript-0.3.3/src/transcript_io.c:222:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(file_name, dir); data/libtranscript-0.3.3/src/transcript_io.c:224:2: [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(file_name, name); data/libtranscript-0.3.3/src/transcript_io.c:226:2: [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(file_name, ext); data/libtranscript-0.3.3/src/transcript.c:450:26: [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 ((transcript_path = getenv("TRANSCRIPT_PATH")) != NULL) { data/libtranscript-0.3.3/src/transcript.c:459:26: [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 ((transcript_path = getenv("HOME")) != NULL) { data/libtranscript-0.3.3/src/transcript.c:663:6: [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("TRANSCRIPT_LOG") != NULL) { data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:32: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 dirseps[3] = { '/' }; data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:57:2: [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(retval, str, len); data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:123:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name[160]; data/libtranscript-0.3.3/src.util/ucm2ltc/minimize_state_machine.cc:301:2: [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(&tmp_state, a, sizeof(full_state_t)); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm.cc:437:11: [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). mb_max = atoi(tag_values[MB_MAX].str); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm.cc:438:11: [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). mb_min = atoi(tag_values[MB_MIN].str); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm.cc:565:4: [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(bytes, 1 + (char *) &codepoint, 3); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:122:2: [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(retval, str, len); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:199: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. static char sequence_buffer[31 * 4 + 1]; data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:202: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(sequence_buffer + i * 4, "\\x%02X", bytes[i]); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:207: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. static char codepoint_buffer[19 * 7 + 1]; data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:210:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. idx += sprintf(codepoint_buffer + idx, "<U%04X>", codepoints[i] & 0x1fffff); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:449:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_output_name[160], *base_name; data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:494:15: [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 ((yyin = fopen(optcurrent, "r")) == NULL) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:525:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_output_name[160]; data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:544: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(output_name + len - 3, ".c"); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:547: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). if ((output = fopen(output_name, "w+t")) == NULL) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_analyse.cc:78:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mb_cur_max = atoi(tag_values[MB_MAX].str); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_analyse.cc:79:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mb_cur_min = atoi(tag_values[MB_MIN].str); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_simple.cc:78: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(map[level1_map_used], map[i], 32); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_simple.cc:101: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(level1_indices[level0_map_used], level1_indices[i], 32); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_tables.cc:340: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. static char result[1024]; data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_tables.cc:384:4: [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(blocks + saved_blocks * BLOCKSIZE, data + i * BLOCKSIZE, BLOCKSIZE); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_tables.cc:574:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name[160]; data/libtranscript-0.3.3/src.util/ucm2ltc/variant.cc:21:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_id_buffer[161]; data/libtranscript-0.3.3/src/aliases.c:65:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name[NORMALIZE_NAME_MAX]; data/libtranscript-0.3.3/src/aliases.c:138:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name[NORMALIZE_NAME_MAX]; data/libtranscript-0.3.3/src/aliases.c:196:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name[NORMALIZE_NAME_MAX]; data/libtranscript-0.3.3/src/aliases.c:291:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[MAX_ID + 1]; data/libtranscript-0.3.3/src/aliases.c:305:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((aliases = fopen(name, "r")) == NULL) { data/libtranscript-0.3.3/src/moduledefs.h:59: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. const char codepage_bytes[MAX_CHAR_BYTES_V1]; data/libtranscript-0.3.3/src/modules/euctw.c:23: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 *plane_names_2004[NR_OF_PLANES] = { data/libtranscript-0.3.3/src/modules/euctw.c:46: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 *plane_names_1992[NR_OF_PLANES] = { data/libtranscript-0.3.3/src/modules/iso2022.c:90:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char escape_seq[7]; /**< The escape sequence itselft. */ data/libtranscript-0.3.3/src/modules/iso2022.c:427:2: [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(handle->state.g_to, handle->g_initial, sizeof(handle->g_initial)); data/libtranscript-0.3.3/src/modules/iso2022.c:481:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[32], *buffer_ptr; data/libtranscript-0.3.3/src/modules/iso2022.c:658:2: [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(handle->state.g_from, handle->g_initial, sizeof(handle->g_initial)); data/libtranscript-0.3.3/src/modules/iso2022.c:707:2: [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(handle->state.g_from, handle->g_initial, sizeof(handle->g_initial)); data/libtranscript-0.3.3/src/modules/iso2022.c:772: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(extra_handle, stc_handle, sizeof(stc_handle_t)); data/libtranscript-0.3.3/src/modules/unicode.c:246:2: [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(state, &handle->state, sizeof(state_t)); data/libtranscript-0.3.3/src/modules/unicode.c:251:2: [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(&handle->state, state, sizeof(state_t)); data/libtranscript-0.3.3/src/sbcs_table_converter.c:182:2: [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(&retval->tables, tables, sizeof(sbcs_converter_v1_t)); data/libtranscript-0.3.3/src/state_table_converter.c:121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value[4] = { 0, 0, 0, 0}; data/libtranscript-0.3.3/src/state_table_converter.c:124:2: [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(&value, bytes, length); data/libtranscript-0.3.3/src/state_table_converter.c:392:6: [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(*outbuf, handle->tables.converter->shift_states[i].bytes, handle->tables.converter->shift_states[i].len); data/libtranscript-0.3.3/src/state_table_converter.c:711:2: [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(save, &handle->state, sizeof(save_state_t)); data/libtranscript-0.3.3/src/state_table_converter.c:716:2: [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(&handle->state, save, sizeof(save_state_t)); data/libtranscript-0.3.3/src/transcript.c:53: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 char_info[CHAR_MAX]; data/libtranscript-0.3.3/src/transcript.c:133:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name_a[NORMALIZE_NAME_MAX], normalized_name_b[NORMALIZE_NAME_MAX]; data/libtranscript-0.3.3/src/transcript.c:463: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(search_path_element, ".transcript"); data/libtranscript-0.3.3/src/transcript.c:518:2: [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(result, str, len); data/libtranscript-0.3.3/src/transcript_iconv.c:115:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char saved_state[TRANSCRIPT_SAVE_STATE_SIZE]; data/libtranscript-0.3.3/src/transcript_io.c:24:55: [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). static FILE *fopen_wrapper(const char *name) { return fopen(name, "r"); } data/libtranscript-0.3.3/src/transcript_io.c:32:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[NORMALIZE_NAME_MAX + 32]; data/libtranscript-0.3.3/src/transcript_io.c:74:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name[NORMALIZE_NAME_MAX]; data/libtranscript-0.3.3/src/transcript_io.c:185:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char normalized_name[NORMALIZE_NAME_MAX]; data/libtranscript-0.3.3/src/utf.c:36:2: [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(data, &value, 4); data/libtranscript-0.3.3/src/utf.c:52:2: [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(&result, data, 4); data/libtranscript-0.3.3/src/utf.c:67:2: [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(data, &value, 2); data/libtranscript-0.3.3/src/utf.c:81:2: [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(&result, data, 2); data/libtranscript-0.3.3/src/utf.c:407:2: [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(&codepoint, *inbuf, 4); data/libtranscript-0.3.3/src/utf.c:425: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(*outbuf, &tmp, 2); data/libtranscript-0.3.3/src/utf.c:430: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(*outbuf, &tmp, 2); data/libtranscript-0.3.3/src/utf.c:432: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((*outbuf) + 2, &tmp, 2); data/libtranscript-0.3.3/src/utf_endian.h:102:2: [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(&codepoint, *inbuf, 4); data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:51: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). size_t len = strlen(str) + 1; data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:81: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(optcurrent) < 5 || strcmp(optcurrent + strlen(optcurrent) - 4, ".ltc") != 0) data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:81:53: [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(optcurrent) < 5 || strcmp(optcurrent + strlen(optcurrent) - 4, ".ltc") != 0) data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:92: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). orig_len = strlen(base); data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:93: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). len = strlen(append) + orig_len + 1; data/libtranscript-0.3.3/src.util/linkltc/linkltc.c:152: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). base_name[strlen(base_name) - 4] = 0; data/libtranscript-0.3.3/src.util/linkltc/optionMacros.h:127: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). optlength = strlen(optcurrent); \ data/libtranscript-0.3.3/src.util/linkltc/optionMacros.h:215:121: [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). #define OPTION(shortName, longName, argReq) if ((opttype == SHORT && optcurrent[1] == shortName) || (opttype == LONG && strlen(longName) == optlength - 2 && strncmp(optcurrent + 2, longName, optlength - 2) == 0)) { CHECK_ARG(argReq) { data/libtranscript-0.3.3/src.util/linkltc/optionMacros.h:222:62: [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). #define LONG_OPTION(longName, argReq) if (opttype == LONG && strlen(longName) == optlength - 2 && strncmp(optcurrent + 2, longName, optlength - 2) == 0) { CHECK_ARG(argReq) { data/libtranscript-0.3.3/src.util/ucm2ltc/optionMacros.h:127: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). optlength = strlen(optcurrent); \ data/libtranscript-0.3.3/src.util/ucm2ltc/optionMacros.h:215:121: [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). #define OPTION(shortName, longName, argReq) if ((opttype == SHORT && optcurrent[1] == shortName) || (opttype == LONG && strlen(longName) == optlength - 2 && strncmp(optcurrent + 2, longName, optlength - 2) == 0)) { CHECK_ARG(argReq) { data/libtranscript-0.3.3/src.util/ucm2ltc/optionMacros.h:222:62: [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). #define LONG_OPTION(longName, argReq) if (opttype == LONG && strlen(longName) == optlength - 2 && strncmp(optcurrent + 2, longName, optlength - 2) == 0) { CHECK_ARG(argReq) { data/libtranscript-0.3.3/src.util/ucm2ltc/ucm.cc:392:6: [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. !equal((*iter)->codepage_bytes.begin(), (*iter)->codepage_bytes.end(), (*search_iter)->codepage_bytes.begin())) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm.cc:696:5: [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. equal(codepoints.begin(), codepoints.end(), (*iter)->codepoints.begin())) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm.cc:729:5: [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. equal(codepage_bytes.begin(), codepage_bytes.end(), (*iter)->codepage_bytes.begin())) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:116: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). size_t len = strlen(str) + 1; data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:452: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(optArg) < 3 || strcmp(optArg + strlen(optArg) - 2, ".c") != 0) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:452: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). if (strlen(optArg) < 3 || strcmp(optArg + strlen(optArg) - 2, ".c") != 0) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:458:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(base_name, normalized_output_name, strlen(base_name) - 2) != 0) data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:459:70: [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). fatal("Output file name is not normalized (should be '%.*s')\n", strlen(normalized_output_name) - 1, normalized_output_name); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:539:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(base_name); data/libtranscript-0.3.3/src.util/ucm2ltc/ucm2ltc.cc:564: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). base_name[strlen(base_name) - 2] = 0; data/libtranscript-0.3.3/src.util/ucm2ltc/ucm_write_tables.cc:157:3: [1] (buffer) mismatch: 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. mismatch((*a)->codepoints.begin(), end_iter, data/libtranscript-0.3.3/src.util/ucm2ltc/ucmlexer.c:659:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/libtranscript-0.3.3/src.util/ucm2ltc/ucmlexer.c:884: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). { size_t len = strlen(yytext); memmove(yytext, yytext + 1, len - 2); yytext[len - 2] = 0; return STRING; } data/libtranscript-0.3.3/src.util/ucm2ltc/ucmlexer.c:1709:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return yy_scan_bytes(yystr,(int) strlen(yystr) ); data/libtranscript-0.3.3/src.util/ucm2ltc/variant.cc:29: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). len = strlen(id); data/libtranscript-0.3.3/src.util/ucm2ltc/variant.cc:36:6: [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(normalized_id_buffer) > 159) data/libtranscript-0.3.3/src/aliases.c:248: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 entry_name_len = strlen(entry->d_name); data/libtranscript-0.3.3/src/aliases.c:311:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(aliases)) != EOF) { data/libtranscript-0.3.3/src/transcript.c:460: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 ((search_path_element = malloc(strlen(transcript_path) + 1 + 11 + 1)) != NULL) { data/libtranscript-0.3.3/src/transcript.c:462: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(search_path_element, "/"); /* Windows also recognises / as directory separator internally. */ data/libtranscript-0.3.3/src/transcript.c:514: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). size_t len = strlen(str) + 1; data/libtranscript-0.3.3/src/transcript_io.c:218: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). len = strlen(dir) + strlen(name) + 2 + strlen(ext) + 1; data/libtranscript-0.3.3/src/transcript_io.c:218: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). len = strlen(dir) + strlen(name) + 2 + strlen(ext) + 1; data/libtranscript-0.3.3/src/transcript_io.c:218:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(dir) + strlen(name) + 2 + strlen(ext) + 1; data/libtranscript-0.3.3/src/transcript_io.c:223:2: [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(file_name, "/"); /* Even on Windows, / is recognised as directory separator internally. */ data/libtranscript-0.3.3/src/transcript_io.c:225:2: [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(file_name, "."); ANALYSIS SUMMARY: Hits = 116 Lines analyzed = 233445 in approximately 21.72 seconds (10750 lines/second) Physical Source Lines of Code (SLOC) = 228864 Hits@level = [0] 219 [1] 38 [2] 65 [3] 3 [4] 10 [5] 0 Hits@level+ = [0+] 335 [1+] 116 [2+] 78 [3+] 13 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 1.46375 [1+] 0.506851 [2+] 0.340814 [3+] 0.0568023 [4+] 0.0436941 [5+] 0 Symlinks skipped = 1 (--allowlink overrides but see doc for security issue) 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.