]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD and Darwin: apply same fix as Bug 488026
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 5 Jun 2024 06:54:16 +0000 (08:54 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 5 Jun 2024 06:54:16 +0000 (08:54 +0200)
NEWS
coregrind/m_initimg/initimg-darwin.c
coregrind/m_initimg/initimg-freebsd.c

diff --git a/NEWS b/NEWS
index 290d6092860e8dfa1a0e8994f806cd0198f81120..92e669e311317aa6560bf05030a2b23b7715e6d3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
         'guest_IP_AT_SYSCALL'
 486293  memccpy false positives
 486569  linux inotify_init syscall wrapper missing POST entry in syscall_table
+488026  Use of `sizeof` instead of `strlen
 
 To see details of a given bug, visit
   https://bugs.kde.org/show_bug.cgi?id=XXXXXX
index 564d2fdaa7eaf4ba46d28289eed6f64105d3ae8a..7bac7dc0d18ce2145bc3051688a6e7589165059e 100644 (file)
@@ -134,7 +134,7 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname)
       paths.  We might not need the space for vgpreload_<tool>.so, but it
       doesn't hurt to over-allocate briefly.  The 16s are just cautious
       slop. */
-   Int preload_core_path_len = vglib_len + sizeof(preload_core) 
+   Int preload_core_path_len = vglib_len + VG_(strlen)(preload_core)
                                          + sizeof(VG_PLATFORM) + 16;
    Int preload_tool_path_len = vglib_len + VG_(strlen)(toolname) 
                                          + sizeof(VG_PLATFORM) + 16;
index 8c2c6b0e8e05303f2ec5006813fc537df1e83c0d..a78875ac28a32b207cd9dc0b5ae2f4055311756d 100644 (file)
@@ -145,7 +145,7 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname)
       paths.  We might not need the space for vgpreload_<tool>.so, but it
       doesn't hurt to over-allocate briefly.  The 16s are just cautious
       slop. */
-   Int preload_core_path_len = vglib_len + sizeof(preload_core)
+   Int preload_core_path_len = vglib_len + VG_(strlen)(preload_core)
                                + sizeof(VG_PLATFORM) + 16;
    Int preload_tool_path_len = vglib_len + VG_(strlen)(toolname)
                                + sizeof(VG_PLATFORM) + 16;