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:
3e01c9b
)
idf: Improve idf_probe() so it doesnt succeed on 0 byte input
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 00:38:02 +0000
(
02:38
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 00:38:02 +0000
(
02:38
+0200)
libavformat/bintext.c
patch
|
blob
|
history
diff --git
a/libavformat/bintext.c
b/libavformat/bintext.c
index
69c7ab5
..
e03a31e
100644
(file)
--- a/
libavformat/bintext.c
+++ b/
libavformat/bintext.c
@@
-261,7
+261,9
@@
static const uint8_t idf_magic[] = {
static int idf_probe(AVProbeData *p)
{
- if (!memcmp(p->buf, idf_magic, FFMIN(sizeof(idf_magic), p->buf_size)))
+ if (p->buf_size < sizeof(idf_magic))
+ return 0;
+ if (!memcmp(p->buf, idf_magic, sizeof(idf_magic)))
return AVPROBE_SCORE_MAX;
return 0;
}