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

Jean-Baptiste Kempf git at videolan.org
Sat Feb 12 21:57:11 CET 2011


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Feb 12 21:56:44 2011 +0100| [fe44129dc6509b3347113ab0e1a0524af1e0dd11] | committer: Jean-Baptiste Kempf

Consider too large width/height as invalid.

Idea taken from ebced314439f16e0d4dd8406ed0488f1677fa65f in master

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index a6225bb..edf7d23 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -297,7 +297,7 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
     char *psz_parser;
     char *psz_name;
 
-    if( i_width <= 0 || i_height <= 0 )
+    if( i_width <= 0 || i_height <= 0 || i_width > 8192 || i_height > 8192 )
         return NULL;
 
     vlc_ureduce( &p_fmt->i_sar_num, &p_fmt->i_sar_den,



More information about the vlc-commits mailing list