From e4c8dcc641b9cd3c7645b034b6f632e0965a059b Mon Sep 17 00:00:00 2001
From: Robin Watts <robin.watts@artifex.com>
Date: Sat, 16 Nov 2013 10:09:13 +0000
Subject: Increase allocation to include room for string terminator.

Thanks to 'tom' from irc for pointing this out.
---
 platform/x11/x11_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'platform/x11')

diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c
index 67763ea0..5b0266c5 100644
--- a/platform/x11/x11_main.c
+++ b/platform/x11/x11_main.c
@@ -317,7 +317,7 @@ void winreplacefile(char *source, char *target)
 
 void wincopyfile(char *source, char *target)
 {
-	char *buf = malloc(strlen(source)+strlen(target)+4);
+	char *buf = malloc(strlen(source)+strlen(target)+5);
 	if (buf)
 	{
 		sprintf(buf, "cp %s %s", source, target);
-- 
cgit v1.2.3