[vlc-commits] nsc: Fix potential integer overflow

Hugo Beauzée-Luyssen git at videolan.org
Thu May 23 17:40:34 CEST 2019


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Mar 22 18:29:40 2019 +0100| [10aa791068a39acc905ce25b3c13aad48d5c465c] | committer: Hugo Beauzée-Luyssen

nsc: Fix potential integer overflow

https://hackerone.com/reports/513470

(cherry picked from commit 30e0a2fd82cb53b18fae620e5e4ca3dea03fabe1)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/demux/nsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/nsc.c b/modules/demux/nsc.c
index 068bb4f825..ba144816b3 100644
--- a/modules/demux/nsc.c
+++ b/modules/demux/nsc.c
@@ -197,7 +197,7 @@ static char *nscdec( vlc_object_t *p_demux, char* p_encoded )
             msg_Err( p_demux, "load_byte failed" );
             return NULL;
         }
-        length |= tmp << ((i - 1) * 8);
+        length |= (unsigned int)tmp << ((i - 1) * 8);
     }
 
     if( length == 0 )



More information about the vlc-commits mailing list