<i18n dev> RFR: 8232846: ProcessHandle.Info command with non-English shows question marks
Toshio 5 Nakamura
TOSHIONA at jp.ibm.com
Thu Mar 26 14:40:16 UTC 2020
Hi Thomas, Suenaga-san, Roger,
Thank you for reviewing and comments.
I checked behaviors by a small program and debugger.
If QueryFullProcessImageNameW failed by not enough buffer,
the API didn't change the buffer.
It just set ERROR_INSUFFICIENT_BUFFER(0x7a) to LastError.
The buffer size becomes 1024 characters (2048 bytes) by this patch.
Should it use bigger size with malloc? 32,767 characters can be limit .
I feel 1024 is reasonable value for command's location.
> If the call fails, the command field in the info will not be set (and
> therefore null).
> I agree that a length of 512 (characters) is probably too small.
> On 3/26/20 6:37 AM, Yasumasa Suenaga wrote:
> > Hi Nakamura-san,
> > Your change almost looks good, but I have one question.
> > Length of exeName (1024) is enough?
> > According to Microsoft Doc , exeName might not be null-terminated
> > if it failed.
> > I concern buffer overrun might occur when QueryFullProcessImageNameW
> > failed.
> > Thanks,
> > Yasumasa
> > 
> > On 2020/03/26 17:58, Toshio 5 Nakamura wrote:
> >> Hi All,
> >> Could you review this change? Additionally, I'd like to ask a sponsor
> >> for
> >> it, since I'm not a committer.
> >> Bug:
> >> Webrev:
> >> Under Windows environments, ProcessHandle.Info.command shows question
> >> marks
> >> if the command has non-English characters. I'd like to change the
> >> underlying API to Unicode version.
> >> Tier1 tests passed.
> >> Best regards,
> >> Toshio Nakamura
More information about the i18n-dev