php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #68861
Patch php_get_uid_by_name.patch revision 2015-01-20 13:07 UTC by lg at efficientip dot com

Patch php_get_uid_by_name.patch for Filesystem function related Bug #68861

Patch version 2015-01-20 13:07 UTC

Return to Bug #68861 | Download this patch
Patch Revisions:

Developer: lg@efficientip.com

diff -rupN php-5.6.3/ext/standard/filestat.c php-5.6.3.patched/ext/standard/filestat.c
--- php-5.6.3/ext/standard/filestat.c	2015-01-20 12:55:03.000000000 +0100
+++ php-5.6.3.patched/ext/standard/filestat.c	2015-01-20 12:48:12.000000000 +0100
@@ -531,6 +531,9 @@ PHPAPI uid_t php_get_uid_by_name(const c
 		long pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
 		char *pwbuf;
 
+		if (pwbuflen == -1) {
+			pwbuflen = 1024;
+		}
 		if (pwbuflen < 1) {
 			return FAILURE;
 		}
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC