Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
qpdf.25786
qpdf-CVE-2021-36978.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qpdf-CVE-2021-36978.patch of Package qpdf.25786
Index: qpdf-9.0.2/libqpdf/Pl_AES_PDF.cc =================================================================== --- qpdf-9.0.2.orig/libqpdf/Pl_AES_PDF.cc +++ qpdf-9.0.2/libqpdf/Pl_AES_PDF.cc @@ -265,6 +265,6 @@ Pl_AES_PDF::flush(bool strip_padding) } } } - getNext()->write(this->outbuf, bytes); this->offset = 0; + getNext()->write(this->outbuf, bytes); } Index: qpdf-9.0.2/libqpdf/Pl_ASCII85Decoder.cc =================================================================== --- qpdf-9.0.2.orig/libqpdf/Pl_ASCII85Decoder.cc +++ qpdf-9.0.2/libqpdf/Pl_ASCII85Decoder.cc @@ -119,10 +119,13 @@ Pl_ASCII85Decoder::flush() QTC::TC("libtests", "Pl_ASCII85Decoder partial flush", (this->pos == 5) ? 0 : 1); - getNext()->write(outbuf, this->pos - 1); - + // Reset before calling getNext()->write in case that throws an + // exception. + auto t = this->pos - 1; this->pos = 0; memset(this->inbuf, 117, 5); + + getNext()->write(outbuf, t); } void Index: qpdf-9.0.2/libqpdf/Pl_ASCIIHexDecoder.cc =================================================================== --- qpdf-9.0.2.orig/libqpdf/Pl_ASCIIHexDecoder.cc +++ qpdf-9.0.2/libqpdf/Pl_ASCIIHexDecoder.cc @@ -97,12 +97,14 @@ Pl_ASCIIHexDecoder::flush() QTC::TC("libtests", "Pl_ASCIIHexDecoder partial flush", (this->pos == 2) ? 0 : 1); - getNext()->write(&ch, 1); - + // Reset before calling getNext()->write in case that throws an + // exception. this->pos = 0; this->inbuf[0] = '0'; this->inbuf[1] = '0'; this->inbuf[2] = '\0'; + + getNext()->write(&ch, 1); } void Index: qpdf-9.0.2/libqpdf/Pl_Count.cc =================================================================== --- qpdf-9.0.2.orig/libqpdf/Pl_Count.cc +++ qpdf-9.0.2/libqpdf/Pl_Count.cc @@ -27,8 +27,8 @@ Pl_Count::write(unsigned char* buf, size if (len) { this->m->count += QIntC::to_offset(len); - getNext()->write(buf, len); this->m->last_char = buf[len - 1]; + getNext()->write(buf, len); } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor