vlc_stream_ReadLine: fix off-by-one
commitdbb8a1891fd41938897b66d58aa8b012695d7f30
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 24 May 2017 16:47:12 +0000 (24 19:47 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 24 May 2017 17:01:40 +0000 (24 20:01 +0300)
treecd2c1aa83461d236b3db6c3a75c0a116469e0ebb
parent0379cf77c90da4ecececfc9d3379a969d8736423
vlc_stream_ReadLine: fix off-by-one

Do not erase the last converted byte. This bug has apparently existed
ever since UTF-16 support was added.

If the conversion fails, this bug resulted in a heap underflow (writing
zero right before the beginning of the buffer).
src/input/stream.c