From: John Stebbins Date: Wed, 30 May 2018 22:11:18 +0000 (-0700) Subject: scan: fix crash due to last commit X-Git-Tag: 1.2.0~421 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8347e1b414fc05425fac84dbd0c8f1b66d017c9;p=handbrake scan: fix crash due to last commit check codec_name and profile_name for NULL before strstr search. --- 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; }