[libunwind] [libunwind] remove unnecessary strcpy dependency (PR #72043)
Michael Kenzel via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 11 19:00:08 PST 2023
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72043
>From c423c5bd51bd7aa093025b2892706b1968eba09d Mon Sep 17 00:00:00 2001
From: Michael Kenzel <michael.kenzel at gmail.com>
Date: Sun, 12 Nov 2023 02:46:15 +0100
Subject: [PATCH] [libunwind] Remove unnecessary strcpy dependency
---
libunwind/src/UnwindLevel1-gcc-ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libunwind/src/UnwindLevel1-gcc-ext.c b/libunwind/src/UnwindLevel1-gcc-ext.c
index d343f4e6e9cc837..32c872ffade1fd0 100644
--- a/libunwind/src/UnwindLevel1-gcc-ext.c
+++ b/libunwind/src/UnwindLevel1-gcc-ext.c
@@ -143,7 +143,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
// Create a mock exception object for force unwinding.
_Unwind_Exception ex;
memset(&ex, '\0', sizeof(ex));
- strcpy((char *)&ex.exception_class, "CLNGUNW");
+ memcpy(&ex.exception_class, "CLNGUNW", sizeof(ex.exception_class));
#endif
// walk each frame
More information about the cfe-commits
mailing list