]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sure we have enough space for the name if the path is empty. Patch
authorTom Hughes <tom@compton.nu>
Fri, 12 Aug 2005 19:21:29 +0000 (19:21 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 12 Aug 2005 19:21:29 +0000 (19:21 +0000)
from Jakub Jelinek to fix bug #110656.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4386

coregrind/m_main.c

index feae430dfcd4ef9d1a3b345cf879b83df3550b5f..93f34abf278855b6e4e19ef9e53b5cf339a38a2d 100644 (file)
@@ -952,7 +952,7 @@ static Addr setup_client_stack(void* init_sp,
 static const char* executable_name;
 
 static Bool match_executable(const char *entry) {
-   char buf[strlen(entry) + strlen(executable_name) + 2];
+   char buf[strlen(entry) + strlen(executable_name) + 3];
 
    /* empty PATH element means . */
    if (*entry == '\0')