From 8bd09112812f1f0579b9c95e819540d2c6be6e4d Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 8 Mar 2009 18:58:22 +0000 Subject: push boundary of table full error out one more code -- seems consistent with other implementations and is required for one PDF file in the test suite git-svn-id: svn+q:///qpdf/trunk@656 71b93d88-0707-0410-a8cf-f5a4172ac649 --- libqpdf/Pl_LZWDecoder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libqpdf') diff --git a/libqpdf/Pl_LZWDecoder.cc b/libqpdf/Pl_LZWDecoder.cc index 95dcec37..4ab4c16d 100644 --- a/libqpdf/Pl_LZWDecoder.cc +++ b/libqpdf/Pl_LZWDecoder.cc @@ -199,7 +199,7 @@ Pl_LZWDecoder::handleCode(int code) } } unsigned int last_idx = 258 + table_size; - if (last_idx + code_change_delta == 4096) + if (last_idx + code_change_delta == 4097) { throw QEXC::General("LZWDecoder: table full"); } -- cgit v1.2.3-54-g00ecf