]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
If conversion from UTF8 fails, don't mark Unicode as available.
authorTim Kientzle <kientzle@gmail.com>
Mon, 22 Dec 2008 21:00:05 +0000 (16:00 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 22 Dec 2008 21:00:05 +0000 (16:00 -0500)
Submitted by: Michihiro NAKAJIMA

SVN-Revision: 279

libarchive/archive_entry.c

index 364c7c6ff66711e34f62d442249588e38cc27e40..f406348cff5ed47d8bcde542d4fd797ce90082e3 100644 (file)
@@ -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);