From: Arkadiusz Miśkiewicz Date: Mon, 25 Mar 2013 16:30:22 +0000 (+0100) Subject: - rel 29; crypt() can return NULL; handle that X-Git-Tag: auto/th/php52-5.2.17-29 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=505c9c7df7834baa524b24a9a90465b6f5d1df2c;p=packages%2Fphp.git - rel 29; crypt() can return NULL; handle that --- 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 + } + /* }}} */ 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