[vlc-commits] hds: avoid NULL dereference (cid #1261992)

Tristan Matthews git at videolan.org
Thu Jan 8 13:59:28 CET 2015


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Thu Jan  8 07:53:40 2015 -0500| [e6b5eab5aeb40b9757e44459a5de404201c0b914] | committer: Tristan Matthews

hds: avoid NULL dereference (cid #1261992)

metadata_packet_len > 0 is equivalent to
metadata_payload_len > 0 && p_metadata_payload

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e6b5eab5aeb40b9757e44459a5de404201c0b914
---

 modules/stream_filter/hds/hds.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index d84e5be..9a74b67 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -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;
 



More information about the vlc-commits mailing list