Crash @ bmalloc::Environment::computeIsBmallocEnabled
[WebKit-https.git] / Source / bmalloc / bmalloc / Environment.cpp
index 2683b05..8522f0c 100644 (file)
@@ -78,7 +78,10 @@ static bool isASanEnabled()
 #if BOS(DARWIN)
     uint32_t imageCount = _dyld_image_count();
     for (uint32_t i = 0; i < imageCount; ++i) {
-        if (strstr(_dyld_get_image_name(i), "/libclang_rt.asan_"))
+        const char* imageName = _dyld_get_image_name(i);
+        if (!imageName)
+            continue;
+        if (strstr(imageName, "/libclang_rt.asan_"))
             return true;
     }
     return false;