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/voms-mysql-plugin-3.1.7/src/dbwrap.h Examining data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc Examining data/voms-mysql-plugin-3.1.7/src/mysqlwrap.h FINAL RESULTS: data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:268: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(error_msg, mysql_error(mysql)); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:276:7: [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(error_msg, str.c_str()); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:820:37: [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. std::string fqan = std::string((char *)(results[0].buffer), *(results[0].length)) + data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:823:21: [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. std::string((char *)(results[1].buffer), *(results[1].length))); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:1050:51: [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. setError(ERR_USER_SUSPENDED, std::string((char *)(res[0].buffer), (std::string::size_type)(*(res[0].length)))); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:1301:15: [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 *)(results[1].buffer))[0]) == '\0')) data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:1302:33: [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. ga.value = std::string( ((char *)(results[1].buffer)), data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:1306: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. (((char *)results[2].buffer)[0] == '\0'))) data/voms-mysql-plugin-3.1.7/src/mysqlwrap.h:98:3: [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_msg[4096]; /* Local buffer. For longer messages, try allocating memory*/ data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:438: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). long unsigned int size = strlen(role); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:470: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). unsigned long int size1 = strlen(group); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:471: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). unsigned long int size2 = strlen(role); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:521:32: [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). long unsigned int sizerole = strlen(role); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:522:33: [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). long unsigned int sizegroup = strlen(group); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:570:32: [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). long unsigned int sizerole = strlen(role); data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:615: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). if (mysql_stmt_prepare(stmt, query, strlen(query))) { data/voms-mysql-plugin-3.1.7/src/mysqlwrap.cc:906:34: [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). parameter[0].buffer_length = strlen(ca.c_str()); ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 1560 in approximately 0.05 seconds (30015 lines/second) Physical Source Lines of Code (SLOC) = 1178 Hits@level = [0] 0 [1] 8 [2] 7 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 17 [1+] 17 [2+] 9 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 14.4312 [1+] 14.4312 [2+] 7.64007 [3+] 1.69779 [4+] 1.69779 [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.