Skip to content

SEGV in bindtextdomain #17400

Closed
Closed

Description

@YuanchengJiang

Description

The following code:

<?php
$utf16_first_le = pack("H*", "00d800dc");
$utf16le_char_bad = pack("H*", "00dc00dc");
bindtextdomain($utf16le_char_bad,$utf16_first_le);

Resulted in this output:

/home/phpfuzz/WorkSpace/flowfusion/php-src/ext/gettext/gettext.c:216:2: 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:216:2

PHP Version

nightly

Operating System

No response

Activity

  1. self-assigned this
    on Jan 8, 2025
  2. added 2 commits that reference this issue on Jan 9, 2025
    d12ec59
    e975c27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions