Commit e6b5eab5 authored by Tristan Matthews's avatar Tristan Matthews

hds: avoid NULL dereference (cid #1261992)

metadata_packet_len > 0 is equivalent to
metadata_payload_len > 0 && p_metadata_payload
parent 895f573f
......@@ -1273,7 +1273,7 @@ static size_t write_flv_header_and_metadata(
// FLV file header
memcpy( *pp_buffer, flv_header_bytes, FLV_FILE_HEADER_LEN );
if ( metadata_payload_len > 0 )
if ( metadata_packet_len > 0 )
{
uint8_t *p = *pp_buffer + FLV_FILE_HEADER_LEN;
......
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