File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ PHP NEWS
18
18
. Fixed bug #68638 (pg_update() fails to store infinite values).
19
19
(william dot welter at 4linux dot com dot br, Laruence)
20
20
21
+ - Readline:
22
+ . Fixed bug #69054 (Null dereference in readline_(read|write)_history() without
23
+ parameters). (Laruence)
24
+
21
25
- CGI:
22
26
. Fixed bug #69015 (php-cgi's getopt does not see $argv). (Laruence)
23
27
Original file line number Diff line number Diff line change @@ -400,12 +400,13 @@ PHP_FUNCTION(readline_read_history)
400
400
return ;
401
401
}
402
402
403
- if (php_check_open_basedir (arg TSRMLS_CC )) {
403
+ if (arg && php_check_open_basedir (arg TSRMLS_CC )) {
404
404
RETURN_FALSE ;
405
405
}
406
406
407
407
/* XXX from & to NYI */
408
408
if (read_history (arg )) {
409
+ /* If filename is NULL, then read from `~/.history' */
409
410
RETURN_FALSE ;
410
411
} else {
411
412
RETURN_TRUE ;
@@ -424,7 +425,7 @@ PHP_FUNCTION(readline_write_history)
424
425
return ;
425
426
}
426
427
427
- if (php_check_open_basedir (arg TSRMLS_CC )) {
428
+ if (arg && php_check_open_basedir (arg TSRMLS_CC )) {
428
429
RETURN_FALSE ;
429
430
}
430
431
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #69054 (Null dereference in readline_(read|write)_history() without parameters)
3
+ --SKIPIF--
4
+ <?php if (!extension_loaded ("readline " ) || !function_exists ('readline_add_history ' )) die ("skip " ); ?>
5
+ --INI--
6
+ open_basedir=/tmp
7
+ --FILE--
8
+ <?php readline_read_history (); ?>
9
+ ==DONE==
10
+ --EXPECT--
11
+ ==DONE==
You can’t perform that action at this time.
0 commit comments