================
@@ -672,7 +671,7 @@ inline bool LocalAddressSpace::findFunctionName(pint_t 
addr, char *buf,
   Dl_info dyldInfo;
   if (dladdr((void *)addr, &dyldInfo)) {
     if (dyldInfo.dli_sname != NULL) {
-      snprintf(buf, bufLen, "%s", dyldInfo.dli_sname);
+      strncpy(buf, dyldInfo.dli_sname, bufLen);
----------------
arichardson wrote:

This will always write up to 512 '\0' bytes. maybe best to use memcpy+strlen 
instead? 

https://github.com/llvm/llvm-project/pull/72040
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to