summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-27 00:42:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:18:59 -0500
commit429cd6db0b32ee0e91a12548d83e82a7f7b6571c (patch)
treebb7205c597ca658addb330e9ac3af019f5f41fa3 /source3
parentfe28eb2e411f3fd6b1b0d46ee0e5344592d7e49c (diff)
downloadsamba-429cd6db0b32ee0e91a12548d83e82a7f7b6571c.tar.gz
samba-429cd6db0b32ee0e91a12548d83e82a7f7b6571c.tar.bz2
samba-429cd6db0b32ee0e91a12548d83e82a7f7b6571c.zip
r16542: Fix #3863, reported by jason@ncac.gwu.edu
Jeremy. (This used to be commit cde8323fdc4d4ddaa30e8c59bec89dc130fe26a6)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_eventlog_lib.c6
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c2
2 files changed, 6 insertions, 2 deletions
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;