[packages/php/PHP_5_2] - rel 29; crypt() can return NULL; handle that

arekm arekm at pld-linux.org
Mon Mar 25 17:30:24 CET 2013


commit 505c9c7df7834baa524b24a9a90465b6f5d1df2c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 25 17:30:22 2013 +0100

    - rel 29; crypt() can return NULL; handle that

 php-crypt-null.patch | 16 ++++++++++++++++
 php.spec             |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/php.spec b/php.spec
index 7f72343..4cbc1c6 100644
--- a/php.spec
+++ b/php.spec
@@ -120,7 +120,7 @@ Summary(ru.UTF-8):	PHP Версии 5 - язык препроцессирова
 Summary(uk.UTF-8):	PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:		%{orgname}%{php_suffix}
 Version:	5.2.17
-Release:	28
+Release:	29
 Epoch:		4
 License:	PHP
 Group:		Libraries
@@ -293,6 +293,7 @@ Patch374:	php-5.2.17-bug-55478.patch
 Patch375:	php-5.2.17-bug-319457.patch
 # Bug-55776 CVE-2012-0788
 Patch376:	php-5.2.17-bug-55776.patch
+Patch377:	php-crypt-null.patch
 
 #php-5.2-max-input-vars patch
 Patch400:	php-5.2.17-max-input-vars.patch
@@ -2077,6 +2078,7 @@ done
 %patch374 -p1 -b .bug-55478
 %patch375 -p1 -b .bug-319457
 %patch376 -p1 -b .bug-55776
+%patch377 -p1
 
 %patch400 -p1 -b .php-5.2-max-input-vars
 %patch401 -p1 -b .bug-323007
diff --git a/php-crypt-null.patch b/php-crypt-null.patch
new file mode 100644
index 0000000..ee02006
--- /dev/null
+++ b/php-crypt-null.patch
@@ -0,0 +1,16 @@
+--- php-5.2.17/ext/standard/crypt.c~	2013-03-25 17:26:27.000000000 +0100
++++ php-5.2.17/ext/standard/crypt.c	2013-03-25 17:27:42.866436012 +0100
+@@ -163,7 +163,12 @@
+ 		RETURN_STRING(crypt_r(str, salt, &buffer), 1);
+ 	}
+ #else
+-	RETURN_STRING(crypt(str, salt), 1);
++	crypt_res = crypt(str, salt);
++	if (!crypt_res) {
++		RETURN_FALSE;
++	} else {
++		RETURN_STRING(crypt_res, 1);
++	}
+ #endif
+ }
+ /* }}} */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/505c9c7df7834baa524b24a9a90465b6f5d1df2c



More information about the pld-cvs-commit mailing list