]> git.sesse.net Git - vlc/commitdiff
hds: avoid NULL dereference (cid #1261992)
authorTristan Matthews <tmatth@videolan.org>
Thu, 8 Jan 2015 12:53:40 +0000 (07:53 -0500)
committerTristan Matthews <tmatth@videolan.org>
Thu, 8 Jan 2015 12:53:40 +0000 (07:53 -0500)
metadata_packet_len > 0 is equivalent to
metadata_payload_len > 0 && p_metadata_payload

modules/stream_filter/hds/hds.c

index d84e5be99d3ffe42ba65649ad242e8a2ce291e74..9a74b67b5944dc6fcf32a1439272d478b906f0b6 100644 (file)
@@ -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;