[all-commits] [llvm/llvm-project] d1587c: [llvm] Fix string copy confusion
Nathan Sidwell via All-commits
all-commits at lists.llvm.org
Mon Mar 28 09:38:43 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d1587c38e6baba70b81d02c31641a17e568a9f5c
https://github.com/llvm/llvm-project/commit/d1587c38e6baba70b81d02c31641a17e568a9f5c
Author: Nathan Sidwell <nathan at acm.org>
Date: 2022-03-28 (Mon, 28 Mar 2022)
Changed paths:
M llvm/lib/Demangle/MicrosoftDemangle.cpp
Log Message:
-----------
[llvm] Fix string copy confusion
The microsoft demangler makes copies of the demangled strings, but has
some confusion between StringView representation (sans NUL), and
C-strings (with NUL). Here we also have a use of strcpy, which
happens to work because the incoming string view happens to have a
trailing NUL. But a simple memcpy excluding the NUL is sufficient.
Reviewed By: dblaikie, erichkeane
Differential Revision: https://reviews.llvm.org/D122391
More information about the All-commits
mailing list