mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-04 11:15:39 +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:
1 parent
c755fa3469
commit
992be3fd9b
9 files changed
+104
-15
No files matched your search
@@ -28,9 +28,9 @@ struct FormatSpec {
|
||||
bool prefix;
|
||||
bool alignLeft;
|
||||
bool padZero;
|
||||
uint8_t width;
|
||||
size_t width;
|
||||
bool hasFrac;
|
||||
uint8_t fracWidth;
|
||||
size_t fracWidth;
|
||||
int type;
|
||||
bool valid;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user