php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9358 HAVE_RDEV not being checked before accessing field st_rdev
Submitted: 2001-02-20 16:15 UTC Modified: 2001-02-21 02:20 UTC
From: amra at us dot ibm dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.4pl1 OS: OS400
Private report: No CVE-ID: None
 [2001-02-20 16:15 UTC] amra at us dot ibm dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-21 02:20 UTC] sas@php.net
Thanks for your report. I've committed the changes.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 19:01:31 2024 UTC