mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/aviobuf: Fix infinite loop in ff_get_line()
Fixes ticket4152 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
868cec5874
commit
eac5c7b837
|
@ -676,7 +676,7 @@ int ff_get_line(AVIOContext *s, char *buf, int maxlen)
|
|||
if (c && i < maxlen-1)
|
||||
buf[i++] = c;
|
||||
} while (c != '\n' && c != '\r' && c);
|
||||
if (c == '\r' && avio_r8(s) != '\n')
|
||||
if (c == '\r' && avio_r8(s) != '\n' && !avio_feof(s))
|
||||
avio_skip(s, -1);
|
||||
|
||||
buf[i] = 0;
|
||||
|
|
Loading…
Reference in New Issue