Bug 691171

Summary: tiffg3 device segfaults on close if open failed
Product: Ghostscript Reporter: Tim Waugh <twaugh>
Component: Other DriverAssignee: Lars Uebernickel <lars>
Status: RESOLVED FIXED    
Severity: normal CC: josh.townzen
Priority: P4    
Version: 8.71   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: ghostscript-tif-fail-close.patch

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. ***