mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix interpolation/STRFMT overflow issues (#838)
Widths and fractional widths greater than 255 would overflow a uint8_t and wrap around to smaller values. Total formatted lengths greater than the avilable buffer size would overflow it and potentially corrupt memory. Fixes #830 Closes #831
This commit is contained in:
4
test/asm/interpolation-overflow.asm
Normal file
4
test/asm/interpolation-overflow.asm
Normal file
@@ -0,0 +1,4 @@
|
||||
; It seems that \1 was the easiest way to notice the memory corruption that
|
||||
; resulted from this overflow
|
||||
x = 0
|
||||
{.99999999f:x}\1
|
||||
Reference in New Issue
Block a user