PR_CreateProcess() function drops empty string parameters

RESOLVED FIXED in 4.7

Status

defect
RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: aleksey, Assigned: wtc)

Tracking

other
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

13 years ago
E.g. there is no way to execute the following command line:

something.exe "" something.txt

because assembleCmdLine() function in ntmisc.c file creates the following command line:

something.exe  something.txt

The patch is coming.
Reporter

Comment 1

13 years ago
Posted patch Patch (obsolete) — Splinter Review
Reporter

Updated

13 years ago
Attachment #218094 - Flags: review?
Assignee

Comment 2

13 years ago
Comment on attachment 218094 [details] [diff] [review]
Patch 

r=wtc.  Thanks for the patch.  Have you tested this patch?
(I may be too busy to test the patch.)

>+        if ((**arg) == '\0' || strpbrk(*arg, " \f\n\r\t\v")) {
>             argNeedQuotes = 1;
>         }

I'm curious why you put parentheses around **arg.
Attachment #218094 - Flags: review? → review+
Reporter

Comment 3

13 years ago
hm... it looks better? :) yes, I did test it though not very extensivly.
Assignee

Updated

13 years ago
Target Milestone: --- → 4.7
QA Contact: wtchang → nspr
is this ready for check in?
Assignee

Comment 5

12 years ago
Yes, it is.  Sorry, I forgot to check in this patch.

I just checked in this patch on the NSPR trunk for NSPR 4.7.

Checking in ntmisc.c;
/cvsroot/mozilla/nsprpub/pr/src/md/windows/ntmisc.c,v  <--  ntmisc.c
new revision: 3.22; previous revision: 3.21
done
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee

Comment 6

12 years ago
Attachment #218094 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.