diff options
| author | Dmitry Vasilyev <dvassiliev@accesssoftek.com> | 2025-05-06 13:16:51 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-06 13:16:51 +0400 |
| commit | 0dce0ea31cc9fd1d3d082b233b16f9ed123a6ed4 (patch) | |
| tree | 9053c91756341713669c566b65b99e1cd65632d6 /libcxxabi | |
| parent | fd800487382e2ee3944493d58a961b6f48290243 (diff) | |
[ItaniumDemangle] Fix libcxxabi OutputBuffer::prepend for empty inputs (#138656)
See #138564 for details.
Diffstat (limited to 'libcxxabi')
| -rw-r--r-- | libcxxabi/src/demangle/Utility.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxxabi/src/demangle/Utility.h b/libcxxabi/src/demangle/Utility.h index 511983ad40f7..8829f3fa13a9 100644 --- a/libcxxabi/src/demangle/Utility.h +++ b/libcxxabi/src/demangle/Utility.h @@ -136,6 +136,8 @@ public: OutputBuffer &prepend(std::string_view R) { size_t Size = R.size(); + if (!Size) + return *this; grow(Size); std::memmove(Buffer + Size, Buffer, CurrentPosition); |
