- Fixed bug #48248 (SIGSEGV when access to private property via &__get).
(Felipe)
+- Fixed bug #48240 (DBA Segmentation fault dba_nextkey). (Felipe)
- Fixed bug #48224 (Incorrect shuffle in array_rand). (Etienne)
- Fixed bug #48221 (memory leak when passing invalid xslt parameter). (Felipe)
- Fixed bug #48206 (Iterating over an invalid data structure
gkey.flags |= DB_DBT_MALLOC;
gval.flags |= DB_DBT_MALLOC;
}
- if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
+ if (dba->cursor && dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
if (gkey.data) {
nkey = estrndup(gkey.data, gkey.size);
if (newlen) *newlen = gkey.size;
--- /dev/null
+--TEST--
+Bug #48240 (DBA Segmentation fault dba_nextkey)
+--SKIPIF--
+<?php
+ $handler = 'db4';
+ require_once('skipif.inc');
+?>
+--FILE--
+<?php
+
+$handler = 'db4';
+require_once('test.inc');
+
+$db = dba_open($db_filename, 'c', 'db4');
+
+var_dump(dba_nextkey($db));
+
+dba_close($db);
+unlink($db_filename);
+
+?>
+===DONE===
+--EXPECT--
+bool(false)
+===DONE===