Skip to content

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

Closed

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

Activity

  1. ndossche commented on Dec 17, 2024

    @ndossche
    Member

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

  2. ndossche commented on Dec 19, 2024

    @ndossche
    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

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