[vlc-commits] nsc: Fix potential integer overflow

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


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

nsc: Fix potential integer overflow

https://hackerone.com/reports/513470

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

 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 da84899661..046ef63b95 100644
--- a/modules/demux/nsc.c
+++ b/modules/demux/nsc.c
@@ -196,7 +196,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