Fix a bug when parsing the elf SHT_MIPS_OPTIONS section

This commit is contained in:
Random 2020-04-13 19:09:32 +02:00
parent bcb825fb02
commit 4bed300b33

View file

@ -580,9 +580,11 @@ public class MIPS_ElfExtension extends ElfExtension {
break;
default:
// consume unprocessed option description bytes
elfLoadHelper.createData(nextOptionAddr,
new ArrayDataType(ByteDataType.dataType, optionDataSize, 1));
if (optionDataSize > 0) {
// consume unprocessed option description bytes
elfLoadHelper.createData(nextOptionAddr,
new ArrayDataType(ByteDataType.dataType, optionDataSize, 1));
}
}
limit -= odkHeader.getLength() + optionDataSize;