From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 05:01:43 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C39351065674; Tue, 23 Dec 2008 05:01:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B24288FC19; Tue, 23 Dec 2008 05:01:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN51h1r081613; Tue, 23 Dec 2008 05:01:43 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN51hrM081612; Tue, 23 Dec 2008 05:01:43 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812230501.mBN51hrM081612@svn.freebsd.org> From: Tim Kientzle Date: Tue, 23 Dec 2008 05:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186422 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 05:01:43 -0000 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);