mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fix interpolation/STRFMT overflow issues
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:
9
test/asm/interpolation-overflow.err
Normal file
9
test/asm/interpolation-overflow.err
Normal file
@@ -0,0 +1,9 @@
|
||||
ERROR: interpolation-overflow.asm(4):
|
||||
Fractional width 99999999 too long, limiting to 255
|
||||
ERROR: interpolation-overflow.asm(4):
|
||||
Formatted numeric value too long
|
||||
warning: interpolation-overflow.asm(4): [-Wlarge-constant]
|
||||
Precision of fixed-point constant is too large
|
||||
while expanding symbol "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
FATAL: interpolation-overflow.asm(4):
|
||||
Macro argument '\1' not defined
|
||||
Reference in New Issue
Block a user