PL_GetNextOpt asserts if an option with an associated value is not immediately followed by its value.

CLOSED FIXED

Status

NSPR
NSPR
P2
normal
CLOSED FIXED
20 years ago
19 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

20 years ago
This bug is reported by Greg Scallan <spider@netscape.com>.

Suppose we have a command line option 'i' that has an associated
value.  It is specified as "i:" in the third parameter for
PL_CreateOptState, and we would type "-i string" on the command
line.

If we accidentally type "-im string" on the command line,
PL_GetNextOpt asserts.  While "-im string" is indeed malformed,
an assertion failure is not an appropriate response.  Instead,
PL_GetNextOpt should return PL_OPT_BAD to indicate that the
option is invalid.
(Assignee)

Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 1

20 years ago
Fixed on the tip.
/cvsroot/mozilla/nsprpub/lib/libc/src/plgetopt.c, revision 3.2.

Also fixed in the internal cvs repository.
/m/src/ns/nspr20/lib/libc/src/plgetopt.c, revision 2.2.

Updated

20 years ago
QA Contact: 80

Comment 2

20 years ago
spider set as qa contact to verify

Updated

20 years ago
Status: RESOLVED → VERIFIED
(Assignee)

Updated

20 years ago
Status: VERIFIED → CLOSED
(Assignee)

Comment 3

20 years ago
Closed the bug.

Comment 4

19 years ago
NSPR now has its own Bugzilla product.  Moving this bug to the NSPR product.
You need to log in before you can comment on or make changes to this bug.