diff options
author | David Blaikie <dblaikie@gmail.com> | 2022-03-30 23:18:40 +0300 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2022-03-30 23:26:32 +0300 |
commit | 6f5ecd089f77e0da9af44bb7211ad1b11ea582d4 (patch) | |
tree | a4119e93b3bf49b8b0061f6ac4f4bfcab406349a /libcxxabi/src | |
parent | c31af7cfe3b923b30d8929159366c670348fa5d3 (diff) |
Demangle: Fix crash-on-invalid demangling of a module name with no underlying entity
Diffstat (limited to 'libcxxabi/src')
-rw-r--r-- | libcxxabi/src/demangle/ItaniumDemangle.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h index be2cf882bfc2..a434868ce1a5 100644 --- a/libcxxabi/src/demangle/ItaniumDemangle.h +++ b/libcxxabi/src/demangle/ItaniumDemangle.h @@ -2885,7 +2885,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseUnqualifiedName( Result = getDerived().parseOperatorName(State); } - if (Module) + if (Result != nullptr && Module != nullptr) Result = make<ModuleEntity>(Module, Result); if (Result != nullptr) Result = getDerived().parseAbiTags(Result); |