avcodec/xpmdec: there are XPM files with dos line endings
authorPaul B Mahol <onemda@gmail.com>
Sun, 12 Mar 2017 22:13:26 +0000 (23:13 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 13 Mar 2017 19:40:41 +0000 (20:40 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/xpmdec.c

index 605a09d..3c025a6 100644 (file)
@@ -307,7 +307,7 @@ static int xpm_decode_frame(AVCodecContext *avctx, void *data,
     avctx->pix_fmt = AV_PIX_FMT_BGRA;
 
     end = avpkt->data + avpkt->size;
-    while (memcmp(ptr, "/* XPM */\n", 10) && ptr < end - 10)
+    while (memcmp(ptr, "/* XPM */", 9) && ptr < end - 9)
         ptr++;
 
     if (ptr >= end) {