#48202 [Csd->Asn]: Out of memory error when passing non-existing filename to xmlwriter_open_uri()

From: Date: Tue, 26 May 2009 14:12:42 +0000
Subject: #48202 [Csd->Asn]: Out of memory error when passing non-existing filename to xmlwriter_open_uri()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-137755@lists.php.net to get a copy of this message
 ID:               48202
 Updated by:       felipe@php.net
 Reported By:      koenk82 at gmail dot com
-Status:           Closed
+Status:           Assigned
 Bug Type:         XML Writer
 Operating System: *
 PHP Version:      5.*, 6CVS (2009-05-09)
 Assigned To:      pajoye
 New Comment:

It's reproducible yet.

$ sapi/cli/php -r 'xmlwriter_open_uri("file:///a");'

Warning: xmlwriter_open_uri(/a): failed to open stream: Permission
denied in Command line code on line 1

Warning: xmlwriter_open_uri(): xmlNewTextWriterFilename : out of
memory! in Command line code on line 1


Previous Comments:
------------------------------------------------------------------------

[2009-05-25 16:53:52] pajoye@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

fixed in 5.2, 5.3 and HEAD

------------------------------------------------------------------------

[2009-05-09 13:04:56] pajoye@php.net

reproduced during the testfest 2009/utrecht, assigning to me.

------------------------------------------------------------------------

[2009-05-09 12:40:13] koenk82 at gmail dot com

Description:
------------
If you supply a non-existing file to xmlwriter_open_uri it produces an
Out of memory error.

Reproduce code:
---------------
<?php 
var_dump(xmlwriter_open_uri('foo/bar.tmp'));
?>

Expected result:
----------------
Warning: xmlwriter_open_uri(%s): failed to open stream: No such file or
directory in %s on line %d
bool(false)

Actual result:
--------------
Warning: xmlwriter_open_uri(/home/koen/Bureaublad/php5/foo/bar.tmp):
failed to open stream: No such file or directory in
/home/koen/Bureaublad/mytests/xmlwriter_open_uri_error_003.php on line
2

Warning: xmlwriter_open_uri(): xmlNewTextWriterFilename : out of
memory! in
/home/koen/Bureaublad/mytests/xmlwriter_open_uri_error_003.php on line
2
bool(false)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48202&edit=1



Thread (7 messages)

« previous php.bugs (#137755) next »