Bug #70542 [Fbk->NoF]: dcngettext test crash due to invalid "category" parameter
| From: | php-bugs at lists dot php dot net | Date: | Sun, 01 Nov 2015 04:22:20 +0000 |
| Subject: | Bug #70542 [Fbk->NoF]: dcngettext test crash due to invalid "category" parameter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196952@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70542&edit=1
ID: 70542
Updated by: php-bugs@lists.php.net
Reported by: rainer dot jung at kippdata dot de
Summary: dcngettext test crash due to invalid "category"
parameter
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Gettext related
Operating System: Solaris
PHP Version: 7.0.0RC3
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2015-10-24 05:26:53] kalle@php.net
The following patch has been added/updated:
Patch Name: bug70542
Revision: 1445664412
URL: https://bugs.php.net/patch-display.php?bug=70542&patch=bug70542&revision=1445664412
------------------------------------------------------------------------
[2015-10-24 05:24:00] kalle@php.net
Running some tests shows me that under Windows, $category with -1 is perfectly fine, meaning it
could most likely be a Solaris library port issue.
I have cooked up a patch, maybe you could give it a try (patched against git master) and see if it
works.
------------------------------------------------------------------------
[2015-10-24 05:01:41] kalle@php.net
I think we should fix this at the source itself, while also fixing the tests on the side. Since we
now know that the underlying library may segfault if we pass an unexpected value from the outside to
it, we may as well have a check before calling dcngettext() (or any other function using a $category
parameter in ext/gettext) to ensure its not possible to cause a crash.
------------------------------------------------------------------------
[2015-09-24 16:24:28] rainer dot jung at kippdata dot de
Confirmed, the patch works.
------------------------------------------------------------------------
[2015-09-24 13:51:17] rainer dot jung at kippdata dot de
I'll now attach a yet untested but suggested patch. First I started adding the LC_ constants to
gettext but then I noticed, that those constants already exist in core PHP, so the patch is just a
small change to the tests.
I currently run a fresh build and then will execute the full test suite and then report back,
whether the patch actually did work for me.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=70542
--
Edit this bug report at https://bugs.php.net/bug.php?id=70542&edit=1