[vlc-commits] ps: Fix off by one

Zinuo Han git at videolan.org
Thu May 23 17:21:10 CEST 2019


vlc | branch: master | Zinuo Han <ele7enxxh at gmail.com> | 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 <hugo at beauzee.fr>

> 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];



More information about the vlc-commits mailing list