From: Tim Kientzle Date: Mon, 22 Dec 2008 21:00:05 +0000 (-0500) Subject: If conversion from UTF8 fails, don't mark Unicode as available. X-Git-Tag: v2.6.0~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84c60068052b7a3614ea9c4bf911e1999296a912;p=thirdparty%2Flibarchive.git If conversion from UTF8 fails, don't mark Unicode as available. Submitted by: Michihiro NAKAJIMA SVN-Revision: 279 --- diff --git a/libarchive/archive_entry.c b/libarchive/archive_entry.c index 364c7c6ff..f406348cf 100644 --- a/libarchive/archive_entry.c +++ b/libarchive/archive_entry.c @@ -239,7 +239,8 @@ aes_get_wcs(struct aes *aes) if (aes->aes_set & AES_SET_UTF8) { /* Try converting UTF8 to WCS. */ aes->aes_wcs = __archive_string_utf8_w(&(aes->aes_utf8)); - aes->aes_set |= AES_SET_WCS; + if (aes->aes_wcs != NULL) + aes->aes_set |= AES_SET_WCS; return (aes->aes_wcs); } return (NULL);