From 77217860fdd3fcf348129cb9fb68d73ce6e70644 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Fri, 11 Sep 2009 19:57:04 +0400 Subject: [PATCH] s4: Fix parsing of CSDVersion: treat this field as an string null terminated. CDSVersion field contains one utf16 string and then garbage which pertubated the parsing. We use subcontext to clearly define the size of the whole blob and then let the parser to find the real length of the string. This is a fix for bug 6706, many thanks to Gunter for the PIDL guidelines. --- librpc/idl/netlogon.idl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/librpc/idl/netlogon.idl b/librpc/idl/netlogon.idl index 34081e2..1cc0f2b 100644 --- a/librpc/idl/netlogon.idl +++ b/librpc/idl/netlogon.idl @@ -1287,7 +1287,7 @@ interface netlogon uint32 MinorVersion; uint32 BuildNumber; uint32 PlatformId; - [charset(UTF16)] uint16 CSDVersion[128]; + [subcontext(0),subcontext_size(256)] nstring CSDVersion; uint16 ServicePackMajor; uint16 ServicePackMinor; netr_SuiteMask SuiteMask; @@ -1372,7 +1372,7 @@ interface netlogon uint32 dummy_long4; } netr_OneDomainInfo; - typedef [public,bitmap32bit] bitmap { + typedef [public,bitmap32bit] bitmap { ENC_CRC32 = 0x00000001, ENC_RSA_MD5 = 0x00000002, ENC_RC4_HMAC_MD5 = 0x00000004, -- 1.6.0.4