vlc | branch: master | Zinuo Han <[email protected]> | Mon Apr  1 11:57:35 
2019 +0200| [f8c682365bf529879e61df449f19008a4c160ba5] | committer: Hugo 
Beauzée-Luyssen

ps: Fix off by one

https://hackerone.com/reports/504469

Signed-off-by: Hugo Beauzée-Luyssen <[email protected]>

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

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

diff --git a/modules/demux/mpeg/ps.h b/modules/demux/mpeg/ps.h
index 845111e09a..cfa389e68b 100644
--- a/modules/demux/mpeg/ps.h
+++ b/modules/demux/mpeg/ps.h
@@ -320,7 +320,7 @@ static inline int ps_pkt_id( block_t *p_pkt )
     {
         uint8_t i_sub_id = 0;
         if( p_pkt->i_buffer >= 9 &&
-            p_pkt->i_buffer >= 9 + (size_t)p_pkt->p_buffer[8] )
+            p_pkt->i_buffer > 9 + (size_t)p_pkt->p_buffer[8] )
         {
             const unsigned i_start = 9 + p_pkt->p_buffer[8];
             i_sub_id = p_pkt->p_buffer[i_start];

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

Reply via email to