2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-23 03:18:59 +00:00

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

This commit is contained in:
m-holger 2024-08-09 11:08:30 +01:00
parent 0663f1f8db
commit 0eb29c7357

View File

@ -204,6 +204,9 @@ Pl_Flate::handleData(unsigned char const* data, size_t len, int flush)
void void
Pl_Flate::finish() Pl_Flate::finish()
{ {
if (m->written > memory_limit) {
return;
}
try { try {
if (m->outbuf.get()) { if (m->outbuf.get()) {
if (m->initialized) { if (m->initialized) {