[vlc-commits] ps: Fix off by one
Zinuo Han
git at videolan.org
Thu May 23 17:40:36 CEST 2019
vlc/vlc-3.0 | branch: master | Zinuo Han <ele7enxxh at gmail.com> | Mon Apr 1 11:57:35 2019 +0200| [fc5264253daed194d98523810877c7ecd27b9de7] | 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>
(cherry picked from commit f8c682365bf529879e61df449f19008a4c160ba5)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=fc5264253daed194d98523810877c7ecd27b9de7
---
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 c73309e9be..b577eb327a 100644
--- a/modules/demux/mpeg/ps.h
+++ b/modules/demux/mpeg/ps.h
@@ -322,7 +322,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