...
 
Commits (525)
changelog merge=dpkg-mergechangelogs
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
[DEFAULT]
debian-branch = master
pristine-tar = false
usr/lib/*/girepository-1.0/Poppler-0.18.typelib
usr/include/poppler/cpp
usr/lib/*/libpoppler-cpp.so
usr/lib/*/pkgconfig/poppler-cpp.pc
usr/lib/*/libpoppler-cpp.so.0*
poppler/*.h usr/include/poppler/
fofi/*.h usr/include/poppler/fofi/
goo/*.h usr/include/poppler/goo/
splash/*.h usr/include/poppler/splash/
debian/tmp/usr/lib/libpoppler.a
debian/tmp/usr/lib/libpoppler.so
debian/tmp/usr/lib/pkgconfig/poppler.pc
debian/tmp/usr/lib/pkgconfig/poppler-splash.pc
debian/tmp/usr/lib/pkgconfig/poppler-cairo.pc
usr/lib/*/libpoppler.so
usr/lib/*/pkgconfig/poppler.pc
usr/lib/*/pkgconfig/poppler-splash.pc
usr/lib/*/pkgconfig/poppler-cairo.pc
debian/tmp/usr/share/gtk-doc/html/poppler/ usr/share/doc/libpoppler-glib-dev/html/
debian/tmp/usr/include/poppler/glib/
debian/tmp/usr/lib/libpoppler-glib.a
debian/tmp/usr/lib/libpoppler-glib.so
debian/tmp/usr/lib/pkgconfig/poppler-glib.pc
glib/.libs/test-poppler-glib usr/lib/poppler
usr/include/poppler/glib/
usr/lib/*/libpoppler-glib.so
usr/lib/*/pkgconfig/poppler-glib.pc
usr/share/gir-1.0/Poppler-0.18.gir
usr/share/doc/libpoppler-glib-dev/html/poppler usr/share/gtk-doc/html/poppler
usr/share/gtk-doc/html/poppler
usr/share/gtk-doc/html/poppler usr/share/doc/libpoppler-glib-dev/html/poppler
debian/tmp/usr/lib/libpoppler-glib.so.*
usr/lib/*/libpoppler-glib.so.8*
This diff is collapsed.
usr/include/poppler/*.h
usr/include/poppler/fofi/
usr/include/poppler/goo/
usr/include/poppler/splash/
debian/tmp/usr/include/poppler/qt3
debian/tmp/usr/lib/libpoppler-qt.a
debian/tmp/usr/lib/libpoppler-qt.so
debian/tmp/usr/lib/pkgconfig/poppler-qt.pc
debian/tmp/usr/lib/libpoppler-qt.so.*
debian/tmp/usr/lib/libpoppler-qt4.so.*
debian/tmp/usr/include/poppler/qt4
debian/tmp/usr/lib/libpoppler-qt4.a
debian/tmp/usr/lib/libpoppler-qt4.so
debian/tmp/usr/lib/pkgconfig/poppler-qt4.pc
usr/lib/*/libpoppler-qt5.so.1*
This diff is collapsed.
usr/include/poppler/qt5
usr/lib/*/libpoppler-qt5.so
usr/lib/*/pkgconfig/poppler-qt5.pc
debian/tmp/usr/lib/libpoppler.so.*
......@@ -2,4 +2,3 @@ AUTHORS
NEWS
README
README-XPDF
TODO
usr/lib/*/libpoppler.so.*
This diff is collapsed.
fd.o #25363
Revert part of 8b478281f20637b52c109decae13c6a29ec33ad4
This way the old functions are still here for compatibility, but the
value set is ignored.
Index: poppler-0.12.2/poppler/GlobalParams.cc
===================================================================
--- poppler-0.12.2.orig/poppler/GlobalParams.cc 2009-11-30 17:28:08.306609033 +0100
+++ poppler-0.12.2/poppler/GlobalParams.cc 2009-11-30 17:29:40.690606245 +0100
@@ -622,6 +622,7 @@ GlobalParams::GlobalParams(const char *c
enableFreeType = gTrue;
antialias = gTrue;
vectorAntialias = gTrue;
+ forceNoFTAutoHinting = gFalse;
strokeAdjust = gTrue;
screenType = screenUnset;
screenSize = -1;
@@ -1407,6 +1408,15 @@ GBool GlobalParams::getVectorAntialias()
return f;
}
+GBool GlobalParams::getForceNoFTAutoHinting() {
+ GBool f;
+
+ lockGlobalParams;
+ f = forceNoFTAutoHinting;
+ unlockGlobalParams;
+ return f;
+}
+
GBool GlobalParams::getStrokeAdjust() {
GBool f;
@@ -1739,6 +1749,15 @@ GBool GlobalParams::setVectorAntialias(c
return ok;
}
+GBool GlobalParams::setForceNoFTAutoHinting(char *s) {
+ GBool ok;
+
+ lockGlobalParams;
+ ok = parseYesNo2(s, &forceNoFTAutoHinting);
+ unlockGlobalParams;
+ return ok;
+}
+
void GlobalParams::setStrokeAdjust(GBool adjust)
{
lockGlobalParams;
Index: poppler-0.12.2/poppler/GlobalParams.h
===================================================================
--- poppler-0.12.2.orig/poppler/GlobalParams.h 2009-11-30 17:28:08.350604149 +0100
+++ poppler-0.12.2/poppler/GlobalParams.h 2009-11-30 17:29:40.690606245 +0100
@@ -206,6 +206,7 @@ public:
GBool getEnableFreeType();
GBool getAntialias();
GBool getVectorAntialias();
+ GBool getForceNoFTAutoHinting();
GBool getStrokeAdjust();
ScreenType getScreenType();
int getScreenSize();
@@ -250,6 +251,7 @@ public:
GBool setEnableFreeType(char *s);
GBool setAntialias(char *s);
GBool setVectorAntialias(char *s);
+ GBool setForceNoFTAutoHinting(char *s);
void setStrokeAdjust(GBool strokeAdjust);
void setScreenType(ScreenType st);
void setScreenSize(int size);
@@ -334,6 +336,7 @@ private:
GBool enableFreeType; // FreeType enable flag
GBool antialias; // anti-aliasing enable flag
GBool vectorAntialias; // vector anti-aliasing enable flag
+ GBool forceNoFTAutoHinting; // force to disable FT autohinting
GBool strokeAdjust; // stroke adjustment enable flag
ScreenType screenType; // halftone screen type
int screenSize; // screen matrix size
Fixed CVE-2009-3938
--- a/poppler/ABWOutputDev.cc
+++ b/poppler/ABWOutputDev.cc
@@ -20,6 +20,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <ctype.h>
+#include <float.h>
#include <math.h>
#include "goo/GooString.h"
#include "goo/GooList.h"
@@ -36,6 +37,23 @@
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+
+// 1: potential -
+// DBL_MAX_10_EXP: 10^x
+// 1: last digit before '.'
+// 1: '.'
+// 6: digits after '.'
+// 1: '\0' at the end
+#define BUFLEN_FOR_DOUBLE (1 + DBL_MAX_10_EXP + 1 + 1 + 6 + 1)
+
+// potential -, INT_MAX is 2147483647, and the trailing '\0'
+#define BUFLEN_FOR_INT (1 + 10 + 1)
+
+//I wouldn't know what size this should safely be. I guess 64 bytes should be
+//enough for any unicode character
+#define BUFLEN_FOR_UNICODE_CHAR 64
+
// Inter-character space width which will cause addChar to start a new
// word.
@@ -157,7 +175,7 @@ void ABWOutputDev::splitNodes(float spli
xmlNodePtr N_move, N_cur, N_newH, N_newL;
char * propName;
const char *nodeName;
- char buf[20];
+ char buf[BUFLEN_FOR_DOUBLE];
if (direction == HORIZONTAL) {
propName = "Y1";
nodeName = "horizontal";
@@ -261,7 +279,7 @@ float ABWOutputDev::getBiggestSeperator(
}
void ABWOutputDev::updateFont(GfxState *state) {
- char buf[160];
+ char buf[BUFLEN_FOR_INT];
xmlNodePtr N_cur;
GfxFont *font;
bool found = false;
@@ -341,9 +359,7 @@ void ABWOutputDev::drawChar(GfxState *st
double originX, double originY,
CharCode code, int nBytes, Unicode *u, int uLen)
{
- //I wouldn't know what size this should safely be. I guess 64 bytes should be
- //enough for any unicode character
- char buf[64];
+ char buf[BUFLEN_FOR_UNICODE_CHAR];
int charLen;
x = dx;
y = dy;
@@ -401,7 +417,7 @@ void ABWOutputDev::endString(GfxState *s
}
void ABWOutputDev::beginWord(GfxState *state, double x, double y){
- char buf[20];
+ char buf[MAX(BUFLEN_FOR_INT, BUFLEN_FOR_DOUBLE)];
// printf("***BREAK!***\n");
endWord();
X1 = x;
@@ -421,7 +437,7 @@ void ABWOutputDev::beginWord(GfxState *s
}
void ABWOutputDev::endWord(){
- char buf[20];
+ char buf[BUFLEN_FOR_DOUBLE];
if (N_word) {
sprintf(buf, "%f", X2); xmlNewProp(N_word, BAD_CAST "X2", BAD_CAST buf);
sprintf(buf, "%f", Y2); xmlNewProp(N_word, BAD_CAST "Y2", BAD_CAST buf);
@@ -618,7 +634,7 @@ void ABWOutputDev::cleanUpNode(xmlNodePt
double tX1=-1, tX2=-1, tY1=-1, tY2=-1;
xmlNodePtr N_cur, N_next;
N_cur = N_parent->children;
- char buf[20];
+ char buf[MAX(BUFLEN_FOR_INT, BUFLEN_FOR_DOUBLE)];
int prevStyle = -1;
xmlChar *val;
int styleLength = xmlLsCountNode(N_styleset)+1;
@@ -995,16 +1011,22 @@ void ABWOutputDev::createABW() {
//change styles to abiword format
xmlNodePtr N_cur, N_next;
xmlAttrPtr N_prop;
- char buf[500];
for (N_cur = N_styleset->children; N_cur; N_cur = N_cur->next){
+ char *font = (char *)xmlGetProp(N_cur,BAD_CAST "font");
+ char *bold = (char *)xmlGetProp(N_cur,BAD_CAST "bold");
+ char *italic = (char *)xmlGetProp(N_cur,BAD_CAST "italic");
+ char buf[278 + BUFLEN_FOR_INT + 12 + strlen(font) + 1 + 12 + strlen(bold) + 1 + 12 + strlen(italic) + 1];
+
sprintf(buf,"margin-top:0pt; color:000000; margin-left:0pt; text-position:normal; widows:2; text-indent:0in; font-variant:normal; margin-right:0pt; lang:nl-NL; line-height:1.0; font-size:%dpt; text-decoration:none; margin-bottom:0pt; bgcolor:transparent; text-align:left; font-stretch:normal;",int(xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "size"))));
strncat(buf,"font-family:",12);
- strncat(buf,(char *)xmlGetProp(N_cur,BAD_CAST "font"),strlen((char *)xmlGetProp(N_cur,BAD_CAST "font")));
+ strncat(buf,font,strlen(font));
strncat(buf,";",1);
strncat(buf,"font-weight:",12);
- strncat(buf,(char *)xmlGetProp(N_cur,BAD_CAST "bold"),strlen((char *)xmlGetProp(N_cur,BAD_CAST "bold")));
+ strncat(buf,bold,strlen(bold));
+ strncat(buf,";",1);
strncat(buf,"font-style:",12);
- strncat(buf,(char *)xmlGetProp(N_cur,BAD_CAST "italic"),strlen((char *)xmlGetProp(N_cur,BAD_CAST "italic")));
+ strncat(buf,italic,strlen(italic));
+ strncat(buf,";",1);
xmlSetProp(N_cur, BAD_CAST "props", BAD_CAST buf);
N_prop = xmlHasProp(N_cur, BAD_CAST "id");
if (N_prop != NULL) xmlRemoveProp(N_prop);
@@ -1036,7 +1058,6 @@ void ABWOutputDev::createABW() {
}
void ABWOutputDev::transformPage(xmlNodePtr N_parent){
- char buf[60];
xmlNodePtr N_cur, N_curLine, N_curText, N_curWord, text, space;
//translate the nodes into abiword nodes
if (xmlStrcasecmp(N_parent->name,BAD_CAST "page") == 0){
@@ -1085,6 +1106,7 @@ void ABWOutputDev::transformPage(xmlNode
xmlNewChild(N_text, NULL, BAD_CAST "cbr", NULL);
}
if (xmlStrcasecmp(N_parent->name,BAD_CAST "colset") == 0){
+ char buf[strlen("columns:") + BUFLEN_FOR_INT];
//fprintf(stderr,"Found a colset\n");
//create new section columns: count childNodes of N_cur
//recurse through chunks and create textNodes
diff -Naur poppler-0.12.4.orig//fofi/FoFiType1.cc poppler-0.12.4/fofi/FoFiType1.cc
--- poppler-0.12.4.orig//fofi/FoFiType1.cc 2010-01-17 01:06:57.000000000 +0100
+++ poppler-0.12.4/fofi/FoFiType1.cc 2010-10-23 20:53:45.000000000 +0200
@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2005, 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005, 2008, 2010 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
//
// To see a description of the changes please see the Changelog file that
@@ -241,7 +242,7 @@
code = code * 8 + (*p2 - '0');
}
}
- if (code < 256) {
+ if (code < 256 && code >= 0) {
for (p = p2; *p == ' ' || *p == '\t'; ++p) ;
if (*p == '/') {
++p;
diff -Naur poppler-0.12.4.orig//poppler/Decrypt.cc poppler-0.12.4/poppler/Decrypt.cc
--- poppler-0.12.4.orig//poppler/Decrypt.cc 2010-01-17 01:06:57.000000000 +0100
+++ poppler-0.12.4/poppler/Decrypt.cc 2010-10-23 20:56:09.000000000 +0200
@@ -229,6 +229,8 @@
if ((objKeyLength = keyLength + 5) > 16) {
objKeyLength = 16;
}
+
+ charactersRead = 0;
}
DecryptStream::~DecryptStream() {
diff -Naur poppler-0.12.4.orig//poppler/Dict.h poppler-0.12.4/poppler/Dict.h
--- poppler-0.12.4.orig//poppler/Dict.h 2010-01-17 01:06:57.000000000 +0100
+++ poppler-0.12.4/poppler/Dict.h 2010-10-23 20:56:53.000000000 +0200
@@ -16,6 +16,7 @@
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2010 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -83,6 +84,8 @@
// trailer dictionary, which is read before the xref table is
// parsed.
void setXRef(XRef *xrefA) { xref = xrefA; }
+
+ XRef *getXRef() { return xref; }
private:
diff -Naur poppler-0.12.4.orig//poppler/Form.cc poppler-0.12.4/poppler/Form.cc
--- poppler-0.12.4.orig//poppler/Form.cc 2010-01-17 01:06:57.000000000 +0100
+++ poppler-0.12.4/poppler/Form.cc 2010-10-23 20:56:53.000000000 +0200
@@ -22,6 +22,7 @@
#pragma implementation
#endif
+#include <set>
#include <stddef.h>
#include <string.h>
#include "goo/gmem.h"
@@ -715,13 +716,14 @@
// Load children
for(int i=0; i<length; i++) {
Object obj2,obj3;
- Object childRef;
array->get(i, &obj2);
- array->getNF(i, &childRef);
if (!obj2.isDict ()) {
error (-1, "Reference to an invalid or non existant object");
+ obj2.free();
continue;
}
+ Object childRef;
+ array->getNF(i, &childRef);
//field child
if (dict->lookup ("FT", &obj3)->isName()) {
// If I'm not a generic container field and my children
@@ -1180,7 +1182,7 @@
}
// Look up an inheritable field dictionary entry.
-Object *Form::fieldLookup(Dict *field, char *key, Object *obj) {
+static Object *fieldLookup(Dict *field, char *key, Object *obj, std::set<int> *usedParents) {
Dict *dict;
Object parent;
@@ -1189,8 +1191,23 @@
return obj;
}
obj->free();
- if (dict->lookup("Parent", &parent)->isDict()) {
- fieldLookup(parent.getDict(), key, obj);
+ dict->lookupNF("Parent", &parent);
+ if (parent.isRef()) {
+ const Ref ref = parent.getRef();
+ if (usedParents->find(ref.num) == usedParents->end()) {
+ usedParents->insert(ref.num);
+
+ Object obj2;
+ parent.fetch(dict->getXRef(), &obj2);
+ if (obj2.isDict()) {
+ fieldLookup(obj2.getDict(), key, obj, usedParents);
+ } else {
+ obj->initNull();
+ }
+ obj2.free();
+ }
+ } else if (parent.isDict()) {
+ fieldLookup(parent.getDict(), key, obj, usedParents);
} else {
obj->initNull();
}
@@ -1198,6 +1215,11 @@
return obj;
}
+Object *Form::fieldLookup(Dict *field, char *key, Object *obj) {
+ std::set<int> usedParents;
+ return ::fieldLookup(field, key, obj, &usedParents);
+}
+
FormField *Form::createFieldFromDict (Object* obj, XRef *xrefA, const Ref& pref)
{
Object obj2;
diff -Naur poppler-0.12.4.orig//poppler/Function.cc poppler-0.12.4/poppler/Function.cc
--- poppler-0.12.4.orig//poppler/Function.cc 2010-01-17 01:06:57.000000000 +0100
+++ poppler-0.12.4/poppler/Function.cc 2010-10-23 20:56:24.000000000 +0200
@@ -422,7 +422,11 @@
for (k = 0, t = j; k < m; ++k, t >>= 1) {
idx += idxMul[k] * (e[k][t & 1]);
}
- sBuf[j] = samples[idx];
+ if (likely(idx >= 0 && idx < nSamples)) {
+ sBuf[j] = samples[idx];
+ } else {
+ sBuf[j] = 0; // TODO Investigate if this is what Adobe does
+ }
}
// do m sets of interpolations
@@ -1106,6 +1110,7 @@
code = NULL;
codeString = NULL;
codeSize = 0;
+ stack = NULL;
ok = gFalse;
cache = new PopplerCache(5);
diff -Naur poppler-0.12.4.orig//poppler/Gfx.cc poppler-0.12.4/poppler/Gfx.cc
--- poppler-0.12.4.orig//poppler/Gfx.cc 2010-01-23 00:54:42.000000000 +0100
+++ poppler-0.12.4/poppler/Gfx.cc 2010-10-23 20:57:21.000000000 +0200
@@ -518,6 +518,7 @@
drawText = gFalse;
maskHaveCSPattern = gFalse;
mcStack = NULL;
+ parser = NULL;
// start the resource stack
res = new GfxResources(xref, resDict, NULL);
@@ -570,6 +571,7 @@
drawText = gFalse;
maskHaveCSPattern = gFalse;
mcStack = NULL;
+ parser = NULL;
// start the resource stack
res = new GfxResources(xref, resDict, NULL);
@@ -1480,6 +1482,8 @@
for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setFillColor(&color);
@@ -1499,6 +1503,8 @@
for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setFillColor(&color);
@@ -1523,6 +1529,8 @@
for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setStrokeColor(&color);
@@ -1542,6 +1550,8 @@
for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setStrokeColor(&color);
@@ -4182,8 +4192,14 @@
}
for (i = 0; i < 4; ++i) {
bboxObj.arrayGet(i, &obj1);
- bbox[i] = obj1.getNum();
- obj1.free();
+ if (likely(obj1.isNum())) {
+ bbox[i] = obj1.getNum();
+ obj1.free();
+ } else {
+ obj1.free();
+ error(getPos(), "Bad form bounding box value");
+ return;
+ }
}
bboxObj.free();
@@ -4406,8 +4422,13 @@
obj.free();
// make stream
- str = new EmbedStream(parser->getStream(), &dict, gFalse, 0);
- str = str->addFilters(&dict);
+ if (parser->getStream()) {
+ str = new EmbedStream(parser->getStream(), &dict, gFalse, 0);
+ str = str->addFilters(&dict);
+ } else {
+ str = NULL;
+ dict.free();
+ }
return str;
}
@@ -4606,8 +4627,14 @@
}
for (i = 0; i < 4; ++i) {
bboxObj.arrayGet(i, &obj1);
- bbox[i] = obj1.getNum();
- obj1.free();
+ if (likely(obj1.isNum())) {
+ bbox[i] = obj1.getNum();
+ obj1.free();
+ } else {
+ obj1.free();
+ error(getPos(), "Bad form bounding box value");
+ return;
+ }
}
bboxObj.free();
From: Simon McVittie <smcv@debian.org>
Date: Thu, 14 Feb 2019 09:43:32 +0000
Subject: glib: Don't create PopplerInputStream with length 0
Since commit a59f6164, PopplerInputStream requires a nonzero length.
Loosely based on an earlier patch by Kouhei Sutou. This version adds
support for length == -1, which is documented to work.
Bug: https://gitlab.freedesktop.org/poppler/poppler/issues/414
Bug-Debian: https://bugs.debian.org/896596
Forwarded: https://gitlab.freedesktop.org/poppler/poppler/merge_requests/189
---
glib/poppler-document.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index ed37da4c..e04c8b42 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -309,7 +309,14 @@ poppler_document_new_from_stream (GInputStream *stream,
}
if (stream_is_memory_buffer_or_local_file(stream)) {
- str = new PopplerInputStream(stream, cancellable, 0, false, 0, Object(objNull));
+ if (length == (goffset)-1) {
+ if (!g_seekable_seek(G_SEEKABLE(stream), 0, G_SEEK_END, cancellable, error)) {
+ g_prefix_error(error, "Unable to determine length of stream: ");
+ return nullptr;
+ }
+ length = g_seekable_tell(G_SEEKABLE(stream));
+ }
+ str = new PopplerInputStream(stream, cancellable, 0, false, length, Object(objNull));
} else {
CachedFile *cachedFile = new CachedFile(new PopplerCachedFileLoader(stream, cancellable, length), new GooString());
str = new CachedFileStream(cachedFile, 0, false, cachedFile->getLength(), Object(objNull));
From a4fad73c86a2eabe004e7cbaa8c9c0ff42146375 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Thu, 6 Dec 2018 18:27:04 +0100
Subject: [PATCH] cpp: Fix page::text_list encoding issue
Text from TextoutputDev always comes in UTF-8
Well it comes in GlobalParams::textEncoding but that is UTF-8 and we
don't let people change it
---
cpp/poppler-page.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/poppler-page.cpp b/cpp/poppler-page.cpp
index 9d9526cc..c4955471 100644
--- a/cpp/poppler-page.cpp
+++ b/cpp/poppler-page.cpp
@@ -365,7 +365,7 @@ std::vector<text_box> page::text_list() const
TextWord *word = word_list->get(i);
std::unique_ptr<GooString> gooWord{word->getText()};
- ustring ustr = detail::unicode_GooString_to_ustring(gooWord.get());
+ ustring ustr = ustring::from_utf8(gooWord->getCString());
double xMin, yMin, xMax, yMax;
word->getBBox(&xMin, &yMin, &xMax, &yMax);
--
2.18.1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103827
diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt
index 113140a3..e38ac1b3 100644
--- a/qt5/src/CMakeLists.txt
+++ b/qt5/src/CMakeLists.txt
@@ -1,5 +1,6 @@
add_definitions(${QT5_DEFINITIONS})
add_definitions(${Qt5Core_DEFINITIONS})
+add_definitions(-fvisibility=hidden -fvisibility-inlines-hidden -Dpoppler_qt5_EXPORTS)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
01_revert_abi_change.patch
02_autohinting_abi_compatibility.patch
03_CVE-2009-3938.patch
04_security.patch
\ No newline at end of file
glib-Don-t-create-PopplerInputStream-with-length-0.patch
page-ustring.patch
#qt-visibility.diff
debian/tmp/usr/bin/
debian/tmp/usr/share/man/man1/
usr/bin/
usr/share/man/man1/
# temporary for upgrades to buster -- see #774949
poppler-utils: breaks-without-version xpdf-common
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/class/autotools.mk
# the upstream version (i.e. without the Debian revision)
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d '-')
# symbols.in files & their "generated" file names
SYMBOLS_in := $(wildcard debian/*.symbols.in)
SYMBOLS_generated := $(patsubst %.in,%,$(SYMBOLS_in))
# use qt4's moc as the default moc is qt3's when both are installed
PATH := /usr/share/qt4/bin:$(PATH)
export PATH
libpopplerN := $(shell sed -rn 's/^Package:[[:space:]]*(libpoppler[0-9]+)[[:space:]]*$$/\1/p' debian/control)
# a trick to fix xpdfrc location without modifying autotools stuff
DEB_CONFIGURE_SYSCONFDIR := /etc/xpdf
# avoid overlinking and reduce library dependencies
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
# enable all the hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# DEB_* variables
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# disable gtk stuff to minimize Build-Depends
DEB_CONFIGURE_EXTRA_FLAGS += \
--enable-libjpeg \
--enable-splash-output \
--enable-cairo-output \
--enable-poppler-glib \
--enable-poppler-qt \
--enable-poppler-qt4 \
--enable-a4-paper \
--enable-gtk-doc \
--disable-gtk-test
DEB_DH_MAKESHLIBS_ARGS_libpoppler5 += -V"libpoppler5"
DEB_DH_MAKESHLIBS_ARGS_libpoppler-glib4 += -V"libpoppler-glib4 (>= 0.12)"
DEB_DH_MAKESHLIBS_ARGS_libpoppler-qt2 += -V"libpoppler-qt2 (>= 0.12)"
DEB_DH_MAKESHLIBS_ARGS_libpoppler-qt4-3 += -V"libpoppler-qt4-3 (>= 0.12)"
CONFIGURE_ARGS := \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)" \
-DCMAKE_INSTALL_LIBDIR="lib/$(DEB_HOST_MULTIARCH)" \
-DENABLE_GLIB=ON \
-DENABLE_QT5=ON \
-DENABLE_CPP=ON \
-DENABLE_GTK_DOC=ON \
-DENABLE_XPDF_HEADERS=ON \
-DENABLE_CMS=lcms2 \
-DENABLE_LIBOPENJPEG=openjpeg2 \
-DBUILD_GTK_TESTS=OFF
%:
dh $@ --with gir
override_dh_auto_clean:
dh_auto_clean
rm -f glib/reference/html/*
rm -f $(SYMBOLS_generated)
override_dh_autoreconf:
dh_autoreconf --as-needed
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_ARGS)
override_dh_missing:
dh_missing --fail-missing
override_dh_installchangelogs:
dh_installchangelogs -p$(libpopplerN)
dh_installchangelogs --remaining-packages -XChangeLog
override_dh_makeshlibs: $(SYMBOLS_generated)
dh_makeshlibs -p$(libpopplerN) -V
dh_makeshlibs -plibpoppler-cpp0v5 -V"libpoppler-cpp0v5 (>= 0.46.0)"
dh_makeshlibs --remaining-packages
debian/%.symbols: debian/%.symbols.in
cat $^ | sed -e 's/#CURVER#/$(UPSTREAM_VERSION)/g' > $@
.PHONY: override_dh_auto_test
Tests: cpp
Depends: build-essential, pkg-config, libpoppler-cpp-dev, cups-filters
Tests: glib
Depends: build-essential, pkg-config, libpoppler-glib-dev, cups-filters
Tests: qt5
Depends: build-essential, pkg-config, libpoppler-qt5-dev, cups-filters
#!/bin/sh
set -e
SRCDIR=$(dirname $(realpath $0))
cd $ADTTMP
g++ -Wall -Werror -pedantic -Wno-long-long -o poppler-cpp-test $SRCDIR/test-cpp.cpp `pkg-config --cflags --libs poppler-cpp`
./poppler-cpp-test "/usr/share/cups/data/default-testpage.pdf"
#!/bin/sh
set -e
SRCDIR=$(dirname $(realpath $0))
cd $ADTTMP
gcc -Wall -Werror -std=c99 -o poppler-glib-test $SRCDIR/test-glib.c `pkg-config --cflags --libs poppler-glib`
./poppler-glib-test "file:///usr/share/cups/data/default-testpage.pdf"
gcc -Wall -Werror -std=c99 -o poppler-glib-test $SRCDIR/test-glib.c -DTEST_GIO `pkg-config --cflags --libs poppler-glib gio-2.0`
./poppler-glib-test "file:///usr/share/cups/data/default-testpage.pdf"
#!/bin/sh
set -e
SRCDIR=$(dirname $(realpath $0))
cd $ADTTMP
g++ -Wall -Werror -pedantic -Wno-long-long -fPIC -std=c++11 -o poppler-qt5-test $SRCDIR/test-qt5.cpp `pkg-config --cflags --libs poppler-qt5 Qt5Core`
./poppler-qt5-test "/usr/share/cups/data/default-testpage.pdf"
#include <poppler-document.h>
#include <assert.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
if (argc < 2)
return EXIT_FAILURE;
poppler::document* doc = poppler::document::load_from_file(argv[1]);
assert(doc);
assert(!doc->is_locked());
int n_pages = doc->pages();
assert(n_pages > 0);
delete doc;
return EXIT_SUCCESS;
}
#include <poppler.h>
#include <stdlib.h>
#ifdef TEST_GIO
#include <gio/gio.h>
#endif
int main(int argc, char *argv[])
{
PopplerDocument* doc;
int n_pages;
#ifdef TEST_GIO
GError *error = NULL;
GFile *file;
GFileInfo *info;
GInputStream *istream;
#endif
if (argc < 2)
return EXIT_FAILURE;
#if !defined(GLIB_VERSION_2_36)
g_type_init();
#endif
doc = poppler_document_new_from_file(argv[1], NULL, NULL);
g_assert(doc != NULL);
n_pages = poppler_document_get_n_pages(doc);
g_assert_cmpint(n_pages, > , 0);
g_object_unref(doc);
#ifdef TEST_GIO
/* https://bugs.debian.org/896596 */
file = g_file_new_for_uri(argv[1]);
g_assert_nonnull(file);
info = g_file_query_info(file, G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE, NULL, &error);
g_assert_no_error(error);
g_assert_nonnull(info);
g_assert_cmpint(g_file_info_get_size(info), > , 0);
istream = G_INPUT_STREAM(g_file_read(file, NULL, &error));
g_assert_no_error(error);
g_assert_nonnull(istream);
doc = poppler_document_new_from_stream(istream, -1, NULL, NULL, &error);
g_assert_no_error(error);
g_assert_nonnull(doc);
g_assert_cmpint(poppler_document_get_n_pages(doc), == , n_pages);
g_object_unref(doc);
g_object_unref(istream);
istream = G_INPUT_STREAM(g_file_read(file, NULL, &error));
g_assert_no_error(error);
g_assert_nonnull(istream);
doc = poppler_document_new_from_stream(istream, g_file_info_get_size(info), NULL, NULL, &error);
g_assert_no_error(error);
g_assert_nonnull(doc);
g_assert_cmpint(poppler_document_get_n_pages(doc), == , n_pages);
g_object_unref(doc);
g_object_unref(istream);
g_object_unref(info);
g_object_unref(file);
#endif
return EXIT_SUCCESS;
}
#include <poppler-qt5.h>
#include <QtCore/QFile>
#include <stdlib.h>
int main(int argc, char *argv[])
{
if (argc < 2)
return EXIT_FAILURE;
Poppler::Document* doc = Poppler::Document::load(QFile::decodeName(argv[1]));
Q_ASSERT(doc);
Q_ASSERT(!doc->isLocked());
int n_pages = doc->numPages();
Q_ASSERT(n_pages > 0);
delete doc;
return EXIT_SUCCESS;
}
Name: poppler
Homepage: http://poppler.freedesktop.org/
Bug-Database: https://bugs.freedesktop.org/buglist.cgi?bug_status=__open__&content=&product=poppler&query_format=specific&order=bug_id%20DESC&query_based_on=
Bug-Submit: https://bugs.freedesktop.org/enter_bug.cgi?product=poppler
Repository: git://git.freedesktop.org/git/poppler/poppler
Repository-Browse: http://cgit.freedesktop.org/poppler/poppler
version=3
http://poppler.freedesktop.org/ poppler-([0-9.]*)\.tar\.gz debian uupdate
http://poppler.freedesktop.org/ poppler-([0-9.]*)\.tar\.(?:gz|xz)