]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Correct a wide character buffer size of MultiByteToWideChar() in
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 16 Dec 2009 12:44:48 +0000 (07:44 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 16 Dec 2009 12:44:48 +0000 (07:44 -0500)
__link().

SVN-Revision: 1746

libarchive/archive_windows.c

index 0af9b5baa7cb9f9263dce21f5812cda0a8b26b3a..241880aab20aaee90ece64770f1c1d7d6a5a80d5 100644 (file)
@@ -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;