diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-11-16 10:09:13 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-11-16 10:10:31 +0000 |
commit | e4c8dcc641b9cd3c7645b034b6f632e0965a059b (patch) | |
tree | 5f4b40a87bde3b76236b0fd2e5a21f9881cc9c82 /platform/x11 | |
parent | 5b61463377d8049cead03c0dd4b4fc76388bca9e (diff) | |
download | mupdf-e4c8dcc641b9cd3c7645b034b6f632e0965a059b.tar.xz |
Increase allocation to include room for string terminator.
Thanks to 'tom' from irc for pointing this out.
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/x11_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |