From 429cd6db0b32ee0e91a12548d83e82a7f7b6571c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 27 Jun 2006 00:42:24 +0000 Subject: r16542: Fix #3863, reported by jason@ncac.gwu.edu Jeremy. (This used to be commit cde8323fdc4d4ddaa30e8c59bec89dc130fe26a6) --- source3/rpc_server/srv_eventlog_lib.c | 6 ++++++ source3/rpc_server/srv_eventlog_nt.c | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c index e04aefa7e1..66be1dc34f 100644 --- a/source3/rpc_server/srv_eventlog_lib.c +++ b/source3/rpc_server/srv_eventlog_lib.c @@ -201,6 +201,12 @@ BOOL make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed, len = tdb_unpack( ret.dptr, ret.dsize, "ddddd", &reclen, &tresv1, &trecnum, &timegen, &timewr ); + if (len == -1) { + DEBUG( 10,("make_way_for_eventlogs: tdb_unpack failed.\n")); + tdb_unlock_bystring( the_tdb, EVT_NEXT_RECORD ); + return False; + } + DEBUG( 8, ( "read record %d, record size is [%d], total so far [%d]\n", i, reclen, nbytes ) ); diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c index c1c0b6a0e2..79839a0a52 100644 --- a/source3/rpc_server/srv_eventlog_nt.c +++ b/source3/rpc_server/srv_eventlog_nt.c @@ -289,12 +289,10 @@ Eventlog_entry *get_eventlog_record( prs_struct * ps, TDB_CONTEXT * tdb, int srecno; int reclen; int len; - uint8 *rbuff; pstring *wpsource, *wpcomputer, *wpsid, *wpstrs, *puserdata; key.dsize = sizeof( int32 ); - rbuff = NULL; srecno = recno; key.dptr = ( char * ) &srecno; -- cgit