OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01b069c
)
avcodec/xpmdec: skip everything before signature
author
Paul B Mahol
<onemda@gmail.com>
Sun, 12 Mar 2017 14:07:02 +0000
(15:07 +0100)
committer
Paul B Mahol
<onemda@gmail.com>
Sun, 12 Mar 2017 17:24:49 +0000
(18:24 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/xpmdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/xpmdec.c
b/libavcodec/xpmdec.c
index
8d5bc76
..
6cd7bde
100644
(file)
--- a/
libavcodec/xpmdec.c
+++ b/
libavcodec/xpmdec.c
@@
-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;
}