Skip to content

Commit cd6bfbb

Browse files
committed
Fix potential null-pointer dereference in muxer_mkv.c
1 parent fd61453 commit cd6bfbb

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/muxer/muxer_mkv.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,10 @@ _mk_build_metadata(const dvr_entry_t *de, const epg_broadcast_t *ebc,
784784
//https://www.matroska.org/technical/tagging.html
785785
//==> Depending on the COUNTRY it’s the format of the rating of a movie
786786
//==> (P, R, X in the USA, an age in other countries or a URI defining a logo).
787-
tmp_age = ebc->age_rating;
788-
addtag(q, build_tag_int("LAW_RATING", tmp_age, 0, NULL));
787+
if(ebc) {
788+
tmp_age = ebc->age_rating;
789+
addtag(q, build_tag_int("LAW_RATING", tmp_age, 0, NULL));
790+
}
789791

790792
if(ch)
791793
addtag(q, build_tag_string("TVCHANNEL",

0 commit comments

Comments
 (0)