4 ms·
Was going to say the same thing. ASAN would have probably flagged this, I've seen this exact thing with a read overflow. In the wild it only crashed if you we
by justinsaccount 9y ago
Was going to say the same thing. ASAN would have probably flagged this, I've seen this exact thing with a read overflow. In the wild it only crashed if you were very very unlucky. The code would do something like copy 2x as many bytes:
xyz\0XXXX
instead of
xyz\0
Since the \0 was still there, it would work fine as long as it wasn't at the end of the heap.
As it turned out, the test suite itself would abort if ran with ASAN enabled.