Skip to content
Snippets Groups Projects
Commit de2d5605 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

ps: Fix read buffer overflow

https://hackerone.com/reports/504484
parent 2e7d1075
No related branches found
No related tags found
No related merge requests found
......@@ -623,7 +623,10 @@ static inline int ps_psm_fill( ps_psm_t *p_psm, block_t *p_pkt,
int i_version;
bool b_single_extension;
if( !p_psm || p_buffer[3] != PS_STREAM_ID_MAP )
// Demux() checks that we have at least 4 bytes, but we need
// at least 10 to read up to the info_length field
assert(i_buffer >= 4);
if( !p_psm || i_buffer < 10 || p_buffer[3] != PS_STREAM_ID_MAP)
return VLC_EGENERIC;
i_length = GetWBE(&p_buffer[4]) + 6;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment