[NTOS:EX] Only set WakeTimer-related status if timer handle is valid. CORE-18133

Since STATUS_TIMER_RESUME_IGNORED is a success status, we would
otherwise go into the success case with a NULL Timer object pointer.
This commit is contained in:
Thomas Faber 2022-04-03 20:10:37 -04:00
parent 6f559e9c54
commit 7d1a497619
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -640,7 +640,10 @@ NtSetTimer(IN HANDLE TimerHandle,
* functionality required to support them, make this check dependent * functionality required to support them, make this check dependent
* on the actual PM capabilities * on the actual PM capabilities
*/ */
if (WakeTimer) Status = STATUS_TIMER_RESUME_IGNORED; if (NT_SUCCESS(Status) && WakeTimer)
{
Status = STATUS_TIMER_RESUME_IGNORED;
}
/* Check status */ /* Check status */
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))