mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-19 19:16:34 +00:00
Fixes: individual static analysers reset tapes, for potential successors. The ZX81 file analyser no longer overruns its buffer upon receiving a file that is shorter than 11 bytes.
This commit is contained in:
@@ -51,7 +51,7 @@ static std::shared_ptr<File> ZX81FileFromData(const std::vector<uint8_t> &data)
|
||||
// Look for a file name.
|
||||
size_t data_pointer = 0;
|
||||
int c = 11;
|
||||
while(c--) {
|
||||
while(c < data.size() && c--) {
|
||||
if(data[data_pointer] & 0x80) break;
|
||||
data_pointer++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user