From aa92e1ddb2bc18b45f9d2a09235beaa9da9ac006 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Mon, 9 Mar 2009 15:16:19 +0000 Subject: fix table full check again git-svn-id: svn+q:///qpdf/trunk@662 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 4ab4c16d..25cfdc9a 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 == 4097) + if (last_idx == 4096) { throw QEXC::General("LZWDecoder: table full"); } -- cgit v1.2.3-54-g00ecf