mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 01:48:50 +02:00
ihexParser: check buffer size, increase if required
This commit is contained in:
@@ -95,6 +95,8 @@ int IhexParser::parse()
|
||||
}
|
||||
|
||||
ptr = (char *)&str[DATA_BASE];
|
||||
if (_bit_data.size() < loc_addr + byteLen)
|
||||
_bit_data.resize(2*(loc_addr + byteLen));
|
||||
for (int i = 0; i < byteLen; i++, ptr += 2) {
|
||||
sscanf(ptr, "%2hx", &tmp);
|
||||
_bit_data[loc_addr + i] = (_reverseOrder)? reverseByte(tmp):tmp;
|
||||
|
||||
Reference in New Issue
Block a user