mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Fix Bytes slicing buffer overrun; fix bug in the IBM decoder which was
provoking it.
This commit is contained in:
@@ -20,6 +20,8 @@ SectorVector AbstractIbmDecoder::decodeToSectors(const RawRecordVector& rawRecor
|
||||
{
|
||||
const Bytes bytes = decodeFmMfm(rawrecord->data);
|
||||
int headerSize = skipHeaderBytes();
|
||||
if (bytes.size() < (headerSize + 1))
|
||||
continue;
|
||||
Bytes data = bytes.slice(headerSize, bytes.size() - headerSize);
|
||||
|
||||
switch (data[0])
|
||||
|
||||
Reference in New Issue
Block a user