]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix 32207 [gprofng collect app] Error in parsing the -O option
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Wed, 25 Sep 2024 22:31:34 +0000 (15:31 -0700)
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Thu, 26 Sep 2024 18:33:29 +0000 (11:33 -0700)
gprofng/ChangeLog
2024-09-25  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR 32207
* src/collctrl.cc (preprocess_names): Fix the size in strndup.

gprofng/src/collctrl.cc

index d341cb00fcacc639fb78586a12ab6e8f15feff3a..2fa9a883147200cf45e2af6fdaa481c5eb4b2f78 100644 (file)
@@ -2422,7 +2422,7 @@ Coll_Ctrl::preprocess_names ()
     }
   else
     {
-      expt_dir = dbe_strndup (expt_name, s - expt_name - 1);
+      expt_dir = dbe_strndup (expt_name, s - expt_name);
       base_name = strdup (s + 1);
     }