Module: wine Branch: refs/heads/master Commit: ec6a5175b4e56e17e866291610bd8bdef270ee29 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ec6a5175b4e56e17e8662916...
Author: Hans Leidekker hans@it.vu.nl Date: Sun Apr 9 10:31:18 2006 +0200
ntdll: The closing brace of a guid string is at index 37.
---
dlls/ntdll/rtlstr.c | 2 +- dlls/ntdll/tests/rtlstr.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index dab5bc8..75ff360 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -1997,7 +1997,7 @@ NTSTATUS WINAPI RtlGUIDFromString(PUNICO /* Convert string: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} * to memory: DWORD... WORD WORD BYTES............ */ - while (i < 37) + while (i <= 37) { switch (i) { diff --git a/dlls/ntdll/tests/rtlstr.c b/dlls/ntdll/tests/rtlstr.c index 84bf83d..9afe9aa 100644 --- a/dlls/ntdll/tests/rtlstr.c +++ b/dlls/ntdll/tests/rtlstr.c @@ -1672,6 +1672,9 @@ static void test_RtlIntegerToChar(void) static const WCHAR szGuid[] = { '{','0','1','0','2','0','3','0','4','-', '0','5','0','6','-' ,'0','7','0','8','-','0','9','0','A','-', '0','B','0','C','0','D','0','E','0','F','0','A','}','\0' }; +static const WCHAR szGuid2[] = { '{','0','1','0','2','0','3','0','4','-', + '0','5','0','6','-' ,'0','7','0','8','-','0','9','0','A','-', + '0','B','0','C','0','D','0','E','0','F','0','A',']','\0' }; DEFINE_GUID(IID_Endianess, 0x01020304, 0x0506, 0x0708, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x0A);
@@ -1687,6 +1690,12 @@ static void test_RtlGUIDFromString(void) ret = pRtlGUIDFromString(&str, &guid); ok(ret == 0, "expected ret=0, got 0x%0lx\n", ret); ok(memcmp(&guid, &IID_Endianess, sizeof(guid)) == 0, "Endianess broken\n"); + + str.Length = str.MaximumLength = (sizeof(szGuid2) - 1) / sizeof(WCHAR); + str.Buffer = (LPWSTR)szGuid2; + + ret = pRtlGUIDFromString(&str, &guid); + ok(ret, "expected ret!=0\n"); }
static void test_RtlStringFromGUID(void)