mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
parent
2197801ef1
commit
0743d384a6
@ -88,6 +88,10 @@ static int traverse_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
|
||||
{
|
||||
struct unexpected_key key;
|
||||
|
||||
if (kbuf.dsize != sizeof(key)) {
|
||||
tdb_delete(ttdb, kbuf);
|
||||
}
|
||||
|
||||
memcpy(&key, kbuf.dptr, sizeof(key));
|
||||
|
||||
if (lastt - key.timestamp > NMBD_UNEXPECTED_TIMEOUT) {
|
||||
@ -136,6 +140,10 @@ static int traverse_match(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf,
|
||||
int port;
|
||||
struct packet_struct *p;
|
||||
|
||||
if (kbuf.dsize != sizeof(key)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(&key, kbuf.dptr, sizeof(key));
|
||||
|
||||
if (key.packet_type != state->match_type) return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user