From 84f4ca9b07fe5b73d840258f4aa7c1eb534c4253 Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Wed, 24 Jun 2009 22:49:04 +0200 Subject: Imported Upstream version 5.3.0~RC4 --- ext/dba/dba_db4.c | 4 ++-- ext/dba/tests/bug48240.phpt | 25 +++++++++++++++++++++++++ ext/dba/tests/dba_cdb_make.phpt | 3 ++- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 ext/dba/tests/bug48240.phpt (limited to 'ext/dba') diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index 774bd1764..2c2da4052 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db4.c,v 1.15.2.3.2.1.2.3 2008/12/31 11:15:36 sebastian Exp $ */ +/* $Id: dba_db4.c,v 1.15.2.3.2.1.2.4 2009/05/13 02:14:53 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -219,7 +219,7 @@ DBA_NEXTKEY_FUNC(db4) 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; diff --git a/ext/dba/tests/bug48240.phpt b/ext/dba/tests/bug48240.phpt new file mode 100644 index 000000000..72dc43956 --- /dev/null +++ b/ext/dba/tests/bug48240.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #48240 (DBA Segmentation fault dba_nextkey) +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +bool(false) +===DONE=== diff --git a/ext/dba/tests/dba_cdb_make.phpt b/ext/dba/tests/dba_cdb_make.phpt index 04df9252d..bb41e82fb 100644 --- a/ext/dba/tests/dba_cdb_make.phpt +++ b/ext/dba/tests/dba_cdb_make.phpt @@ -33,6 +33,7 @@ magic_quotes_runtime=1 } ?> --EXPECT-- +PHP Warning: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0 database handler: cdb_make string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5" -string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5" \ No newline at end of file +string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5" -- cgit v1.2.3