http://bugs.winehq.org/show_bug.cgi?id=7834
------- Additional Comments From mikolaj.zalewski@gmail.com 2007-25-03 05:15 ------- The patch looks fine. However it would be nice and should be easy to add a test case to dlls/version/tests to make sure that Windows rejects truncated keys. You could also test if it's only the last keys in the path that can't be truncated. If that for all of them then replacing the condition with a simpler one:
if ( !strncasecmp( child->szKey, szKey, cbKey ) ) if ( szKey[cbKey] == 0 || szKey[cbKey] == '\' ) return child;
should work. When you have this all I'd also recomend to send it to wine-patches.