Page MenuHome

Win32: WM_SETTINGCHANGE lParam Check for NULL
ClosedPublic

Authored by Harley Acheson (harley) on May 6 2022, 12:17 AM.

Details

Summary

Check that lParam is non-NULL in WM_SETTINGCHANGE message handler.


rBddbac88c08ef added a handler for WM_SETTINGCHANGE that does a string compare. Unfortunately it causes an access violation if lParam is NULL. According to Microsoft documentation "Note that some applications send this message with lParam set to NULL. This patch just adds a null check.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.May 6 2022, 12:17 AM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) edited the summary of this revision. (Show Details)
Harley Acheson (harley) retitled this revision from Win32: WM_SETTINGCHANGE lParam Check for Zero to Win32: WM_SETTINGCHANGE lParam Check for NULL.
Harley Acheson (harley) edited the summary of this revision. (Show Details)

Changed the comparison to be against NULL, not 0, since lParam is LONG_PTR

This revision is now accepted and ready to land.May 6 2022, 12:33 AM