Commit 23bd61a1 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix warning

parent 894fbe68
...@@ -14536,7 +14536,8 @@ st_print_event_info::st_print_event_info() ...@@ -14536,7 +14536,8 @@ st_print_event_info::st_print_event_info()
bool copy_event_cache_to_string_and_reinit(IO_CACHE *cache, LEX_STRING *to) bool copy_event_cache_to_string_and_reinit(IO_CACHE *cache, LEX_STRING *to)
{ {
reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE); reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE);
if (!(to->str= (char*) my_malloc((to->length= cache->end_of_file), MYF(0)))) if (cache->end_of_file > SIZE_T_MAX ||
!(to->str= (char*) my_malloc((to->length= (size_t)cache->end_of_file), MYF(0))))
{ {
perror("Out of memory: can't allocate memory in copy_event_cache_to_string_and_reinit()."); perror("Out of memory: can't allocate memory in copy_event_cache_to_string_and_reinit().");
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment