https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1a231e1e70472d7f1a3e1…
commit 1a231e1e70472d7f1a3e1d1b498dedaedf864a54
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Jan 15 01:10:28 2020 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Jan 15 01:14:03 2020 +0100
[SDK:ATL] Fix the size of the ATL_WNDCLASSINFOW::m_szAutoName member according to the
actual MS-compatible auto-generated window class name.
The autogenerated name has the format:
"ATL:<hexadecimal_digits_of_pointer><NULL-terminator>"
and the number of hex digits in 0xABCD1234 (for 32-bit == 4-byte)
pointers (without the '0x') is 8 == 4*2, and for 64-bit == 8-byte
pointers (e.g. 0xABCDEF0123456789) is 16 == 8*2.
---
sdk/lib/atl/atlwin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h
index 3539c13afaf..c35c936acab 100644
--- a/sdk/lib/atl/atlwin.h
+++ b/sdk/lib/atl/atlwin.h
@@ -1893,7 +1893,7 @@ struct _ATL_WNDCLASSINFOW
LPCWSTR m_lpszCursorID;
BOOL m_bSystemCursor;
ATOM m_atom;
- WCHAR m_szAutoName[5 + sizeof(void *)];
+ WCHAR m_szAutoName[sizeof("ATL:") + sizeof(void *) * 2]; // == 4 characters
+ NULL + number of hexadecimal digits describing a pointer.
ATOM Register(WNDPROC *p)
{