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/tclodbc-2.5.1/statemnt.cxx Examining data/tclodbc-2.5.1/database.cxx Examining data/tclodbc-2.5.1/encoding.cxx Examining data/tclodbc-2.5.1/strings.cxx Examining data/tclodbc-2.5.1/tclobj.cxx Examining data/tclodbc-2.5.1/tclodbc.cxx FINAL RESULTS: data/tclodbc-2.5.1/database.cxx:120: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 szConnStrOut[256]; data/tclodbc-2.5.1/database.cxx:401:8: [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). val = atoi(value); data/tclodbc-2.5.1/database.cxx:493: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 dsn[SQL_MAX_DSN_LENGTH+1], descr[256]; data/tclodbc-2.5.1/database.cxx:524: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 driver[256], attrs[1024]; data/tclodbc-2.5.1/encoding.cxx:104:9: [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 (o->bytes, Tcl_DStringValue(&ds), len); data/tclodbc-2.5.1/statemnt.cxx:506: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 strData [256]; data/tclodbc-2.5.1/statemnt.cxx:661:8: [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). val = atoi(value); data/tclodbc-2.5.1/tclobj.cxx:83: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 s[30]; data/tclodbc-2.5.1/tclobj.cxx:84: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(s, "%ld", i); data/tclodbc-2.5.1/tclodbc.cxx:121: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 SqlMessage[SQL_MAX_MESSAGE_LENGTH]; data/tclodbc-2.5.1/tclodbc.cxx:122: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 SqlState[6]; data/tclodbc-2.5.1/tclodbc.cxx:154:32: [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). if (allowNumeric && (num = atoi(str))) data/tclodbc-2.5.1/database.cxx:540: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). for (attr = attrs; *attr; attr += strlen(attr)+1) { ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 3016 in approximately 0.09 seconds (34953 lines/second) Physical Source Lines of Code (SLOC) = 2039 Hits@level = [0] 0 [1] 1 [2] 12 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 13 [1+] 13 [2+] 12 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 6.37567 [1+] 6.37567 [2+] 5.88524 [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.