From owner-svn-src-all@freebsd.org Sun Jul 3 15:00:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C0CDB90D93; Sun, 3 Jul 2016 15:00:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F02B226C; Sun, 3 Jul 2016 15:00:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u63F0CGa099784; Sun, 3 Jul 2016 15:00:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u63F0Cr8099783; Sun, 3 Jul 2016 15:00:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607031500.u63F0Cr8099783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 3 Jul 2016 15:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302324 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2016 15:00:13 -0000 Author: bapt Date: Sun Jul 3 15:00:12 2016 New Revision: 302324 URL: https://svnweb.freebsd.org/changeset/base/302324 Log: Fix a bad test resulting in a segfault with ISO-8859-5 locales Reported by: Lauri Tirkkonen from Illumos Approved by: re@ (gjb) Modified: head/lib/libc/locale/collate.c Modified: head/lib/libc/locale/collate.c ============================================================================== --- head/lib/libc/locale/collate.c Sun Jul 3 11:45:54 2016 (r302323) +++ head/lib/libc/locale/collate.c Sun Jul 3 15:00:12 2016 (r302324) @@ -310,7 +310,7 @@ _collate_lookup(struct xlocale_collate * if ((sptr = *state) != NULL) { *pri = *sptr; sptr++; - if ((sptr == *state) || (sptr == NULL)) + if ((sptr == *state) || (*sptr == 0)) *state = NULL; else *state = sptr;