projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
892d7e7
)
Improve dxa probe by checking the values for width and height are reasonable.
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Thu, 17 Sep 2009 18:08:07 +0000
(18:08 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Thu, 17 Sep 2009 18:08:07 +0000
(18:08 +0000)
Originally committed as revision 19897 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/dxa.c
patch
|
blob
|
history
diff --git
a/libavformat/dxa.c
b/libavformat/dxa.c
index
5b6cd67
..
a68d4c4
100644
(file)
--- a/
libavformat/dxa.c
+++ b/
libavformat/dxa.c
@@
-36,9
+36,15
@@
typedef struct{
static int dxa_probe(AVProbeData *p)
{
+ int w, h;
+ if (p->buf_size < 15)
+ return 0;
+ w = AV_RB16(p->buf + 11);
+ h = AV_RB16(p->buf + 13);
/* check file header */
if (p->buf[0] == 'D' && p->buf[1] == 'E' &&
- p->buf[2] == 'X' && p->buf[3] == 'A')
+ p->buf[2] == 'X' && p->buf[3] == 'A' &&
+ w && w <= 2048 && h && h <= 2048)
return AVPROBE_SCORE_MAX;
else
return 0;