From a201afd3d2c4bef07e4e7682b129f60dbdde0e8a Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 10 Dec 2010 09:39:06 +0000 Subject: [PATCH] allocate enough room for the longer filename (addendum to #4512) --- rts/eventlog/EventLog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index 71b3484..fec34b9 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -174,7 +174,9 @@ initEventLogging(void) StgWord8 t, c; nat n_caps; - event_log_filename = stgMallocBytes(strlen(prog_name) + 10, + event_log_filename = stgMallocBytes(strlen(prog_name) + + 10 /* .%d */ + + 10 /* .eventlog */, "initEventLogging"); if (sizeof(EventDesc) / sizeof(char*) != NUM_EVENT_TAGS) { -- 1.7.10.4