Commit 9bb9360e authored by Tristan Matthews's avatar Tristan Matthews Committed by Jean-Baptiste Kempf

mux: ogg: fix pointer arithmetic (cid #1048982)

Extra header is stored at &ogg_header + (1 * sizeof(ogg_header)),
not &ogg_header + (sizeof(ogg_header) * sizeof(ogg_header)).

(cherry picked from commit 9a220019c9865f3d7db2c7601d2930632b7c593e)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 359eb52a
...@@ -908,7 +908,7 @@ static int32_t OggFillDsHeader( uint8_t *p_buffer, oggds_header_t *p_oggds_heade ...@@ -908,7 +908,7 @@ static int32_t OggFillDsHeader( uint8_t *p_buffer, oggds_header_t *p_oggds_heade
/* extra header */ /* extra header */
if( p_oggds_header->i_size > 0 ) if( p_oggds_header->i_size > 0 )
{ {
memcpy( &p_buffer[index], p_oggds_header + sizeof(*p_oggds_header), p_oggds_header->i_size ); memcpy( &p_buffer[index], (uint8_t *) p_oggds_header + sizeof(*p_oggds_header), p_oggds_header->i_size );
index += p_oggds_header->i_size; index += p_oggds_header->i_size;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment