mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-17 14:30:52 +00:00
check for index in range
This commit is contained in:
parent
52cfdebb63
commit
054fc41878
@ -26,7 +26,7 @@ public class IconFile extends AbstractFile
|
||||
while (true)
|
||||
{
|
||||
int dataLen = HexFormatter.getWord (buffer, ptr);
|
||||
if (dataLen == 0)
|
||||
if (dataLen == 0 || (dataLen + ptr) > buffer.length)
|
||||
break;
|
||||
icons.add (new Icon (buffer, ptr));
|
||||
ptr += dataLen;
|
||||
|
Loading…
x
Reference in New Issue
Block a user