Skip to content

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

Closed
@YuanchengJiang

Description

@YuanchengJiang

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions