From: Eric Biggers Date: Thu, 21 Mar 2013 18:54:21 +0000 (-0500) Subject: win32.c realpath(): Don't allocate extra byte X-Git-Tag: v1.3.1~11 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=55ddce6e1e34d0580be720a70c47482c9e55fbeb win32.c realpath(): Don't allocate extra byte --- diff --git a/src/win32.c b/src/win32.c index 6d3951f5..f094656a 100644 --- a/src/win32.c +++ b/src/win32.c @@ -1180,7 +1180,7 @@ realpath(const mbchar *path, mbchar *resolved_path) if (!ret) goto fail_win32; - resolved_path = MALLOC(ret + 1); + resolved_path = MALLOC(ret); if (!resolved_path) goto fail; ret = GetFullPathNameA(path, ret, resolved_path, NULL);