summaryrefslogtreecommitdiffstats
path: root/libavformat/img2dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r--libavformat/img2dec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 62db0d9..f3f52c8 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -878,10 +878,14 @@ static int svg_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
const uint8_t *end = p->buf + p->buf_size;
+
if (memcmp(p->buf, "<?xml", 5))
return 0;
while (b < end) {
- b += ff_subtitles_next_line(b);
+ int inc = ff_subtitles_next_line(b);
+ if (!inc)
+ break;
+ b += inc;
if (b >= end - 4)
return 0;
if (!memcmp(b, "<svg", 4))
OpenPOWER on IntegriCloud