]> granicus.if.org Git - handbrake/commitdiff
scan: fix crash due to last commit
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 30 May 2018 22:11:18 +0000 (15:11 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 30 May 2018 22:11:18 +0000 (15:11 -0700)
check codec_name and profile_name for NULL before strstr search.

libhb/scan.c

index 8c35ddbe89ca042ec3c0bea6887849b0a0901c04..6708516bd5adb7676eaf304c9c16db87239981b3 100644 (file)
@@ -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;
             }