Closed Bug 2431 Opened 26 years ago Closed 26 years ago

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

Categories

(NSPR :: NSPR, defect, P2)

defect

Tracking

(Not tracked)

CLOSED FIXED

People

(Reporter: wtc, Assigned: wtc)

Details

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.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
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.
QA Contact: 80
spider set as qa contact to verify
Status: RESOLVED → VERIFIED
Status: VERIFIED → CLOSED
Closed the bug.
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.