ntlmssp: when pushing an ntlmssp NEGOTIATE_MESSAGE deal with NULL strings.
authorGünther Deschner <gd@samba.org>
Tue, 14 Sep 2010 15:57:23 +0000 (17:57 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 14 Sep 2010 16:00:30 +0000 (18:00 +0200)
Guenther

librpc/idl/ntlmssp.idl

index e26dc31598786f6d98cd79352e03de2f48a2c911..b9be7daea770142b0d72a21ee23f01045d78218a 100644 (file)
@@ -105,10 +105,10 @@ interface ntlmssp
                [charset(DOS),value("NTLMSSP")] uint8 Signature[8];
                [value(NtLmNegotiate)] ntlmssp_MessageType MessageType;
                NEGOTIATE NegotiateFlags;
-               [value(strlen(DomainName))] uint16 DomainNameLen;
+               [value(DomainName ? strlen(DomainName) : 0)] uint16 DomainNameLen;
                [value(DomainNameLen)] uint16 DomainNameMaxLen;
                [relative] [subcontext(0),subcontext_size(DomainNameLen)] [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM))] string *DomainName;
-               [value(strlen(Workstation))] uint16 WorkstationLen;
+               [value(Workstation ? strlen(Workstation) : 0)] uint16 WorkstationLen;
                [value(WorkstationLen)] uint16 WorkstationMaxLen;
                [relative] [subcontext(0),subcontext_size(WorkstationLen)] [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM))] string *Workstation;
                [switch_is(NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)] ntlmssp_Version Version;