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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"