]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix potential null-pointer dereference in muxer_mkv.c
authorFlole <Flole998@users.noreply.github.com>
Sat, 22 Jun 2024 20:26:45 +0000 (22:26 +0200)
committerFlole <Flole998@users.noreply.github.com>
Sun, 23 Jun 2024 01:12:27 +0000 (03:12 +0200)
src/muxer/muxer_mkv.c

index a38d15af54dd7bf66015fd127475562fa650e9d2..0acabf29c04f94c287f5e67250b65369b38e2ad3 100644 (file)
@@ -784,8 +784,10 @@ _mk_build_metadata(const dvr_entry_t *de, const epg_broadcast_t *ebc,
   //https://www.matroska.org/technical/tagging.html
   //==> Depending on the COUNTRY it’s the format of the rating of a movie
   //==> (P, R, X in the USA, an age in other countries or a URI defining a logo).
-  tmp_age = ebc->age_rating;
-  addtag(q, build_tag_int("LAW_RATING", tmp_age, 0, NULL));
+  if(ebc) {
+    tmp_age = ebc->age_rating;
+    addtag(q, build_tag_int("LAW_RATING", tmp_age, 0, NULL));
+  }
 
   if(ch)
     addtag(q, build_tag_string("TVCHANNEL",