Closed Bug 331818 Opened 19 years ago Closed 19 years ago

xpidl crashes when no file name is given on the command line

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: glandium, Assigned: glandium)

Details

(Keywords: crash)

Attachments

(1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.8.0.1) Gecko/20060313 Debian/1.5.dfsg+1.5.0.1-4 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.8.0.1) Gecko/20060313 Debian/1.5.dfsg+1.5.0.1-4 Firefox/1.5.0.1 Everything is in the summary Reproducible: Always
Attached patch Patch (obsolete) — Splinter Review
- Quit with an error message instead of crashing. - Don't show the "extra arguments after input file" message when there's neither extra argument not input file.
Attachment #216374 - Flags: review?(dbradley)
Attachment #216374 - Flags: superreview?(shaver)
Attachment #216374 - Flags: review?(dbradley)
Attachment #216374 - Flags: review+
Confirmed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash
We should consolidate the error checking to something like below. It makes it clear what you're doing than the current patch. /* Check for invalid command line */ if (argc > i + 1) { fprintf(stderr, "ERROR: extra arguments after input file\n"); } else if (argc == i) { fprintf(stderr, "ERROR: no file to process\n"); }
Comment on attachment 216374 [details] [diff] [review] Patch sr=shaver
Attachment #216374 - Flags: superreview?(shaver) → superreview+
Comment on attachment 216374 [details] [diff] [review] Patch mozilla/xpcom/typelib/xpidl/xpidl.c 1.38
Attachment #216374 - Attachment is obsolete: true
Assignee: dbradley → mh+mozilla
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Component: xpidl → XPCOM
QA Contact: pschwartau → xpcom
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: