libtiff: Fix a couple more tiff2pdf bugs.

https://github.com/libsdl-org/libtiff/commit/84a38e89b6727da45a69980274bf98b76d592b05

From 84a38e89b6727da45a69980274bf98b76d592b05 Mon Sep 17 00:00:00 2001
From: Tom Lane <[EMAIL REDACTED]>
Date: Thu, 19 Jul 2012 15:43:31 +0000
Subject: [PATCH] Fix a couple more tiff2pdf bugs.

---
 ChangeLog        | 6 ++++++
 tools/tiff2pdf.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0fc67737..c1bb280d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-19  Tom Lane  <tgl@sss.pgh.pa.us>
+
+	* tools/tiff2pdf.c: Fix two places where t2p_error didn't get set
+	after a malloc failure.  No crash risk AFAICS, but the program
+	might not report exit code 1 as desired.  h/t mancha@mac.hush.com
+
 2012-07-18  Tom Lane  <tgl@sss.pgh.pa.us>
 
 	* tools/tiff2pdf.c: Fail when TIFFSetDirectory() fails.  This
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
index e2afe103..dee64358 100644
--- a/tools/tiff2pdf.c
+++ b/tools/tiff2pdf.c
@@ -1,4 +1,4 @@
-/* $Id: tiff2pdf.c,v 1.37.2.21 2012-07-18 15:08:09 tgl Exp $
+/* $Id: tiff2pdf.c,v 1.37.2.22 2012-07-19 15:43:31 tgl Exp $
  *
  * tiff2pdf - converts a TIFF image to a PDF document
  *
@@ -3178,6 +3178,7 @@ int t2p_process_ojpeg_tables(T2P* t2p, TIFF* input){
 			"Can't allocate %u bytes of memory for t2p_process_ojpeg_tables, %s", 
 			2048, 
 			TIFFFileName(input));
+		t2p->t2p_error = T2P_ERR_ERROR;
 		return(0);
 	}
 	_TIFFmemset(t2p->pdf_ojpegdata, 0x00, 2048);
@@ -5225,6 +5226,7 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
 			TIFF2PDF_MODULE, 
 			"Can't allocate %u bytes of memory for t2p_write_pdf", 
 			t2p->pdf_xrefcount * sizeof(uint32) );
+		t2p->t2p_error = T2P_ERR_ERROR;
 		return(written);
 	}
 	t2p->pdf_xrefcount=0;