Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-20231

NtGdiCreateHalftonePalette should not attempt lock if HDC is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 0.4.17
    • Win32SS
    • None

    Description

      (from Mattermost chat)
      __
      mshtml.dll calls shlwapi's CreateHalftonePalette(NULL);, that calls win32's NtGdiCreateHalftonePalette(NULL) - https://github.com/reactos/reactos/blob/master/win32ss/gdi/ntgdi/palette.c#L526
      It tries to lock the null (and unused along all the function body) HDC, fails and returns ERROR_INVALID_HANDLE;
      That seems to abort the loading of the dll - wine (and potentially Windows) does not try to loc the null HDC.

      With the check, the DLL loads successfully.
      __

      Attached patch that check that perform null check for HDC.

      I'm trying to run IE8 on ReactOS so I can have a IE frame with active X (like that iwebbrowser2 that opens Corel Photo shop) 
       
      Using MS HTML engine - I replaced

      • urlmon.dll, ieframe.dll and mshtml.dll
      • added the null pointer check for NtGdiCreateHalftonePalette
      • added TabProcGrowth feature set to 0 like wine

      Attachments

        Activity

          People

            Unassigned Unassigned
            simonelombardo simonelombardo
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: