Bug 691171 - tiffg3 device segfaults on close if open failed
Summary: tiffg3 device segfaults on close if open failed
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Other Driver (show other bugs)
Version: 8.71
Hardware: PC Linux
: P4 normal
Assignee: Lars Uebernickel
URL:
Keywords:
: 691447 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-12 12:13 UTC by Tim Waugh
Modified: 2010-07-19 05:18 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
ghostscript-tif-fail-close.patch (486 bytes, application/octet-stream)
2010-03-12 12:13 UTC, Tim Waugh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Waugh 2010-03-12 12:13:18 UTC
Created attachment 6054 [details]
ghostscript-tif-fail-close.patch

If opening the output device for tiffg3 fails for any reason, we segfault in tfax_close() because of a missing NULL check before calling TIFFCleanup().

Original bug report:
  https://bugzilla.redhat.com/show_bug.cgi?id=571520
Comment 1 Lars Uebernickel 2010-03-15 07:52:39 UTC
Applied the patch as r10924.

Since all the devices in gdevtfax.c share the same closing function, this bug applied to all of them.  However, this was the only call to TIFFCleanup were the NULL check was missing, so none of the devices outside of gdevtfax.c were affected.

Thanks Tim!
Comment 2 Marcos H. Woehrmann 2010-07-19 05:18:26 UTC
*** Bug 691447 has been marked as a duplicate of this bug. ***