Commit 9081ac69cdb209c45e7514d337b082181de390ca

Authored by m-holger
Committed by GitHub
2 parents 09492eea 18c52640

Merge pull request #1227 from m-holger/fuzz6

Refine #1225
Showing 1 changed file with 3 additions and 0 deletions
libqpdf/Pl_DCT.cc
... ... @@ -318,6 +318,9 @@ Pl_DCT::decompress(void* cinfo_p, Buffer* b)
318 318 // jpeg_start_decompress is called. During normal use of qpdf very large JPEGs can occasionally
319 319 // occur legitimately and therefore must be allowed during normal operations.
320 320 cinfo->mem->max_memory_to_use = 1'000'000'000;
  321 + // For some corrupt files the memory used internally by libjpeg stays within the above limits
  322 + // even though the size written to the next pipeline is significantly larger.
  323 + m->corrupt_data_limit = 100'000'000;
321 324 #endif
322 325 jpeg_buffer_src(cinfo, b);
323 326  
... ...