|
From: <sv...@va...> - 2014-10-01 14:13:11
|
Author: florian
Date: Wed Oct 1 15:13:02 2014
New Revision: 14596
Log:
Fix an off-by-1 error in r14337.
Modified:
branches/BUF_REMOVAL/callgrind/dump.c
Modified: branches/BUF_REMOVAL/callgrind/dump.c
==============================================================================
--- branches/BUF_REMOVAL/callgrind/dump.c (original)
+++ branches/BUF_REMOVAL/callgrind/dump.c Wed Oct 1 15:13:02 2014
@@ -1521,9 +1521,8 @@
size += 1; // separator ' '
size += VG_(strlen)(arg);
}
- size += 1; // '\0'
- cmdbuf = CLG_MALLOC("cl.dump.ic.1", size);
+ cmdbuf = CLG_MALLOC("cl.dump.ic.1", size + 1); // +1 for '\0'
/* Pass #2: Build up the string */
size = VG_(sprintf)(cmdbuf, " %s", VG_(args_the_exename));
|