#18751 [Opn->Csd]: calling 'bind_textdomain_codeset' may crash php4/httpd
| From: | yohgaki@php.net | Date: | Wed, 07 Aug 2002 11:52:35 +0000 |
| Subject: | #18751 [Opn->Csd]: calling 'bind_textdomain_codeset' may crash php4/httpd | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16149@lists.php.net to get a copy of this message | ||
ID: 18751
Updated by: yohgaki@php.net
Reported By: kilbi@rad.rwth-aachen.de
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: NetBSD 1.6*
PHP Version: 4.2.2
New Comment:
Thanks. Patch applied.
Previous Comments:
------------------------------------------------------------------------
[2002-08-06 06:24:24] kilbi@rad.rwth-aachen.de
In my case (NetBSD 1.6*) the system function 'bind_textdomain_codeset'
is not yet implemented (== returns NULL always), but present. This
causes a segmentation fault in every case php4's pendent function is
called.
Fix: Something like the following would generally prevent running in
this NULL pointer trouble:
--- gettext.c~ Sat Dec 15 15:22:59 2001
+++ gettext.c Tue Aug 6 11:59:25 2002
@@ -291,7 +291,9 @@
retval = bind_textdomain_codeset(Z_STRVAL_PP(domain),
Z_STRVAL_PP(codeset));
- RETURN_STRING(retval, 1);
+ if (retval) {
+ RETURN_STRING(retval, 1);
+ }
}
}
/* }}} */
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18751&edit=1