提交 e73325b9 编写于 作者: P Paul B Mahol

avcodec/xpmdec: skip everything before signature

Signed-off-by: NPaul B Mahol <onemda@gmail.com>
上级 01b069c1
......@@ -309,7 +309,10 @@ static int xpm_decode_frame(AVCodecContext *avctx, void *data,
avctx->pix_fmt = AV_PIX_FMT_BGRA;
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");
return AVERROR_INVALIDDATA;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册