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:
20769d9
)
avformat/electronicarts: check chunksize more completely in probe()
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 11 Nov 2013 18:53:22 +0000
(19:53 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 11 Nov 2013 20:31:56 +0000
(21:31 +0100)
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/electronicarts.c
patch
|
blob
|
history
diff --git
a/libavformat/electronicarts.c
b/libavformat/electronicarts.c
index
3694a02
..
dd8cf5d
100644
(file)
--- a/
libavformat/electronicarts.c
+++ b/
libavformat/electronicarts.c
@@
-440,6
+440,8
@@
static int process_ea_header(AVFormatContext *s)
static int ea_probe(AVProbeData *p)
{
+ unsigned big_endian, size;
+
switch (AV_RL32(&p->buf[0])) {
case ISNh_TAG:
case SCHl_TAG:
@@
-454,7
+456,11
@@
static int ea_probe(AVProbeData *p)
default:
return 0;
}
- if (AV_RL32(&p->buf[4]) > 0xfffff && AV_RB32(&p->buf[4]) > 0xfffff)
+ size = AV_RL32(&p->buf[4]);
+ big_endian = size > 0x000FFFFF;
+ if (big_endian)
+ size = av_bswap32(size);
+ if (size > 0xfffff || size < 8)
return 0;
return AVPROBE_SCORE_MAX;