Date: Tue, 2 Aug 2016 21:17:59 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303681 - stable/9/lib/libc/gen Message-ID: <201608022117.u72LHxsR025937@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Tue Aug 2 21:17:59 2016 New Revision: 303681 URL: https://svnweb.freebsd.org/changeset/base/303681 Log: MFC r301710: Fix an infinite loop in setnetgrent(3) with NIS netgroups. Modified: stable/9/lib/libc/gen/getnetgrent.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/getnetgrent.c ============================================================================== --- stable/9/lib/libc/gen/getnetgrent.c Tue Aug 2 21:17:34 2016 (r303680) +++ stable/9/lib/libc/gen/getnetgrent.c Tue Aug 2 21:17:59 2016 (r303681) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608022117.u72LHxsR025937>