Commit 0b83096b authored by Davi Arnaut's avatar Davi Arnaut

Bug#48327: Some crashes specific to FreeBSD ("embedded")

Bug#47139: Test "merge" crashes in "embedded" run

Backport patch for Bug#47139
parent d4931e4b
......@@ -66,9 +66,12 @@ static int _mi_cmp_buffer(File file, const uchar *buff, my_off_t filepos,
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size)
{
DBUG_ENTER("mi_dynmap_file");
if (size > (my_off_t) (~((size_t) 0)))
if (size == 0 || size > (my_off_t) (~((size_t) 0)))
{
DBUG_PRINT("warning", ("File is too large for mmap"));
if (size)
DBUG_PRINT("warning", ("File is too large for mmap"));
else
DBUG_PRINT("warning", ("Do not mmap zero-length"));
DBUG_RETURN(1);
}
/*
......
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