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:
2a976de
)
jvdec: Make sure there is enough data for the id string.
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 19 Apr 2012 19:43:15 +0000
(21:43 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 19 Apr 2012 19:43:15 +0000
(21:43 +0200)
Previously too little data could lead to a false detection.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/jvdec.c
patch
|
blob
|
history
diff --git
a/libavformat/jvdec.c
b/libavformat/jvdec.c
index
fbd4f1e
..
3977594
100644
(file)
--- a/
libavformat/jvdec.c
+++ b/
libavformat/jvdec.c
@@
-52,8
+52,8
@@
typedef struct {
static int read_probe(AVProbeData *pd)
{
- if (pd->buf[0] == 'J' && pd->buf[1] == 'V' &&
- !memcmp(pd->buf + 4, MAGIC,
FFMIN(strlen(MAGIC), pd->buf_size - 4
)))
+ if (pd->buf[0] == 'J' && pd->buf[1] == 'V' &&
strlen(MAGIC) <= pd->buf_size - 4 &&
+ !memcmp(pd->buf + 4, MAGIC,
strlen(MAGIC
)))
return AVPROBE_SCORE_MAX;
return 0;
}