EnumDisplayMonitors

Forum for discussion about user-mode development.
Post Reply
User avatar
EP_X0FF
Global Moderator
Posts: 4860
Joined: Sun Mar 07, 2010 5:35 am
Location: Russian Federation
Contact:

EnumDisplayMonitors

Post by EP_X0FF » Sat Jul 02, 2016 6:27 am

Hello,

was this API EnumDisplayMonitors always crashing into oblivion when called with invalid combination of params like

Code: Select all

EnumDisplayMonitors(0, 0, 0, 0);
or its new feature since Vista?

Expected result: the function fails and return zero.
Observed result: crash


Thanks.
Ring0 - the source of inspiration

User avatar
R136a1
Forum Admin
Posts: 218
Joined: Wed Jul 13, 2011 4:30 pm
Location: Netherlands

Re: EnumDisplayMonitors

Post by R136a1 » Sat Jul 02, 2016 8:26 am

Funny, there is not sanity check for the pointer of the callback function at all. Windows XP is also affected, probably nothing was done since its implementation in Windows 2000.

User avatar
EP_X0FF
Global Moderator
Posts: 4860
Joined: Sun Mar 07, 2010 5:35 am
Location: Russian Federation
Contact:

Re: EnumDisplayMonitors

Post by EP_X0FF » Sat Jul 02, 2016 9:06 am

Thanks for checking. I'm checking win32k, so far fun bsods generated and only this routine crashing so annoying during test.
Ring0 - the source of inspiration

Post Reply