PHP 4.0 Bug #9358 Updated: HAVE_RDEV not being checked before accessing field st_rdev
| From: | sas@php.net | Date: | Wed, 21 Feb 2001 07:20:03 +0000 |
| Subject: | PHP 4.0 Bug #9358 Updated: HAVE_RDEV not being checked before accessing field st_rdev | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47121@lists.php.net to get a copy of this message | ||
ID: 9358
Updated by: sas
Reported By: amra@us.ibm.com
Old-Status: Open
Status: Closed
Bug Type: Compile Failure
Assigned To:
Comments:
Thanks for your report. I've committed the changes.
Previous Comments:
---------------------------------------------------------------------------
[2001-02-20 16:15:56] amra@us.ibm.com
st_rdev in struct stat is being access without any regards to HAVE_RDEV in the following files:
ext/standard/filestat.c
ext/standard/file.c
file.c has the following code:
#ifdef HAVE_ST_BLKSIZE
add_assoc_long ( return_value, "rdev" , stat_sb.st_rdev );
add_assoc_long ( return_value , "blksize" , stat_sb.st_blksize );
#endif
and filestat.c has the following code:
#ifdef HAVE_ST_BLKSIZE
add_next_index_long(return_value, stat_sb->st_rdev);
#else
add_next_index_long(return_value, -1);
#endif
in both cases, it should have been checking for HAVE_ST_RDEV before accessing the st_rdev field.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9358&edit=2