]> granicus.if.org Git - postgresql/commitdiff
Check for NULL return from getgrgid(), per Seth Hettich
authorBruce Momjian <bruce@momjian.us>
Mon, 29 Oct 2001 17:55:41 +0000 (17:55 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 29 Oct 2001 17:55:41 +0000 (17:55 +0000)
src/backend/utils/init/findbe.c

index 01770c7e66b7d0eadc830419aa5ce56e93c66161..675046e6aa421159466ce18d5342cc6350e0b8aa 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * 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)
                if (pwp->pw_gid == buf.st_gid)
                        ++in_grp;
                else if (pwp->pw_name &&
-                                (gp = getgrgid(buf.st_gid)))
+                                (gp = getgrgid(buf.st_gid)) != NULL)
                {
                        for (i = 0; gp->gr_mem[i]; ++i)
                        {