• Edward Catmur's avatar
    Don't read past the end of the decode out buffer. · c2fbfc70
    Edward Catmur authored
    If we finish decoding in step_a state, there is no current output character, so reading *plainchar will either be an uninitialized read or (if the output buffer is minimally sized) a past-the-end read.
    
    Detected by -fsanitize=address.
    c2fbfc70
encoding-test.c++ 12.8 KB