Make use of smb_bufrem()
authorVolker Lendecke <vl@samba.org>
Sat, 1 Nov 2008 15:09:02 +0000 (16:09 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 1 Nov 2008 18:41:07 +0000 (19:41 +0100)
source3/libsmb/cliconnect.c

index 6b4798e492f6bb973c9767fcb7c46b6ea6e593bc..1588ae3efe091f6b9d151ea5b1b5e33600c17443 100644 (file)
@@ -516,7 +516,7 @@ static DATA_BLOB cli_session_setup_blob_receive(struct cli_state *cli)
        p += clistr_pull(cli, cli->server_os, p, sizeof(fstring), -1, STR_TERMINATE);
 
        /* w2k with kerberos doesn't properly null terminate this field */
-       len = smb_buflen(cli->inbuf) - PTR_DIFF(p, smb_buf(cli->inbuf));
+       len = smb_bufrem(cli->inbuf, p);
        p += clistr_pull(cli, cli->server_type, p, sizeof(fstring), len, 0);
 
        return blob2;