commit | a0bd68f92df5417151c816f2c10bf33c3618ed2b | [log] [tgz] |
---|---|---|
author | Evgenii Stepanov <eugenis@google.com> | Wed Jan 27 13:07:37 2021 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Jan 28 12:31:47 2021 -0800 |
tree | 7b312dc7143c52129788c263152388fc5033d26c | |
parent | 0c17e874168cc266af656759d42caf961a4ab6a4 [diff] |
[sanitizer] Fix crash on empty strings. Patch by Vyacheslav Chigrin. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D95431 GitOrigin-RevId: 262c50856a377371cbea673419143ae45c590b7e
diff --git a/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp b/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp index 710da4c..98418b4 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp +++ b/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
@@ -356,7 +356,7 @@ InternalFree(info->function); info->function = 0; } - if (0 == internal_strcmp(info->file, "??")) { + if (info->file && 0 == internal_strcmp(info->file, "??")) { InternalFree(info->file); info->file = 0; }