Fixed 'strcat-param-overlap' found by ASAN in 'IsKeepMultiplexEnabledVariables' #3554

pull/3569/head
Javier Jaramago Fernández 5 years ago
parent e86b025882
commit fd9f3f13a3

@ -2254,7 +2254,11 @@ bool MySQL_Connection::IsKeepMultiplexEnabledVariables(char *query_digest_text)
}
while (query_digest_text_filter_select && (match = strcasestr(query_digest_text_filter_select,"@@"))) {
*match = '\0';
strcat(query_digest_text_filter_select, match+strlen("@@"));
if (strlen(query_digest_text_filter_select) == 0) {
memcpy(query_digest_text_filter_select, match, strlen("@@"));
} else {
strcat(query_digest_text_filter_select, match+strlen("@@"));
}
}
std::vector<char*>query_digest_text_filter_select_v;

Loading…
Cancel
Save