You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an MCS file (big endian Intel HEX format). It contains 12868 bytes, but those start (via the "4" command) at address 0x200000 (2MB into the flash).
The code in the MCS parser allocates a buffer the size of the file (so, 35424 bytes), and then uses the calculated address (2MB) to index into it. This creates an out of bounds access which results in a segmentation fault.
The difference in buffer size (based on the size of the textual MCS file) vs. the data size gives some leeway, but if the offset is too big, the code is completely broken for handling files that don't have all of their data right at the beginning of the flash.
The text was updated successfully, but these errors were encountered:
I have an MCS file (big endian Intel HEX format). It contains 12868 bytes, but those start (via the "4" command) at address 0x200000 (2MB into the flash).
The code in the MCS parser allocates a buffer the size of the file (so, 35424 bytes), and then uses the calculated address (2MB) to index into it. This creates an out of bounds access which results in a segmentation fault.
The difference in buffer size (based on the size of the textual MCS file) vs. the data size gives some leeway, but if the offset is too big, the code is completely broken for handling files that don't have all of their data right at the beginning of the flash.
The text was updated successfully, but these errors were encountered: