#34321 [NEW]: convert.quoted-printable-encode exhausts memory

From: Date: Wed, 31 Aug 2005 17:33:39 +0000
Subject: #34321 [NEW]: convert.quoted-printable-encode exhausts memory
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84257@lists.php.net to get a copy of this message
From: php at themrbubbles dot com Operating system: Red Hat Linux 3.2.3-42 PHP version: 5.1.0RC1 PHP Bug Type: Unknown/Other Function Bug description: convert.quoted-printable-encode exhausts memory Description: ------------ Using convert.quoted-printable-encode as an appended stream filter uses memory up to memory_limit and dies with an exhausted memory error. Occurs in both 5.1.0RC1 and 5.0.3, untested with 5.0.4 5.1.0RC1 configure './configure' '--with-curl' '--with-curl-dir=/usr/local/lib' '--with-gd' '--with-gd-dir=/usr/local/lib' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-kerberos' '--without-xml' '--disable-xml' '--disable-libxml' '--disable-simplexml' '--with-mcrypt=/usr' '--with-mysql=/usr' '--without-pear' '--disable-pear' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--with-calendar=shared' '--enable-exif' '--enable-trans-sid' '--disable-wddx' '--enable-inline-optimization' '--enable-memory-limit' '--enable-mbstring' '--with-imap=' '--with-mhash' '--with-imap-ssl' '--with-openssl=/usr' '--disable-dom' '--with-ldap' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-track-vars' '--enable-freetype' '--enable-cgi' Reproduce code: --------------- <?php // From http://us3.php.net/manual/en/filters.convert.php $fp = fopen('php://output', 'w'); stream_filter_append($fp, 'convert.quoted-printable-encode'); fwrite($fp, "This is a test.\n"); /* Outputs: =This is a test.=0A */ ?> Expected result: ---------------- =This is a test.=0A Actual result: -------------- Allowed memory size of 104857600 bytes exhausted (tried to allocate 67108864 bytes) run with php -n -d memory_limit=100M -- Edit bug report at http://bugs.php.net/?id=34321&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34321&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34321&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34321&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34321&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34321&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34321&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34321&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34321&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34321&r=support Expected behavior: http://bugs.php.net/fix.php?id=34321&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34321&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34321&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34321&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34321&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34321&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34321&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34321&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34321&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34321&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34321&r=mysqlcfg

« previous php.bugs (#84257) next »