diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-12-23 05:01:43 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-12-23 05:01:43 +0000 |
commit | 76e4e96ff0e7b84feb093513c81644b78ffafee0 (patch) | |
tree | 0351c408537da08ea90e8d3853f2984ce9d31641 /lib | |
parent | b1dd8b93a3c29aefe2966f01dd867f0cdcf9d006 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libarchive/archive_entry.c | 3 |
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); |