diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2022-01-20 23:05:23 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-20 21:05:23 -0500 |
| commit | be71e26d9afc470a9293e74a6f56ca87f7412be0 (patch) | |
| tree | ebcaf100b26c91ef492bb139c0ee579f09a28c9e /ZAPD/ZAnimation.cpp | |
| parent | 0ba78130478ee1272bc0e2f2fec2d162e7f7f995 (diff) | |
Fix out-of-bounds reading when converting textures to C (#236)
* Fill buffer to a multiple of 8 bytes
* Remove overloaded bitconverter methods and use boundary-checker .at method when possible
* Add a warning in oob reads in the bitconverter
* Remove repeated code
* format
* Whoops
* whoops++
Diffstat (limited to 'ZAPD/ZAnimation.cpp')
| -rw-r--r-- | ZAPD/ZAnimation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ZAPD/ZAnimation.cpp b/ZAPD/ZAnimation.cpp index 4d9266b..74b520b 100644 --- a/ZAPD/ZAnimation.cpp +++ b/ZAPD/ZAnimation.cpp @@ -51,7 +51,7 @@ void ZNormalAnimation::ParseRawData() { ZAnimation::ParseRawData(); - const uint8_t* data = parent->GetRawData().data(); + auto& data = parent->GetRawData(); rotationValuesSeg = BitConverter::ToInt32BE(data, rawDataIndex + 4); rotationIndicesSeg = BitConverter::ToInt32BE(data, rawDataIndex + 8); |
