File php-CVE-2015-4025.patch of Package php5.10549
Index: php-5.5.14/ext/standard/basic_functions.c
===================================================================
--- php-5.5.14.orig/ext/standard/basic_functions.c 2017-11-20 13:24:21.003130802 +0100
+++ php-5.5.14/ext/standard/basic_functions.c 2017-11-20 13:31:38.290486448 +0100
@@ -5488,7 +5488,7 @@ PHP_FUNCTION(set_include_path)
int new_value_len;
char *old_value;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &new_value, &new_value_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &new_value, &new_value_len) == FAILURE) {
return;
}
Index: php-5.5.14/ext/standard/dir.c
===================================================================
--- php-5.5.14.orig/ext/standard/dir.c 2014-06-25 15:06:23.000000000 +0200
+++ php-5.5.14/ext/standard/dir.c 2017-11-20 13:33:23.288256042 +0100
@@ -219,7 +219,7 @@ static void _php_do_opendir(INTERNAL_FUN
php_stream_context *context = NULL;
php_stream *dirp;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|r", &dirname, &dir_len, &zcontext) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|r", &dirname, &dir_len, &zcontext) == FAILURE) {
RETURN_NULL();
}
@@ -294,7 +294,7 @@ PHP_FUNCTION(chroot)
char *str;
int ret, str_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &str, &str_len) == FAILURE) {
RETURN_FALSE;
}
Index: php-5.5.14/ext/standard/file.c
===================================================================
--- php-5.5.14.orig/ext/standard/file.c 2017-11-20 13:24:21.695142435 +0100
+++ php-5.5.14/ext/standard/file.c 2017-11-20 13:34:29.945378415 +0100
@@ -806,7 +806,7 @@ PHP_FUNCTION(tempnam)
char *p;
int fd;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ps", &dir, &dir_len, &prefix, &prefix_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pp", &dir, &dir_len, &prefix, &prefix_len) == FAILURE) {
return;
}
@@ -1341,7 +1341,7 @@ PHP_FUNCTION(rmdir)
zval *zcontext = NULL;
php_stream_context *context;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|r", &dir, &dir_len, &zcontext) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|r", &dir, &dir_len, &zcontext) == FAILURE) {
RETURN_FALSE;
}