Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
poppler.34110
poppler-CVE-2018-19060.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File poppler-CVE-2018-19060.patch of Package poppler.34110
Index: poppler-0.43.0/utils/pdfdetach.cc =================================================================== --- poppler-0.43.0.orig/utils/pdfdetach.cc +++ poppler-0.43.0/utils/pdfdetach.cc @@ -187,14 +187,18 @@ int main(int argc, char *argv[]) { fileSpec = static_cast<FileSpec *>(embeddedFiles->get(i)); printf("%d: ", i+1); s1 = fileSpec->getFileName(); - if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) { + if (!s1) { + exitCode = 3; + goto err2; + } + if (s1->hasUnicodeMarker()) { isUnicode = gTrue; j = 2; } else { isUnicode = gFalse; j = 0; } - while (j < fileSpec->getFileName()->getLength()) { + while (j < s1->getLength()) { if (isUnicode) { u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff); j += 2; @@ -224,14 +228,18 @@ int main(int argc, char *argv[]) { p = path; } s1 = fileSpec->getFileName(); - if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) { + if (!s1) { + exitCode = 3; + goto err2; + } + if (s1->hasUnicodeMarker()) { isUnicode = gTrue; j = 2; } else { isUnicode = gFalse; j = 0; } - while (j < fileSpec->getFileName()->getLength()) { + while (j < s1->getLength()) { if (isUnicode) { u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff); j += 2; @@ -267,14 +275,18 @@ int main(int argc, char *argv[]) { } else { p = path; s1 = fileSpec->getFileName(); - if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) { + if (!s1) { + exitCode = 3; + goto err2; + } + if (s1->hasUnicodeMarker()) { isUnicode = gTrue; j = 2; } else { isUnicode = gFalse; j = 0; } - while (j < fileSpec->getFileName()->getLength()) { + while (j < s1->getLength()) { if (isUnicode) { u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff); j += 2;
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