From: Michihiro NAKAJIMA Date: Wed, 16 Dec 2009 12:44:48 +0000 (-0500) Subject: Correct a wide character buffer size of MultiByteToWideChar() in X-Git-Tag: v2.8.0~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5cfd27fb7fca31861c5f684f77e1f104802c2e6;p=thirdparty%2Flibarchive.git Correct a wide character buffer size of MultiByteToWideChar() in __link(). SVN-Revision: 1746 --- diff --git a/libarchive/archive_windows.c b/libarchive/archive_windows.c index 0af9b5baa..241880aab 100644 --- a/libarchive/archive_windows.c +++ b/libarchive/archive_windows.c @@ -325,7 +325,7 @@ __link(const char *src, const char *dst, int sym) /* Converting multi-byte src to wide-char src */ wlen = wcslen(wsrc); slen = strlen(src); - n = MultiByteToWideChar(CP_ACP, 0, src, slen, wsrc, slen); + n = MultiByteToWideChar(CP_ACP, 0, src, slen, wsrc, wlen); if (n == 0) { free (wnewsrc); retval = -1;