[SCM] libav/experimental: Improve dxa probe by checking the values for width and height are reasonable.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:51:21 UTC 2013
The following commit has been merged in the experimental branch:
commit 3214db98ea1c71f6e6bb67adf077c695ac572692
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date: Thu Sep 17 18:08:07 2009 +0000
Improve dxa probe by checking the values for width and height are reasonable.
Originally committed as revision 19897 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index 5b6cd67..a68d4c4 100644
--- 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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list