Commit 40b1403a authored by Bruce Momjian's avatar Bruce Momjian

Check for NULL return from getgrgid(), per Seth Hettich

parent f2a2ad59
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.23 2001/10/21 03:43:54 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.24 2001/10/29 17:55:41 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -103,7 +103,7 @@ ValidateBinary(char *path) ...@@ -103,7 +103,7 @@ ValidateBinary(char *path)
if (pwp->pw_gid == buf.st_gid) if (pwp->pw_gid == buf.st_gid)
++in_grp; ++in_grp;
else if (pwp->pw_name && else if (pwp->pw_name &&
(gp = getgrgid(buf.st_gid))) (gp = getgrgid(buf.st_gid)) != NULL)
{ {
for (i = 0; gp->gr_mem[i]; ++i) for (i = 0; gp->gr_mem[i]; ++i)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment