mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 18:35:42 +00:00
Merge branch 'master' of https://github.com/php/php-src into string_size_refactor_take_2
This commit is contained in:
commit
7331e4c9c8
6 files changed
+48
-3
No files matched your search
@@ -587,7 +587,7 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, long colno, zval *return
|
||||
add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type);
|
||||
|
||||
/* Fetch metadata from Postgres system catalogue */
|
||||
spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%ud", S->cols[colno].pgsql_type);
|
||||
spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type);
|
||||
res = PQexec(S->H->server, q);
|
||||
efree(q);
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ $fo = new SplFileObject('testdata.csv');
|
||||
|
||||
$fo->rewind( "invalid" );
|
||||
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink('testdata.csv');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: SplFileObject::rewind() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
+23
-1
@@ -358,7 +358,29 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = "embed"; then
|
||||
PHP_ENABLE_CHROOT_FUNC=no
|
||||
case "$PHP_SAPI" in
|
||||
embed)
|
||||
PHP_ENABLE_CHROOT_FUNC=yes
|
||||
;;
|
||||
|
||||
none)
|
||||
for PROG in $PHP_BINARIES; do
|
||||
case "$PROG" in
|
||||
cgi|cli)
|
||||
PHP_ENABLE_CHROOT_FUNC=yes
|
||||
;;
|
||||
|
||||
*)
|
||||
PHP_ENABLE_CHROOT_FUNC=no
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$PHP_ENABLE_CHROOT_FUNC" = "yes"; then
|
||||
AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function])
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #65236 (heap corruption in xml parser)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once("skipif.inc");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
xml_parse_into_struct(xml_parser_create_ns(), str_repeat("<blah>", 1000), $a);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: xml_parse_into_struct(): Maximum depth exceeded - Results truncated in %s on line %d
|
||||
Done
|
||||
@@ -2289,6 +2289,7 @@ PHPAPI int _php_stream_scandir(char *dirname, char **namelist[], int flags, php_
|
||||
} else {
|
||||
if(vector_size*2 < vector_size) {
|
||||
/* overflow */
|
||||
php_stream_closedir(stream);
|
||||
efree(vector);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -2302,6 +2303,7 @@ PHPAPI int _php_stream_scandir(char *dirname, char **namelist[], int flags, php_
|
||||
nfiles++;
|
||||
if(vector_size < 10 || nfiles == 0) {
|
||||
/* overflow */
|
||||
php_stream_closedir(stream);
|
||||
efree(vector);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -2310,7 +2312,7 @@ PHPAPI int _php_stream_scandir(char *dirname, char **namelist[], int flags, php_
|
||||
|
||||
*namelist = vector;
|
||||
|
||||
if (compare) {
|
||||
if (nfiles > 0 && compare) {
|
||||
qsort(*namelist, nfiles, sizeof(char *), (int(*)(const void *, const void *))compare);
|
||||
}
|
||||
return nfiles;
|
||||
|
||||
@@ -50,4 +50,6 @@ PHPAPI extern int setitimer(int which, const struct itimerval *value,
|
||||
|
||||
PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp );
|
||||
|
||||
PHPAPI int usleep(unsigned int useconds);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user