diff options
author | Jay Berkenbilt <ejb@ql.org> | 2012-09-06 20:39:06 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2012-09-06 20:39:06 +0200 |
commit | 8d2b29ef988aa86489e36be50fa881335b81363e (patch) | |
tree | bb8b5a589f4241b01df696684ce8c891aeb0d054 /libqpdf | |
parent | b51a5b2c09dc679917f62f932ab373b3c397126e (diff) | |
download | qpdf-8d2b29ef988aa86489e36be50fa881335b81363e.tar.zst |
Fix segmentation fault with use of QPDFWriter::setOutputMemory
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDFWriter.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index c244cf30..19ab1359 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -120,6 +120,7 @@ QPDFWriter::setOutputFile(char const* description, FILE* file, bool close_file) void QPDFWriter::setOutputMemory() { + this->filename = "memory buffer"; this->buffer_pipeline = new Pl_Buffer("qpdf output"); to_delete.push_back(this->buffer_pipeline); initializePipelineStack(this->buffer_pipeline); @@ -1492,7 +1493,7 @@ QPDFWriter::generateID() std::string seed; seed += QUtil::int_to_string((int)QUtil::get_current_time()); seed += " QPDF "; - seed += filename; + seed += this->filename; seed += " "; if (trailer.hasKey("/Info")) { |