|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81693 mb_check_encoding does not return a value but quits php
Submitted: 2021-12-03 14:27 UTC Modified: 2021-12-04 10:45 UTC
From: richardbrinkman at hotmail dot com Assigned: cmb (profile)
Status: Closed Package: mbstring related
PHP Version: 8.1.0 OS: Debian (php:8.1-apache docker)
Private report: No CVE-ID: None
 [2021-12-03 14:27 UTC] richardbrinkman at hotmail dot com
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:

Both docker images install mbstring with:
docker-php-ext-install mbstring

Test script:
    var_dump(mb_check_encoding('Hello world', '7bit'));

Expected result:

Actual result:
Segmentation fault (core dumped)


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-12-03 17:44 UTC]
The following pull request has been associated:

Patch Name: Fix #81693: mb_check_encoding(7bit) segfaults
On GitHub:
 [2021-12-03 17:45 UTC]
-Status: Open +Status: Verified
 [2021-12-04 10:45 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 23:01:31 2024 UTC