Closed Bug 429707 Opened 17 years ago Closed 17 years ago

nsPrintSettingsGTK needs error handling for invalid file names

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

Details

(Keywords: crash)

Attachments

(1 file)

The first testcase in bug 429678 leads to a crash on Linux because it sets "printSettings.toFileName = 'C:\\test.pdf';" and nsPrintSettingsGTK doesn't check for errors when trying to open the file. Patch coming up...
Attached patch Patch rev. 1Splinter Review
Add a bit of error handling... This results in a NS_ERROR_FILE_UNRECOGNIZED_PATH exception in the Error Console for the testcase, which is the expected result.
Attachment #316475 - Flags: superreview?
Attachment #316475 - Flags: review?
Attachment #316475 - Flags: superreview?(roc)
Attachment #316475 - Flags: superreview?
Attachment #316475 - Flags: review?(roc)
Attachment #316475 - Flags: review?
Keywords: crash
Attachment #316475 - Flags: superreview?(roc)
Attachment #316475 - Flags: superreview+
Attachment #316475 - Flags: review?(roc)
Attachment #316475 - Flags: review+
Comment on attachment 316475 [details] [diff] [review] Patch rev. 1 Add error handling to stop crashes.
Attachment #316475 - Flags: approval1.9?
Comment on attachment 316475 [details] [diff] [review] Patch rev. 1 a1.9=beltzner
Attachment #316475 - Flags: approval1.9? → approval1.9+
mozilla/widget/src/gtk2/nsPrintSettingsGTK.cpp 1.11 -> FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: