Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8299340

CreateProcessW lpCommandLine must be mutable

XMLWordPrintable

    • b23
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      processCreate in ProcessImpl_md.c passes a const jchar* for lpCommandLine which is obtained from GetStringChars(), perhaps without making a copy, however CreateProcessW() can modify it.

      From the CreateProcessW docs:

      The Unicode version of this function, CreateProcessW, can modify the contents of this string. Therefore, this parameter cannot be a pointer to read-only memory (such as a const variable or a literal string). If this parameter is a constant string, the function may cause an access violation.


            rriggs Roger Riggs
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: