No subject


Thu Nov 15 09:34:07 CST 2007


process activation context when it shouldn't
(dlls/ntdll/actctx.c:RtlQueryInformationActivationContext() ->
find_query_actctx()).

.NET crashes while doing some operations on the returned context.

The culprit seems to be calls like this:

QueryActCtxW -> RtlQueryInformationActivationContext( dwFlags = 0, hActCtx =
NULL, pvSubInstance = NULL, ulInfoClass = ActivationContextBasicInformation,
buf, sizeof(buf), &required_size);

Unfortunately MSDN doesn't tell anything about this case,
ActivationContextBasicInformation class isn't documented at all.
I wrote some tests which call this function with
ActivationContextBasicInformation class and permutated args.

The function succeeds in Windows XP Sp2 (returns TRUE) and initializes the
ACTIVATION_CONTEXT_BASIC_INFORMATION structure members to zero (preinit magic
numbers for each struct member to detect any explicit init by internal API) and
sets required size to sizeof(ACTIVATION_CONTEXT_BASIC_INFORMATION) == 8.

Attached patch fixes the problem by not returning default activation context
for ActivationContextBasicInformation info class when none of dwFlags bits are
set or input handle is NULL.
Although the patch fixes the crash, the calls with
ActivationContextBasicInformation class need some test cases to qualify for GIT
... I leave this as exercise to someone else - as usual ;-)

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list