diff options
author | James Peach <jpeach@samba.org> | 2007-12-13 20:56:53 -0800 |
---|---|---|
committer | James Peach <jpeach@samba.org> | 2007-12-13 20:56:53 -0800 |
commit | 7b457645fb40d7195d75f8e38883b140abcb1955 (patch) | |
tree | 90c3ca21cd40c98ed4c7c1580b75216f689fad97 /source3/nmbd | |
parent | 12ac4c3119b3b7712e670d95d61413d97ecafaef (diff) | |
parent | 138333ed1f571cd6bb76c3be655f70e35cd48a99 (diff) | |
download | samba-7b457645fb40d7195d75f8e38883b140abcb1955.tar.gz samba-7b457645fb40d7195d75f8e38883b140abcb1955.tar.bz2 samba-7b457645fb40d7195d75f8e38883b140abcb1955.zip |
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 0de2b3eb515f2da21ffd1ce54979bb1f8063024b)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index b78ab5ba7e..349d36ce70 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1918,6 +1918,12 @@ bool send_mailslot(bool unique, const char *mailslot,char *buf, size_t len, /* Setup the smb part. */ ptr -= 4; /* XXX Ugliness because of handling of tcp SMB length. */ memcpy(tmp,ptr,4); + + if (smb_size + 17*2 + strlen(mailslot) + 1 + len > MAX_DGRAM_SIZE) { + DEBUG(0, ("send_mailslot: Cannot write beyond end of packet\n")); + return false; + } + set_message(ptr,17,strlen(mailslot) + 1 + len,True); memcpy(ptr,tmp,4); |