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

Shortcuts execute non-EXE targets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 0.4.15
    • Shell

    Description

      0.4.15-dev-3780-gbf16435-x86-gcc-lin-dbg

      Opening a shortcut seems to try and execute the target file regardless of the extension.

      The quickest way to replicate this is to open the "Read Me" shortcut on the desktop and watch the debug log for:

      (/dll/win32/kernel32/client/proc.c:3417) '\??\X:\reactos\readme.txt': Invalid EXE, and not a batch or script file

      This works for more than just the readme. If you rename an executable to an innocuous extension like ".txt" and create a shortcut to it, opening the shortcut will run the disguised program instead of the expected text editor.

       

      The attached patch corrects the behavior of "Run" and shortcuts by checking the file's extension in SHELL_execute before trying to create a process out of it.

       

      https://github.com/reactos/reactos/pull/4363

      Attachments

        Issue Links

          Activity

            People

              hbelusca hbelusca
              AlexM AlexMiccolis
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: