[vlc-commits] packetizer: hxxx: fix buffer read overflow
Francois Cartegnie
git at videolan.org
Sat Dec 19 15:48:36 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Dec 19 15:42:37 2015 +0100| [50387530cd8012b9a2ac9fe5b2c328349f2dc441] | committer: Francois Cartegnie
packetizer: hxxx: fix buffer read overflow
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50387530cd8012b9a2ac9fe5b2c328349f2dc441
---
modules/packetizer/hxxx_common.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/packetizer/hxxx_common.c b/modules/packetizer/hxxx_common.c
index 1a7a414..3d6fa67 100644
--- a/modules/packetizer/hxxx_common.c
+++ b/modules/packetizer/hxxx_common.c
@@ -51,6 +51,9 @@ block_t *PacketizeXXC1( decoder_t *p_dec, uint8_t i_nal_length_size,
int i_size = 0;
int i;
+ if( &p_block->p_buffer[p_block->i_buffer] - p < i_nal_length_size )
+ break;
+
for( i = 0; i < i_nal_length_size; i++ )
{
i_size = (i_size << 8) | (*p++);
More information about the vlc-commits
mailing list