Skip to content
Snippets Groups Projects
Commit 94c56a4c authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

ieee1275: fix signed comparison

parent 1b782e90
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ grub_machine_mmap_iterate (grub_memory_hook_t hook, void *hook_data)
sizeof available, &available_size))
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
"couldn't examine /memory/available property");
if (available_size > sizeof (available))
if (available_size < 0 || (grub_size_t) available_size > sizeof (available))
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
"/memory response buffer exceeded");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment