10 Jul
2017
10 Jul
'17
10:57 a.m.
Jactry Zeng <jactry92(a)gmail.com> writes:
2017-07-10 17:32 GMT+08:00 Alexandre Julliard <julliard(a)winehq.org>:
That's also tested already, in test_hkey_main_Value_A/W.
Aha! Yes, you are right. That was tested. So RegQueryValueExW will not add a NULL terminator all the time, and setting a length with NULL terminator for RegSetValueExW is necessary when using a same buffer for many RegQueryValueExW call.
In general it would be more robust to check the length from RegQueryValueExW. Fixing the setting side doesn't guarantee anything since it could be changed by some other piece of code. -- Alexandre Julliard julliard(a)winehq.org