summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-12-23 05:01:43 +0000
committerkientzle <kientzle@FreeBSD.org>2008-12-23 05:01:43 +0000
commit76e4e96ff0e7b84feb093513c81644b78ffafee0 (patch)
tree0351c408537da08ea90e8d3853f2984ce9d31641 /lib/libarchive
parentb1dd8b93a3c29aefe2966f01dd867f0cdcf9d006 (diff)
downloadFreeBSD-src-76e4e96ff0e7b84feb093513c81644b78ffafee0.zip
FreeBSD-src-76e4e96ff0e7b84feb093513c81644b78ffafee0.tar.gz
If conversion from UTF8 fails, don't mark Unicode text as available.
Submitted by: Michihiro NAKAJIMA MFC after: 30 days
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive_entry.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c
index 28054a9..3e52b18 100644
--- a/lib/libarchive/archive_entry.c
+++ b/lib/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);
OpenPOWER on IntegriCloud