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/libsmb/clidgram.c | |
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/libsmb/clidgram.c')
-rw-r--r-- | source3/libsmb/clidgram.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c index 82f874f383..76630bd504 100644 --- a/source3/libsmb/clidgram.c +++ b/source3/libsmb/clidgram.c @@ -75,6 +75,12 @@ bool cli_send_mailslot(struct messaging_context *msg_ctx, /* 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, ("cli_send_mailslot: Cannot write beyond end of packet\n")); + return False; + } + set_message(ptr,17,strlen(mailslot) + 1 + len,True); memcpy(ptr,tmp,4); |