projects
/
seabios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6782344
)
Make sure optionroms have a non-zero size before using them.
author
Kevin O'Connor
<kevin@koconnor.net>
Mon, 13 Apr 2009 23:19:22 +0000
(19:19 -0400)
committer
Kevin O'Connor
<kevin@koconnor.net>
Mon, 13 Apr 2009 23:19:22 +0000
(19:19 -0400)
src/optionroms.c
patch
|
blob
|
history
diff --git
a/src/optionroms.c
b/src/optionroms.c
index 6bc28fa6e490b7411888f28e67cb95bc263a9ba9..f3c4cfd3830bb31a792d67920f3b732c1920496f 100644
(file)
--- a/
src/optionroms.c
+++ b/
src/optionroms.c
@@
-113,6
+113,8
@@
is_valid_rom(struct rom_header *rom)
{
if (rom->signature != OPTION_ROM_SIGNATURE)
return 0;
+ if (! rom->size)
+ return 0;
u32 len = rom->size * 512;
u8 sum = checksum(rom, len);
if (sum != 0) {