-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Lines 90 to 93 in ca76a0a
if (currentLevel < MAX_TREE_SIZE) | |
currentLevel++; | |
nodes[currentLevel] = size; | |
SML_TREELOG(currentLevel, "LISTSTART on level %i with %i nodes\n", |
Suppose currentLevel = MAX_TREE_SIZE - 1
at Line 90. Then, currentLevel = MAX_TREE_SIZE
at Line 92, which leads to the following overflow bug.
==269918==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000f11e4a at pc 0x000000558309 bp 0x7ffde1d4abf0 sp 0x7ffde1d4abe8
WRITE of size 1 at 0x000000f11e4a thread T0
#0 0x558308 in smlNewList(unsigned char) /home/parallels/sml_parser/src/sml.cpp:92:23
#1 0x558637 in checkMagicByte(unsigned char&) /home/parallels/sml_parser/src/sml.cpp:118:5
#2 0x559c52 in smlState(unsigned char&) /home/parallels/sml_parser/src/sml.cpp:292:5
schlimmchen
Metadata
Metadata
Assignees
Labels
No labels