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/mysql-connector-python-8.0.15/src/include/mysql_connector.h Examining data/mysql-connector-python-8.0.15/src/include/exceptions.h Examining data/mysql-connector-python-8.0.15/src/include/mysql_capi.h Examining data/mysql-connector-python-8.0.15/src/include/catch23.h Examining data/mysql-connector-python-8.0.15/src/include/mysql_capi_conversion.h Examining data/mysql-connector-python-8.0.15/src/mysql_capi.c Examining data/mysql-connector-python-8.0.15/src/mysqlxpb/mysqlxpb.cc Examining data/mysql-connector-python-8.0.15/src/mysqlxpb/python_cast.h Examining data/mysql-connector-python-8.0.15/src/mysqlxpb/python.h Examining data/mysql-connector-python-8.0.15/src/mysql_capi_conversion.c Examining data/mysql-connector-python-8.0.15/src/force_cpp_linkage.cc Examining data/mysql-connector-python-8.0.15/src/mysql_connector.c Examining data/mysql-connector-python-8.0.15/src/exceptions.c FINAL RESULTS: data/mysql-connector-python-8.0.15/src/mysql_capi.c:1736: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 error[100]; data/mysql-connector-python-8.0.15/src/mysql_capi_conversion.c:174: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 fmt[32]= {0}; data/mysql-connector-python-8.0.15/src/mysql_capi_conversion.c:175: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 result[17]= {0}; data/mysql-connector-python-8.0.15/src/mysql_capi_conversion.c:257: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 result[17]= {0}; data/mysql-connector-python-8.0.15/src/mysql_capi_conversion.c:305: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 result[27]= {0}; data/mysql-connector-python-8.0.15/src/mysql_capi.c:1209: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 (database && strlen(database) == 0) data/mysql-connector-python-8.0.15/src/mysql_capi.c:1403:59: [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). PyString_FromStringAndSize(cs.name, strlen(cs.name))); data/mysql-connector-python-8.0.15/src/mysql_capi.c:1406: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). strlen(cs.csname))); data/mysql-connector-python-8.0.15/src/mysql_capi.c:1410: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). strlen(cs.comment))); data/mysql-connector-python-8.0.15/src/mysql_capi.c:1416:57: [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(cs.dir))); data/mysql-connector-python-8.0.15/src/mysql_capi.c:2447:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(row[i])) data/mysql-connector-python-8.0.15/src/mysql_capi.c:2700:48: [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 PyByteArray_FromStringAndSize(stat, strlen(stat)); data/mysql-connector-python-8.0.15/src/mysql_capi_conversion.c:200:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fmt, "%02d:%02d:%02d.%06d", 19); data/mysql-connector-python-8.0.15/src/mysql_capi_conversion.c:209:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fmt, "%02d:%02d:%02d", 14); ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 5755 in approximately 0.17 seconds (33169 lines/second) Physical Source Lines of Code (SLOC) = 3519 Hits@level = [0] 7 [1] 9 [2] 5 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 21 [1+] 14 [2+] 5 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 5.9676 [1+] 3.9784 [2+] 1.42086 [3+] 0 [4+] 0 [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.