derick Wed Nov 2 10:53:49 2005 EDT Modified files: (Branch: PHP_5_1) /php-src NEWS /php-src/ext/posix posix.c Log: - MFH: Fixed initializing and argument checking for posix_mknod(). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.172&r2=1.2027.2.173&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.172 php-src/NEWS:1.2027.2.173 --- php-src/NEWS:1.2027.2.172 Mon Oct 31 14:25:00 2005 +++ php-src/NEWS Wed Nov 2 10:53:47 2005 @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Nov 2005, PHP 5.1 +- Fixed initializing and argument checking for posix_mknod(). (Derick) - Fixed bugs #35022, #35019 (Regression in the behavior of key() and current() functions). (Ilia) - Fixed bug #35017 (Exception thrown in error handler may cause unexpected http://cvs.php.net/diff.php/php-src/ext/posix/posix.c?r1=1.70&r2=1.70.2.1&ty=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70 php-src/ext/posix/posix.c:1.70.2.1 --- php-src/ext/posix/posix.c:1.70 Mon Aug 8 17:44:58 2005 +++ php-src/ext/posix/posix.c Wed Nov 2 10:53:49 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: posix.c,v 1.70 2005/08/08 21:44:58 magnus Exp $ */ +/* $Id: posix.c,v 1.70.2.1 2005/11/02 15:53:49 derick Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -143,7 +143,7 @@ static PHP_MINFO_FUNCTION(posix) { php_info_print_table_start(); - php_info_print_table_row(2, "Revision", "$Revision: 1.70 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.1 $"); php_info_print_table_end(); } /* }}} */ @@ -676,7 +676,7 @@ char *path; int path_len; long mode; - long major, minor = 0; + long major = 0, minor = 0; int result; dev_t php_dev; @@ -693,9 +693,13 @@ } if ((mode & S_IFCHR) || (mode & S_IFBLK)) { + if (ZEND_NUM_ARGS() == 2) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "For S_IFCHR and S_IFBLK you need to pass a major device kernel identifier"); + RETURN_FALSE; + } if (major == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, - "expects argument 4 to be non-zero for POSIX_S_IFCHR and POSIX_S_IFBLK"); + "Expects argument 3 to be non-zero for POSIX_S_IFCHR and POSIX_S_IFBLK"); RETURN_FALSE; } else { #if defined(HAVE_MAKEDEV) || defined(makedev)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php