Bug #81693 [Ver->Csd]: mb_check_encoding does not return a value but quits php
| From: | cmb@php.net | Date: | Sat, 04 Dec 2021 10:45:53 +0000 |
| Subject: | Bug #81693 [Ver->Csd]: mb_check_encoding does not return a value but quits php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-238162@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81693&edit=1
ID: 81693
Updated by: cmb@php.net
Reported by: richardbrinkman at hotmail dot com
Summary: mb_check_encoding does not return a value but quits
php
-Status: Verified
+Status: Closed
Type: Bug
Package: mbstring related
Operating System: Debian (php:8.1-apache docker)
PHP Version: 8.1.0
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Fixed per <https://github.com/php/php-src/commit/929d847152ce6cdfd20d753ce8fdd47c97916c94>.
Previous Comments:
------------------------------------------------------------------------
[2021-12-03 17:44:51] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #81693: mb_check_encoding(7bit) segfaults
On GitHub: https://github.com/php/php-src/pull/7712
Patch: https://github.com/php/php-src/pull/7712.patch
------------------------------------------------------------------------
[2021-12-03 14:27:54] richardbrinkman at hotmail dot com
Description:
------------
Write a file test.php with the content of the attached test script:
Run this script with "php test.php" results in:
Segmentation fault (core dumped)
I use the php:apache Docker image.
If I run the same script with the php:8.0-apache Docker image then it will return the correct:
bool(true)
Both docker images install mbstring with:
docker-php-ext-install mbstring
Test script:
---------------
<?php
var_dump(mb_check_encoding('Hello world', '7bit'));
?>
Expected result:
----------------
bool(true)
Actual result:
--------------
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81693&edit=1