freebsd-ports/security/munge/files/patch-src-munged-xgetgrent.c
Jason E. Hale b707e5a735 - Add upstream patch to fix CPU consumption and termination bug
http://code.google.com/p/munge/issues/detail?id=18
- Bump PORTREVISION since runtime behavior will change

While here:
- Trim Makefile header
- Remove indefinite article from COMMENT

PR:		ports/172856
Submitted by:	Loic Pefferkorn <loic-freebsd@loicp.eu>
Approved by:	maintainer
		makc, avilla (mentors, implicit)
Feature safe:	yes
2012-10-20 07:53:53 +00:00

11 lines
370 B
C

--- src/munged/xgetgrent.c.orig 2012-10-18 16:42:46.000000000 +0200
+++ src/munged/xgetgrent.c 2012-10-18 16:43:17.000000000 +0200
@@ -194,7 +194,7 @@
#if HAVE_GETGRENT_R_GNU
rv = getgrent_r (gr, buf, buflen, &gr_ptr);
- if (rv == ENOENT) {
+ if (((rv == ENOENT) || (rv == 0)) && (gr_ptr == NULL)) {
got_eof = 1;
}
else if (rv != 0) {