php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57293 rar_list invalidates rar resource
Submitted: 2006-10-12 11:52 UTC Modified: 2006-10-12 14:16 UTC
From: kleiner+pecl at gmail dot com Assigned:
Status: Closed Package: rar (PECL)
PHP Version: 5.1.6 OS: Debian Linux 2.4.27-1-6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kleiner+pecl at gmail dot com
New email:
PHP Version: OS:

 

 [2006-10-12 11:52 UTC] kleiner+pecl at gmail dot com
Description:
------------
Package version: 0.3.1

Calling rar_list() via another function causes the resource handle to become invalid.

Reproduce code:
---------------
function do_rar($ra)
{
  $entries = rar_list($ra);
}

$filename = "tmp/amin.rar";
$ra = rar_open($filename);
$entries = rar_list($ra);
do_rar($ra);
rar_close($ra);

Expected result:
----------------
I expect no errors to occur.

Actual result:
--------------
Upon calling rar_close() I get the warning "cannot find Rar file resource". If I comment out the line where I call do_rar(), however, the error disappears. 

It looks as if calling rar_list() indirectly via do_rar() causes the resource handle to become invalid, while calling rar_list() directly leaves the handle intact. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-12 12:08 UTC] tony2001 at phpclub dot net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Good catch, thanks.
 [2006-10-12 13:30 UTC] kleiner+pecl at gmail dot com
I checked out the new version from CVS. However, after compiling/installing and restarting Apache, I get the following:

[Thu Oct 12 19:26:14 2006] [notice] seg fault or similar nasty error detected in the parent process

(Running Apache 2.0.55)
 [2006-10-12 13:41 UTC] tony2001 at phpclub dot net
Can't reproduce.
Please provide a backtrace.
 [2006-10-12 14:16 UTC] kleiner+pecl at gmail dot com
Can't reproduce it either anymore. Works fine now. Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC