An issue was discovered in QPDF before 7.0.0. There is an infinite loop in the QPDFWriter::enqueueObject() function in libqpdf/QPDFWriter.cc.
https://usn.ubuntu.com/3638-1/
https://github.com/qpdf/qpdf/issues/143
https://github.com/qpdf/qpdf/commit/8249a26d69f72b9cda584c14cc3f12769985e481