Commit 0eb29c7357f744088a6e6f275ac439b7a7071d25

Authored by m-holger
1 parent 0663f1f8

If Pl_Flate memory limit is exceeded do not attempt 'finish' processing

Showing 1 changed file with 3 additions and 0 deletions
libqpdf/Pl_Flate.cc
... ... @@ -204,6 +204,9 @@ Pl_Flate::handleData(unsigned char const* data, size_t len, int flush)
204 204 void
205 205 Pl_Flate::finish()
206 206 {
  207 + if (m->written > memory_limit) {
  208 + return;
  209 + }
207 210 try {
208 211 if (m->outbuf.get()) {
209 212 if (m->initialized) {
... ...