[vlc-commits] xiph: Fix potential buffer overflow

Zinuo Han git at videolan.org
Thu May 23 17:20:57 CEST 2019


vlc | branch: master | Zinuo Han <ele7enxxh at gmail.com> | Thu Feb 28 15:46:04 2019 +0100| [716d533181e8cc15085b30d265a76a9273228759] | committer: Hugo Beauzée-Luyssen

xiph: Fix potential buffer overflow

https://hackerone.com/reports/502579

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

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

diff --git a/modules/demux/xiph.h b/modules/demux/xiph.h
index 338cb47758..549e0ef276 100644
--- a/modules/demux/xiph.h
+++ b/modules/demux/xiph.h
@@ -44,7 +44,7 @@ static inline unsigned int xiph_CountHeaders( const void *extra, unsigned int i_
         {
             uint16_t i_size = GetWBE( extra );
             p_extra += 2 + i_size;
-            if ( overall_len > i_extra - i_size )
+            if ( i_extra < i_size || overall_len > i_extra - i_size )
                 return 0;
             overall_len += i_size;
         }



More information about the vlc-commits mailing list