From 30c02f987186963ed768c843ff2fc411d0cc7166 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 25 Apr 2001 01:07:33 +0000 Subject: More paranioa fixes against nmbd lengths. Jeremy. (This used to be commit 53f35a71c6fc46814eca914573506622d7db4e08) --- source3/nmbd/nmbd_packets.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/nmbd') diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 3fa382b96f..dcdf1a9df1 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1265,21 +1265,21 @@ an error packet of type %x\n", len = SVAL(buf,smb_vwv11); buf2 = smb_base(buf) + SVAL(buf,smb_vwv12); - DEBUG(4,("process_dgram: datagram from %s to %s IP %s for %s of type %d len=%d\n", - nmb_namestr(&dgram->source_name),nmb_namestr(&dgram->dest_name), - inet_ntoa(p->ip), smb_buf(buf),CVAL(buf2,0),len)); - - if (len <= 0) return; if (buf2 + len > buf + sizeof(dgram->data)) { - DEBUG(2,("process_dgram: datagram from %s to %s IP %s for %s of type %d len=%d too long.\n", + DEBUG(2,("process_dgram: datagram from %s to %s IP %s for %s %d len=%d too long.\n", nmb_namestr(&dgram->source_name),nmb_namestr(&dgram->dest_name), - inet_ntoa(p->ip), smb_buf(buf),CVAL(buf2,0),len)); + inet_ntoa(p->ip), smb_buf(buf),len)); len = (buf + sizeof(dgram->data)) - buf; } + DEBUG(4,("process_dgram: datagram from %s to %s IP %s for %s of type %d len=%d\n", + nmb_namestr(&dgram->source_name),nmb_namestr(&dgram->dest_name), + inet_ntoa(p->ip), smb_buf(buf),CVAL(buf2,0),len)); + + /* Datagram packet received for the browser mailslot */ if (strequal(smb_buf(buf),BROWSE_MAILSLOT)) { -- cgit