#27383 [NEW]: uninitialized memory in http_fopen_wrapper.c error handling
From: remijnj at eidetica dot com
Operating system: Linux (Slackware 9.1)
PHP version: 4.3.5RC3
PHP Bug Type: HTTP related
Bug description: uninitialized memory in http_fopen_wrapper.c error handling
Description:
------------
I have seen uninitialized memory being printed out in my php eror log.
Some of the errors are like:
[24-Feb-2004 12:00:12] PHP Warning: file_get_contents(<snip>) failed to
open stream: HTTP request
failed! ??B^P in /usr/local/www/include/file.inc on line 17
This happened when the apache server i connected to was too busy to handle
the request (load way too high).
In that specific case tmp_line will be used uninitialized. This code could
possibly lead to a SEGV (Segmentation Violation).
Looking at the code i also spotted another (more unlikely) bug which could
also result in a SEGV.
I have prepared a patch against 4.3.5RC5 which should solve this problem
(in my opinion).
If anyone has any questions on this report or my patch (which i will try
to add later) please contact me.
--
Edit bug report at http://bugs.php.net/?id=27383&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27383&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27383&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27383&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27383&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27383&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27383&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27383&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27383&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27383&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27383&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27383&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27383&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27383&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27383&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27383&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27383&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27383&r=float
Thread (9 messages)
- remijnj at eidetica dot com