mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 12:15:39 +00:00
Fix out of bounds array access in lexer
If the type char is signed, then in the function yylex_GetFloatMaskAndFloatLen(), *s can have a negative value and be converted to a negative int32_t which is then used as an array index. It should be converted to uint8_t instead to ensure that the value is in the bounds of the tFloatingFirstChar, tFloatingSecondChar, and tFloatingChars arrays.
This commit is contained in:
1 parent
54e5bf0f0c
commit
1decf5d0d4
4 files changed
+10
-3
No files matched your search
@@ -0,0 +1 @@
|
||||
x�
|
||||
@@ -0,0 +1,3 @@
|
||||
ERROR: garbage_char.asm(1):
|
||||
syntax error
|
||||
error: Assembly aborted (1 errors)!
|
||||
@@ -0,0 +1,3 @@
|
||||
ERROR: -(1):
|
||||
syntax error
|
||||
error: Assembly aborted (1 errors)!
|
||||
Reference in new issue
Block a user