vlc | branch: master | Steve Lhomme <[email protected]> | Wed Aug 30 17:06:02 
2017 +0200| [f90e35ca9c2bf451946a111e626b3c45fc461d87] | committer: 
Jean-Baptiste Kempf

mux:pes: fix signed/unsigned overflow comparison

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 modules/mux/mpeg/pes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/mpeg/pes.c b/modules/mux/mpeg/pes.c
index 4156f85946..b299241d85 100644
--- a/modules/mux/mpeg/pes.c
+++ b/modules/mux/mpeg/pes.c
@@ -367,7 +367,7 @@ void EStoPES ( block_t **pp_pes,
             offset++;
         }
         offset++;
-        if( offset <= p_es->i_buffer-4 &&
+        if( offset+4 <= p_es->i_buffer &&
             ((p_es->p_buffer[offset] & 0x1f) != 9) ) /* Not AUD */
         {
             /* Make similar AUD as libavformat does */

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to