PHP 4.0 Bug #10229: buffer error in fread

From: Date: Sat, 07 Apr 2001 23:25:09 +0000
Subject: PHP 4.0 Bug #10229: buffer error in fread
Groups: php.dev 
Request: Send a blank email to php-dev+get-51122@lists.php.net to get a copy of this message
From: apeeters@lashout.net Operating system: linux 2.2.14C11 PHP version: 4.0.3pl1 PHP Bug Type: Filesystem function related Bug description: buffer error in fread While running the following code, I got weird results in my mailbox. It seemed like I got the entire buffer of 100000 bytes mailed, instead of only the length of the result of the url. And those mails contained php code from another site hosted at the same server. This worries me, and I think this needs a serious checkup. The bug is reproducible :) ---start--- $fp = fopen("http://someurl/", "r"); $content = fread($fp, 100000); mail("someone@somehost", "test", $content); ---stop--- Additional info: './configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' '--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf=/usr/lib/libttf.so' '--enable-track-vars' '--enable-xml' '--disable-debug' '--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' '--with-imap' -- Edit Bug report at: http://bugs.php.net/?id=10229&edit=1

« previous php.dev (#51122) next »