You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At line 746 of the file /php-src/ext/phar/stream.c, a pointer variable named resource_to is defined. This pointer is allocated a new block of dynamic memory through the function phar_parse_url at line 772. If the if statement at line 772 evaluates to false, it indicates that the allocation of dynamic memory for resource_to was successful. When the if statement at line 783 returns true, the function exits at line 786. During this process, the dynamically allocated memory pointed to by resource_to, which was neither freed like at line 791 nor used, leads to a memory leak defect, as illustrated below: https://github.com/LuMingYinDetect/php_defects/blob/main/php_4.png
PHP Version
PHP 8.4.0
Operating System
Ubuntu 22.04
The text was updated successfully, but these errors were encountered:
Description
At line 746 of the file /php-src/ext/phar/stream.c, a pointer variable named resource_to is defined. This pointer is allocated a new block of dynamic memory through the function phar_parse_url at line 772. If the if statement at line 772 evaluates to false, it indicates that the allocation of dynamic memory for resource_to was successful. When the if statement at line 783 returns true, the function exits at line 786. During this process, the dynamically allocated memory pointed to by resource_to, which was neither freed like at line 791 nor used, leads to a memory leak defect, as illustrated below:
https://github.com/LuMingYinDetect/php_defects/blob/main/php_4.png
PHP Version
PHP 8.4.0
Operating System
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: