cvs: php-src(PHP_5_3) /ext/posix posix.c

From: Date: Fri, 11 Apr 2008 11:00:03 +0000
Subject: cvs: php-src(PHP_5_3) /ext/posix posix.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-49585@lists.php.net to get a copy of this message
tony2001 Fri Apr 11 11:00:03 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/posix posix.c Log: MFH: fix 2 segfaults in ZTS mode http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.16.2.3&r2=1.70.2.3.2.16.2.4&diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.16.2.3 php-src/ext/posix/posix.c:1.70.2.3.2.16.2.4 --- php-src/ext/posix/posix.c:1.70.2.3.2.16.2.3 Mon Mar 10 22:12:35 2008 +++ php-src/ext/posix/posix.c Fri Apr 11 11:00:03 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: posix.c,v 1.70.2.3.2.16.2.3 2008/03/10 22:12:35 felipe Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.16.2.4 2008/04/11 11:00:03 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -147,7 +147,7 @@ static PHP_MINFO_FUNCTION(posix) { php_info_print_table_start(); - php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.16.2.3 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.16.2.4 $"); php_info_print_table_end(); } /* }}} */ @@ -875,7 +875,7 @@ #if defined(ZTS) && defined(HAVE_GETGRGID_R) && defined(_SC_GETGR_R_SIZE_MAX) int ret; struct group _g; - struct group *retgrptr; + struct group *retgrptr = NULL; long grbuflen; char *grbuf; #endif @@ -894,7 +894,7 @@ grbuf = emalloc(grbuflen); ret = getgrgid_r(gid, &_g, grbuf, grbuflen, &retgrptr); - if (ret) { + if (ret || retgrptr == NULL) { POSIX_G(last_error) = ret; efree(grbuf); RETURN_FALSE; @@ -1009,7 +1009,7 @@ pwbuf = emalloc(pwbuflen); ret = getpwuid_r(uid, &_pw, pwbuf, pwbuflen, &retpwptr); - if (ret) { + if (ret || retpwptr == NULL) { POSIX_G(last_error) = ret; efree(pwbuf); RETURN_FALSE;

« previous php.cvs (#49585) next »