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/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c Examining data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c Examining data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c Examining data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c FINAL RESULTS: data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:785: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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:785: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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:785: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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:785: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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:7378:18: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (!setstate) PyErr_Clear(); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:7379:18: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:7379:58: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:7400:16: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. Py_XDECREF(setstate); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:738:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:2976:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy((&(__pyx_v_c_string[__pyx_t_10])), (&(__pyx_v_buffer_ptr[__pyx_v_position])), (__pyx_v_current_buffer_size - __pyx_v_position))); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:3149:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy((&(__pyx_v_c_string[__pyx_t_9])), __pyx_v_buffer_ptr, __pyx_v_position)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:3224:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_c_string, (&(__pyx_v_buffer_ptr[__pyx_v_position])), __pyx_v_size)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:6259: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 warning[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:7828: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 ctversion[4], rtversion[4]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:7832: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 message[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:738:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:2043:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy((&(__pyx_v_self->buffer[__pyx_v_self->position])), (&(__pyx_v_c_data[__pyx_v_written])), __pyx_v_size)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:7412: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 warning[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:8206: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 ctversion[4], rtversion[4]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:8210: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 message[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:738:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:2531:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_c_string, (&(__pyx_v_data_ptr[(__pyx_v_i * __pyx_v_length)])), __pyx_v_length)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:3125:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy((&(__pyx_v_items_buf[__pyx_v_buf_pos])), __pyx_v_c_value, __pyx_v_value_len)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:3790:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy((&(__pyx_v_items_buf[__pyx_v_buf_pos])), __pyx_v_c_value, __pyx_v_value_len)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:6469: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 warning[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:8086: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 ctversion[4], rtversion[4]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:8090: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 message[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:738:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:1304: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. unsigned char __pyx_v_num_buf[32]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:2555: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 warning[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:3588: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 ctversion[4], rtversion[4]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:3592: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 message[200]; data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:662:87: [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 __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:783:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:5975:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(cstring); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedreader.c:7876:65: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:662:87: [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 __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:783:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); data/python-clickhouse-driver-0.1.3/clickhouse_driver/bufferedwriter.c:8254:65: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:662:87: [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 __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:783:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:5719:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(cstring); data/python-clickhouse-driver-0.1.3/clickhouse_driver/columns/stringcolumn.c:8134:65: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:662:87: [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 __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:783:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); data/python-clickhouse-driver-0.1.3/clickhouse_driver/varint.c:3636:65: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); ANALYSIS SUMMARY: Hits = 46 Lines analyzed = 28788 in approximately 0.76 seconds (37683 lines/second) Physical Source Lines of Code (SLOC) = 22835 Hits@level = [0] 0 [1] 14 [2] 24 [3] 4 [4] 4 [5] 0 Hits@level+ = [0+] 46 [1+] 46 [2+] 32 [3+] 8 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 2.01445 [1+] 2.01445 [2+] 1.40136 [3+] 0.350339 [4+] 0.17517 [5+] 0 Dot directories skipped = 2 (--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.