2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-08 14:21:06 +00:00

Merge pull request #1227 from m-holger/fuzz6

Refine #1225
This commit is contained in:
m-holger 2024-06-30 01:50:36 +01:00 committed by GitHub
commit 9081ac69cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -318,6 +318,9 @@ Pl_DCT::decompress(void* cinfo_p, Buffer* b)
// jpeg_start_decompress is called. During normal use of qpdf very large JPEGs can occasionally
// occur legitimately and therefore must be allowed during normal operations.
cinfo->mem->max_memory_to_use = 1'000'000'000;
// For some corrupt files the memory used internally by libjpeg stays within the above limits
// even though the size written to the next pipeline is significantly larger.
m->corrupt_data_limit = 100'000'000;
#endif
jpeg_buffer_src(cinfo, b);