Commit 135b2d83 authored by unknown's avatar unknown

Bug #27119 server crash with integer division by zero during filesort on huge result

Fixed a compiler warning on platforms where uint != ulong from the first pushed fix.


sql/filesort.cc:
  fixed a compiler warning on platforms where uint != ulong
parent aa7aad70
...@@ -370,7 +370,7 @@ static BUFFPEK *read_buffpek_from_file(IO_CACHE *buffpek_pointers, uint count) ...@@ -370,7 +370,7 @@ static BUFFPEK *read_buffpek_from_file(IO_CACHE *buffpek_pointers, uint count)
ulong length; ulong length;
BUFFPEK *tmp; BUFFPEK *tmp;
DBUG_ENTER("read_buffpek_from_file"); DBUG_ENTER("read_buffpek_from_file");
if (count > ULONG_MAX/sizeof(BUFFPEK)) if ((ulong)count > ULONG_MAX/sizeof(BUFFPEK))
return 0; /* sizeof(BUFFPEK)*count will overflow */ return 0; /* sizeof(BUFFPEK)*count will overflow */
tmp=(BUFFPEK*) my_malloc(length=sizeof(BUFFPEK)*count, MYF(MY_WME)); tmp=(BUFFPEK*) my_malloc(length=sizeof(BUFFPEK)*count, MYF(MY_WME));
if (tmp) if (tmp)
......
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