Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault ext/gettext/gettext.c bindtextdomain() #17202

Closed
YuanchengJiang opened this issue Dec 17, 2024 · 2 comments
Closed

Segmentation fault ext/gettext/gettext.c bindtextdomain() #17202

YuanchengJiang opened this issue Dec 17, 2024 · 2 comments

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
$path = "\x00/bar_foo";
bindtextdomain($path,$fusion);

Resulted in this output:

/home/phpfuzz/WorkSpace/flowfusion/php-src/ext/gettext/gettext.c:194:3: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/string.h:408:33: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/gettext/gettext.c:194:3

PHP Version

nightly

Operating System

No response

@nielsdos
Copy link
Member

Coincidentally #17168 was opened a few days earlier which would fix this.

@nielsdos
Copy link
Member

Fixed via #17168, but not closed automatically because of a manual merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants