From: Flole Date: Sat, 22 Jun 2024 20:26:45 +0000 (+0200) Subject: Fix potential null-pointer dereference in muxer_mkv.c X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd6bfbb0bb45e7a22690f3d82183125f2b105cfd;p=thirdparty%2Ftvheadend.git Fix potential null-pointer dereference in muxer_mkv.c --- diff --git a/src/muxer/muxer_mkv.c b/src/muxer/muxer_mkv.c index a38d15af5..0acabf29c 100644 --- a/src/muxer/muxer_mkv.c +++ b/src/muxer/muxer_mkv.c @@ -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",