Skip to content

offset overflow phar extractTo() #17518

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php';
$phar = new Phar($fname);
$fusion = $phar;
$fusion->extractTo(__DIR__ . "/bug81490", "");

Resulted in this output:

/home/phpfuzz/WorkSpace/flowfusion/php-src/ext/phar/phar_object.c:4330:20: runtime error: addition of unsigned offset to 0x603000001438 overflowed to 0x603000001437
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/phar/phar_object.c:4330:20

PHP Version

nightly

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions