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

Crash in comdlg32!PrintDlgW when opening wordpad

    XMLWordPrintable

Details

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

    Description

      kd> kp
      ChildEBP RetAddr  
      0012fd9c 00402728 comdlg32!PrintDlgW(struct tagPDW * lppd = 0x0012fdb0)+0x3b0 [c:\ros\reactos\reactos\dll\win32\comdlg32\printdlg.c @ 2426]
      0012fdf8 00409786 wordpad!get_default_printer_opts(void)+0x58 [c:\ros\reactos\reactos\base\applications\wordpad\print.c @ 535]
      0012feb4 0040fc40 wordpad!WinMain(struct HINSTANCE__ * hInstance = 0x00400000, struct HINSTANCE__ * hOldInstance = 0x00000000, char * szCmdParagraph = 0x00133f21 "", int nCmdShow = 0n1)+0x1f6 [c:\ros\reactos\reactos\base\applications\wordpad\wordpad.c @ 2704]
      0012fecc 0040f90a wordpad!main(int flags = 0n1, char ** cmdline = 0x00138558, char ** inst = 0x00131c60)+0x20 [c:\ros\reactos\reactos\sdk\lib\crt\startup\crt0_c.c @ 22]
      0012ffb4 0040f588 wordpad!__tmainCRTStartup(void)+0x2ba [c:\ros\reactos\reactos\sdk\lib\crt\startup\crtexe.c @ 311]
      0012ffc0 7c773a34 wordpad!WinMainCRTStartup(void)+0x28 [c:\ros\reactos\reactos\sdk\lib\crt\startup\crtexe.c @ 168]
      0012fff0 00000000 kernel32!BaseProcessStartup(<function> * lpStartAddress = 0x0040f560)+0x54 [c:\ros\reactos\reactos\dll\win32\kernel32\client\proc.c @ 478]

      It crashes with a NULL pbuf, because 'needed' is uninitialized and thus 0xcccccccc. This causes HeapAlloc to fail. The reason it is uninitialized is that GetPrinterW fails with an ERROR_INVALID_HANDLE exception. rpcrt4 prints:

      err:(..\dll\win32\rpcrt4\ndr_contexthandle.c:86) invalid handle 001415D8

      cc colin finck

      Attachments

        Issue Links

          Activity

            People

              Colin Finck Colin Finck
              ThFabba ThFabba
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: