[vlc-devel] [PATCH 1/2] mux:pes: fix signed/unsigned overflow comparison

Steve Lhomme robux4 at videolabs.io
Wed Aug 30 17:06:02 CEST 2017


---
 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 */
-- 
2.12.1



More information about the vlc-devel mailing list