]> granicus.if.org Git - curl/commitdiff
SMB: Fix a data size mismatch that broke SMB on big-endian platforms
authorPatrick Monnerat <pm@datasphere.ch>
Mon, 8 Dec 2014 14:30:11 +0000 (15:30 +0100)
committerPatrick Monnerat <pm@datasphere.ch>
Mon, 8 Dec 2014 14:30:11 +0000 (15:30 +0100)
lib/smb.c

index 2b2781aca062d7f3221afc6eef8faff928da9cd2..079d9c7069f19ed094d42c0f910dbe12b58fd621 100644 (file)
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -397,7 +397,7 @@ static CURLcode smb_send_setup(struct connectdata *conn)
   memset(&msg, 0, sizeof(msg));
   msg.word_count = SMB_WC_SETUP_ANDX;
   msg.andx.command = SMB_COM_NO_ANDX_COMMAND;
-  msg.max_buffer_size = smb_swap32(MAX_MESSAGE_SIZE);
+  msg.max_buffer_size = smb_swap16(MAX_MESSAGE_SIZE);
   msg.max_mpx_count = smb_swap16(1);
   msg.vc_number = smb_swap16(1);
   msg.session_key = smb_swap32(smbc->session_key);