[php-src] Issue #23718: Sign extension at phar_object.c

From: Date: Thu, 17 Sep 2026 10:56:56 +0000
Subject: [php-src] Issue #23718: Sign extension at phar_object.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-252753@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/23718 Author: PavlNekrasov ### Description The field compressed_filesize is a uint32_t, but PharFileInfo::getCompressedSize() returns it with RETURN_LONG: https://github.com/php/php-src/blob/fca72841a5d41b11c0e60ed0906af6af302741ca/ext/phar/phar_object.c#L4497 zend_long is 32-bit on 32-bit platforms: https://github.com/php/php-src/blob/fca72841a5d41b11c0e60ed0906af6af302741ca/Zend/zend_long.h#L41-L49 so a size above INT32_MAX is reported as a negative number. Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE. Reporter: Pavel Nekrasov ([p.nekrasov@fobos-nt.ru](mailto:p.nekrasov@fobos-nt.ru)). ### PHP Version ```plain php version - 8.3 ``` ### Operating System _No response_

« previous php.bugs (#252753) next »