Commit 297e6f4f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

stream: fix off-by-one

One byte is (potentially) needed to append the final nul.
parent 9f00a00a
......@@ -318,7 +318,7 @@ char *vlc_stream_ReadLine( stream_t *s )
/* iconv */
/* UTF-8 needs at most 150% of the buffer as many as UTF-16 */
i_new_line = i_line * 3 / 2;
i_new_line = i_line * 3 / 2 + 1;
psz_new_line = malloc( i_new_line );
if( psz_new_line == NULL )
goto error;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment