From owner-svn-src-stable-10@freebsd.org Tue Aug 2 21:17:35 2016 Return-Path: Delivered-To: svn-src-stable-10@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 9E714BAD269; Tue, 2 Aug 2016 21:17:35 +0000 (UTC) (envelope-from markj@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 71142181E; Tue, 2 Aug 2016 21:17:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u72LHYBZ025880; Tue, 2 Aug 2016 21:17:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u72LHYII025879; Tue, 2 Aug 2016 21:17:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608022117.u72LHYII025879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Aug 2016 21:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303680 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 21:17:35 -0000 Author: markj Date: Tue Aug 2 21:17:34 2016 New Revision: 303680 URL: https://svnweb.freebsd.org/changeset/base/303680 Log: MFC r301710: Fix an infinite loop in setnetgrent(3) with NIS netgroups. Modified: stable/10/lib/libc/gen/getnetgrent.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/getnetgrent.c ============================================================================== --- stable/10/lib/libc/gen/getnetgrent.c Tue Aug 2 20:56:00 2016 (r303679) +++ stable/10/lib/libc/gen/getnetgrent.c Tue Aug 2 21:17:34 2016 (r303680) @@ -559,6 +559,10 @@ read_for_group(const char *group) continue; } } + if (strlen(result) == 0) { + free(result); + return (NULL); + } snprintf(line, LINSIZ, "%s %s", group, result); free(result); }