From d8347e1b414fc05425fac84dbd0c8f1b66d017c9 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 30 May 2018 15:11:18 -0700 Subject: scan: fix crash due to last commit check codec_name and profile_name for NULL before strstr search. --- libhb/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libhb') diff --git a/libhb/scan.c b/libhb/scan.c index 8c35ddbe8..6708516bd 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -1243,7 +1243,8 @@ static void LookForAudio(hb_scan_t *scan, hb_title_t * title, hb_buffer_t * b) codec_name = codec->name; break; } - if (strstr(profile_name, codec_name) != NULL) + if (profile_name != NULL && codec_name != NULL && + strstr(profile_name, codec_name) != NULL) { codec_name = NULL; } -- cgit v1.2.3