Skip to content
Snippets Groups Projects
Commit e73325b9 authored by Paul B Mahol's avatar Paul B Mahol
Browse files

avcodec/xpmdec: skip everything before signature


Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent 01b069c1
No related branches found
No related tags found
No related merge requests found
...@@ -309,7 +309,10 @@ static int xpm_decode_frame(AVCodecContext *avctx, void *data, ...@@ -309,7 +309,10 @@ static int xpm_decode_frame(AVCodecContext *avctx, void *data,
avctx->pix_fmt = AV_PIX_FMT_BGRA; avctx->pix_fmt = AV_PIX_FMT_BGRA;
end = avpkt->data + avpkt->size; end = avpkt->data + avpkt->size;
if (memcmp(ptr, "/* XPM */", 9)) { while (memcmp(ptr, "/* XPM */\n", 10) && ptr < end - 10)
ptr++;
if (ptr >= end) {
av_log(avctx, AV_LOG_ERROR, "missing signature\n"); av_log(avctx, AV_LOG_ERROR, "missing signature\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment