[vlc-commits] Consider too large width/height as invalid.

Laurent Aimar git at videolan.org
Sat Feb 12 20:05:47 CET 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 12 20:01:28 2011 +0100| [ebced314439f16e0d4dd8406ed0488f1677fa65f] | committer: Laurent Aimar

Consider too large width/height as invalid.

It will prevents issue with our code but also with external libraries.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ebced314439f16e0d4dd8406ed0488f1677fa65f
---

 src/video_output/video_output.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 17e3391..9c74e13 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -75,7 +75,8 @@ static void VoutDestructor(vlc_object_t *);
 static int VoutValidateFormat(video_format_t *dst,
                               const video_format_t *src)
 {
-    if (src->i_width <= 0 || src->i_height <= 0)
+    if (src->i_width <= 0  || src->i_width  > 8192 ||
+        src->i_height <= 0 || src->i_height > 8192)
         return VLC_EGENERIC;
     if (src->i_sar_num <= 0 || src->i_sar_den <= 0)
         return VLC_EGENERIC;



More information about the vlc-commits mailing list