]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r1560: Not that anybody uses this stuff (yet...), but at least get it correct :-)
authorVolker Lendecke <vlendec@samba.org>
Wed, 21 Jul 2004 12:22:58 +0000 (12:22 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:14 +0000 (10:52 -0500)
When sending a mailslot datagram, get the packet length correction correct.

Volker

source/libsmb/clidgram.c

index c4675f1938a3a63654619ab67ca6216f8f8a03d2..ba65c46d16efc0ae63d6f8825d7f0d9e14b896df 100644 (file)
@@ -63,7 +63,7 @@ int cli_send_mailslot(int dgram_sock, BOOL unique, const char *mailslot,
   /* Setup the smb part. */
   ptr -= 4; /* XXX Ugliness because of handling of tcp SMB length. */
   memcpy(tmp,ptr,4);
-  set_message(ptr,17,17 + len,True);
+  set_message(ptr,17,strlen(mailslot) + 1 + len,True);
   memcpy(ptr,tmp,4);
 
   SCVAL(ptr,smb_com,SMBtrans);