|
From: <sv...@va...> - 2014-10-08 14:33:54
|
Author: florian
Date: Wed Oct 8 15:33:43 2014
New Revision: 14612
Log:
Choose an initialsize of 500 for the launcher name. This should
be more than enough for the typical case.
Modified:
branches/BUF_REMOVAL/coregrind/launcher-linux.c
Modified: branches/BUF_REMOVAL/coregrind/launcher-linux.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/launcher-linux.c (original)
+++ branches/BUF_REMOVAL/coregrind/launcher-linux.c Wed Oct 8 15:33:43 2014
@@ -51,7 +51,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h> // PATH_MAX
#ifndef EM_X86_64
#define EM_X86_64 62 // elf.h doesn't define this on some older systems
@@ -394,7 +393,7 @@
char *buf = NULL;
while (42) {
- bufsiz += PATH_MAX;
+ bufsiz += 500;
buf = realloc(buf, bufsiz);
if (buf == NULL)
barf("realloc of buf failed.");
|