svn commit: r186422 - head/lib/libarchive

Tim Kientzle kientzle at FreeBSD.org
Tue Dec 23 05:01:43 UTC 2008


Author: kientzle
Date: Tue Dec 23 05:01:43 2008
New Revision: 186422
URL: http://svn.freebsd.org/changeset/base/186422

Log:
  If conversion from UTF8 fails, don't mark Unicode text as available.
  
  Submitted by:	Michihiro NAKAJIMA
  MFC after:	30 days

Modified:
  head/lib/libarchive/archive_entry.c

Modified: head/lib/libarchive/archive_entry.c
==============================================================================
--- head/lib/libarchive/archive_entry.c	Tue Dec 23 05:00:00 2008	(r186421)
+++ head/lib/libarchive/archive_entry.c	Tue Dec 23 05:01:43 2008	(r186422)
@@ -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);


More information about the svn-src-all mailing list