From 4578e694e6e9b561653bc43f3c6a74366f42dfec Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Tue, 23 Jun 2015 22:21:39 +0800 Subject: [PATCH] Bugfix - should be copy+converting from mbs to utf. Not mbs to mbs. --- libarchive/archive_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c index c8c87e0b3..f6d1b893b 100644 --- a/libarchive/archive_string.c +++ b/libarchive/archive_string.c @@ -3891,7 +3891,7 @@ archive_mstring_get_utf8(struct archive *a, struct archive_mstring *aes, sc = archive_string_conversion_to_charset(a, "UTF-8", 1); if (sc == NULL) return (-1);/* Couldn't allocate memory for sc. */ - r = archive_strncpy_l(&(aes->aes_mbs), aes->aes_mbs.s, + r = archive_strncpy_l(&(aes->aes_utf8), aes->aes_mbs.s, aes->aes_mbs.length, sc); if (a == NULL) free_sconv_object(sc); -- 2.47.2