1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Ensured no out-of-bounds accesses.

This commit is contained in:
Thomas Harte 2017-06-08 21:31:03 -04:00
parent ee4c8b5ad2
commit c775db50ef

View File

@ -17,6 +17,8 @@ static uint16_t short_at(size_t address, const std::vector<uint8_t> &data) {
static std::shared_ptr<File> ZX80FileFromData(const std::vector<uint8_t> &data) { static std::shared_ptr<File> ZX80FileFromData(const std::vector<uint8_t> &data) {
// Does this look like a ZX80 file? // Does this look like a ZX80 file?
if(data.size() < 0x28) return nullptr;
// uint16_t next_line_number = short_at(0x2, data); // uint16_t next_line_number = short_at(0x2, data);
// uint16_t first_visible_line = short_at(0x13, data); // uint16_t first_visible_line = short_at(0x13, data);