From 586c943fb9ce7eedd1e326a8e9244bd8dc408d30 Mon Sep 17 00:00:00 2001 From: Andrew Goodbody Date: Sat, 27 Mar 2010 13:12:52 +0100 Subject: AMI: If BufferSize = 0, also try to get bigpart size. --- ami.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ami.c b/ami.c index d93ffa6..018eb3d 100644 --- a/ami.c +++ b/ami.c @@ -249,7 +249,7 @@ AMI95Extract(unsigned char *BIOSImage, int BIOSLength, int BIOSOffset, else BufferSize = le16toh(part->CSize); - if ((BufferSize == 0xFFFF) && !Compressed) { + if (((BufferSize == 0xFFFF) || !BufferSize) && !Compressed) { bigpart = (struct bigpart *) (BIOSImage + (Offset - BIOSOffset) - sizeof(struct bigpart)); BufferSize = bigpart->CSize; } -- cgit v1.2.3