Commit 8bd09112812f1f0579b9c95e819540d2c6be6e4d
1 parent
3a7cab47
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
Showing
1 changed file
with
1 additions
and
1 deletions
libqpdf/Pl_LZWDecoder.cc
| @@ -199,7 +199,7 @@ Pl_LZWDecoder::handleCode(int code) | @@ -199,7 +199,7 @@ Pl_LZWDecoder::handleCode(int code) | ||
| 199 | } | 199 | } |
| 200 | } | 200 | } |
| 201 | unsigned int last_idx = 258 + table_size; | 201 | unsigned int last_idx = 258 + table_size; |
| 202 | - if (last_idx + code_change_delta == 4096) | 202 | + if (last_idx + code_change_delta == 4097) |
| 203 | { | 203 | { |
| 204 | throw QEXC::General("LZWDecoder: table full"); | 204 | throw QEXC::General("LZWDecoder: table full"); |
| 205 | } | 205 | } |