From b131796e4da9db4ea9bb955a4a713deed4e441b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 17 Jul 2007 07:45:45 +0000 Subject: [PATCH] (dbm_get): set dsize to 0 on failure. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21623 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/ndbm_wrap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/roken/ndbm_wrap.c b/lib/roken/ndbm_wrap.c index 74e6761d2..14c916123 100644 --- a/lib/roken/ndbm_wrap.c +++ b/lib/roken/ndbm_wrap.c @@ -114,9 +114,10 @@ dbm_get (DB *db, int flags) #ifdef HAVE_DB3 if(cursor == NULL) db->cursor(db, NULL, &cursor, 0); - if(cursor->c_get(cursor, &key, &value, flags) != 0) + if(cursor->c_get(cursor, &key, &value, flags) != 0) { datum.dptr = NULL; - else + datum.0 = NULL; + } else DBT2DATUM(&value, &datum); #else db->seq(db, &key, &value, flags);