nsPrintSettingsGTK needs error handling for invalid file names

RESOLVED FIXED in mozilla1.9

Status

()

Core
Widget: Gtk
--
major
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: mats, Assigned: mats)

Tracking

({crash})

Trunk
mozilla1.9
x86
Linux
crash
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
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...
(Assignee)

Comment 1

10 years ago
Created attachment 316475 [details] [diff] [review]
Patch rev. 1

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?
(Assignee)

Updated

10 years ago
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+
(Assignee)

Comment 4

10 years ago
mozilla/widget/src/gtk2/nsPrintSettingsGTK.cpp 	1.11 

-> FIXED
Status: NEW → RESOLVED
Last Resolved: 10 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.