From: Tom Hughes Date: Fri, 12 Aug 2005 19:21:29 +0000 (+0000) Subject: Make sure we have enough space for the name if the path is empty. Patch X-Git-Tag: svn/VALGRIND_3_1_0~629 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9631a40eb7b368ef0232f18120d73ac6a76b884f;p=thirdparty%2Fvalgrind.git Make sure we have enough space for the name if the path is empty. Patch from Jakub Jelinek to fix bug #110656. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4386 --- diff --git a/coregrind/m_main.c b/coregrind/m_main.c index feae430dfc..93f34abf27 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -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')