components/php-5_3/php-sapi/patches/061_php_6825797.patch
changeset 4987 6a82655eda42
parent 4986 90a869b3f47a
child 4988 4b69c7c7e09b
--- a/components/php-5_3/php-sapi/patches/061_php_6825797.patch	Fri Oct 16 07:42:27 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- php-5.3.10/ext/gettext/gettext.c_orig	Sun Jan  1 05:15:04 2012
-+++ php-5.3.10/ext/gettext/gettext.c	Wed Feb  8 11:25:26 2012
-@@ -117,6 +117,7 @@
- /* }}} */
- 
- #include <libintl.h>
-+#include <locale.h>
- 
- zend_module_entry php_gettext_module_entry = {
- 	STANDARD_MODULE_HEADER,
-@@ -344,7 +345,13 @@
- 	PHP_GETTEXT_LENGTH_CHECK("msgid1", msgid1_len)
- 	PHP_GETTEXT_LENGTH_CHECK("msgid2", msgid2_len)
- 
--	msgstr = dcngettext(domain, msgid1, msgid2, count, category);
-+	if (category > LC_ALL || category < 0) {
-+		/* if we pass higher value than LC_ALL glibc uses LC_ALL.
-+		If not set, this can lead to segfaults on non-gnu systems */
-+		msgstr = dngettext(domain, msgid1, msgid2, count);
-+	} else {
-+		msgstr = dcngettext(domain, msgid1, msgid2, count, category);
-+	}
- 
- 	if (msgstr) {
- 		RETVAL_STRING(msgstr, 1);