summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-25 01:07:33 +0000
committerJeremy Allison <jra@samba.org>2001-04-25 01:07:33 +0000
commit30c02f987186963ed768c843ff2fc411d0cc7166 (patch)
treee8b235216a682c62f22fa105a8a93935e1fa38c6 /source3
parenta7e07d149d76a4d62aba6801ac648c0c72999ea9 (diff)
downloadsamba-30c02f987186963ed768c843ff2fc411d0cc7166.tar.gz
samba-30c02f987186963ed768c843ff2fc411d0cc7166.tar.bz2
samba-30c02f987186963ed768c843ff2fc411d0cc7166.zip
More paranioa fixes against nmbd lengths.
Jeremy. (This used to be commit 53f35a71c6fc46814eca914573506622d7db4e08)
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd_packets.c14
1 files changed, 7 insertions, 7 deletions
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))
{