php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60377 ZipArchive::extractTo() memory leaks with invalid path using phar://
Submitted: 2011-11-24 21:52 UTC Modified: 2012-09-08 15:24 UTC
Votes:3
Avg. Score:3.3 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: felipe@php.net Assigned: pajoye
Status: Closed Package: Zip Related
PHP Version: trunk-SVN-2011-11-24 (SVN) OS:
Private report: No CVE-ID:
 [2011-11-24 21:52 UTC] felipe@php.net
Description:
------------
See below.

Test script:
---------------
<?php

$x = new ZipArchive;
$x->extractTo("phar:///usr/local/bin/phar.phar/a");

Actual result:
--------------
$ sapi/cli/php ../bug.php 
[Thu Nov 24 19:50:30 2011]  Script:  '../bug.php'
/home/felipe/dev/phptrunk/main/streams/streams.c(258) :  Freeing 0x7FF3DEA323F8 (8 bytes), script=../bug.php
[Thu Nov 24 19:50:30 2011]  Script:  '../bug.php'
/home/felipe/dev/phptrunk/main/spprintf.c(236) :  Freeing 0x7FF3DEA35440 (207 bytes), script=../bug.php
=== Total 2 memory leaks detected ===


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-24 21:52 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2012-09-08 15:14 UTC] reeze dot xia at gmail dot com
I just test with latest versions, It seems been fixed already :)
 [2012-09-08 15:24 UTC] felipe@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 13:02:15 2014 UTC