[vlc-commits] dvbsub: Don't use potentially uninitialized depth to fill a region

Hugo Beauzée-Luyssen git at videolan.org
Fri Feb 3 12:51:51 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jan 31 15:16:31 2017 +0100| [870ffcb2fc2dc1dbc766f62f2be2a7d473320efb] | committer: Hugo Beauzée-Luyssen

dvbsub: Don't use potentially uninitialized depth to fill a region

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

 modules/codec/dvbsub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/dvbsub.c b/modules/codec/dvbsub.c
index 040c06f..85b8a6d 100644
--- a/modules/codec/dvbsub.c
+++ b/modules/codec/dvbsub.c
@@ -953,8 +953,8 @@ static void decode_region_composition( decoder_t *p_dec, bs_t *s )
     /* Erase background of region */
     if( b_fill )
     {
-        int i_background = ( p_region->i_depth == 1 ) ? i_2_bg :
-            ( ( p_region->i_depth == 2 ) ? i_4_bg : i_8_bg );
+        int i_background = ( i_depth == 1 ) ? i_2_bg :
+            ( ( i_depth == 2 ) ? i_4_bg : i_8_bg );
         memset( p_region->p_pixbuf, i_background, i_width * i_height );
     }
 



More information about the vlc-commits mailing list