Buffer overflow reports by AddressSanitizer
Issue #68
invalid
Hi
AddressSanitizer (https://code.google.com/p/address-sanitizer/) reports a possible buffer overflow issue here:
If scd->last_byte < 2 then we are potentially accessing memory that is out of bounds. I'm not familiar enough with the code to decide what needs to be done if this happens.
Comments (3)
-
-
- changed status to invalid
See my previous comment.
-
It seems that line 399 has to be executed before getting to line 406. So when it gets to line 399 the first time, scd->last_byte = 0, right?
Maybe I'm missing something?
- Log in to comment
Line 386, if flag is set, is the only case where last_byte < 2 but it immediately returns afterwards.
Later on line 406, last_byte can only be greater than 2 (2+count is used in both assignments).