summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/status.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 243ccdd755..55c3c1bad1 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -186,9 +186,13 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
struct session_record *ptr;
struct connections_data crec;
+ if (dbuf.dsize != sizeof(crec))
+ return 0;
+
memcpy(&crec, dbuf.dptr, sizeof(crec));
- if (crec.cnum == -1) return 0;
+ if (crec.cnum == -1)
+ return 0;
if (!process_exists(crec.pid) || !Ucrit_checkUsername(uidtoname(crec.uid))) {
return 0;