Kaydet (Commit) 92b936e3 authored tarafından Caolán McNamara's avatar Caolán McNamara

avoid divide by zero

Change-Id: I7d6502c752a7b9f39f94d5cddd5f44240e0b6d04
üst ca868de5
...@@ -118,6 +118,8 @@ CBenTOCReader::ReadLabel(unsigned long * pTOCOffset, unsigned long * pTOCSize) ...@@ -118,6 +118,8 @@ CBenTOCReader::ReadLabel(unsigned long * pTOCOffset, unsigned long * pTOCSize)
assert(Flags == 0x0101 || Flags == 0x0); assert(Flags == 0x0101 || Flags == 0x0);
cBlockSize = UtGetIntelWord(pCurrLabel) * 1024; pCurrLabel += 2; cBlockSize = UtGetIntelWord(pCurrLabel) * 1024; pCurrLabel += 2;
if (cBlockSize == 0)
return BenErr_NotBentoContainer;
// Check major version // Check major version
if (UtGetIntelWord(pCurrLabel) != BEN_CURR_MAJOR_VERSION) if (UtGetIntelWord(pCurrLabel) != BEN_CURR_MAJOR_VERSION)
......
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