diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-03 19:05:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-03 19:05:56 +0100 |
commit | eac5c7b8377f3f0e8262ab44e5ccb2c7ed060cdd (patch) | |
tree | b3317dcb37ef50d8537949b14d4265e8071cb37d | |
parent | 868cec5874543a56e485b7a17018ce7d9ce89299 (diff) | |
download | ffmpeg-eac5c7b8377f3f0e8262ab44e5ccb2c7ed060cdd.tar.gz |
avformat/aviobuf: Fix infinite loop in ff_get_line()
Fixes ticket4152
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/aviobuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index da94a4afff..f374314fba 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -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; |