texlive[45299] Build/source/texk/web2c/pdftexdir: pdftosrc.cc: Fix a
commits+kakuto at tug.org
commits+kakuto at tug.org
Thu Sep 14 10:59:32 CEST 2017
Revision: 45299
http://tug.org/svn/texlive?view=revision&revision=45299
Author: kakuto
Date: 2017-09-14 10:59:32 +0200 (Thu, 14 Sep 2017)
Log Message:
-----------
pdftosrc.cc: Fix a potential bug which I introduced on 2017-08-13
Modified Paths:
--------------
trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
trunk/Build/source/texk/web2c/pdftexdir/pdftosrc.cc
Modified: trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2017-09-14 04:42:39 UTC (rev 45298)
+++ trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2017-09-14 08:59:32 UTC (rev 45299)
@@ -1,3 +1,8 @@
+2017-09-14 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ * pdftosrc.cc: Fix a potential bug which I introduced on
+ 2017-08-13.
+
2017-08-13 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
* pdftosrc.cc: Remove a line, which I believe is not necessary,
Modified: trunk/Build/source/texk/web2c/pdftexdir/pdftosrc.cc
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/pdftosrc.cc 2017-09-14 04:42:39 UTC (rev 45298)
+++ trunk/Build/source/texk/web2c/pdftexdir/pdftosrc.cc 2017-09-14 08:59:32 UTC (rev 45299)
@@ -153,6 +153,7 @@
(e->type == xrefEntryFree ? "f" : "n"));
else { // e->offset is the object number of the object stream
Stream *str;
+ Lexer *lexer;
Parser *parser;
Object objStr, obj1, obj2;
int nObjects, first, n;
@@ -170,7 +171,8 @@
objStr.streamReset();
obj1.initNull();
str = new EmbedStream(objStr.getStream(), &obj1, gTrue, first);
- parser = new Parser(xref, new Lexer(xref, str), gFalse);
+ lexer = new Lexer(xref, str);
+ parser = new Parser(xref, lexer, gFalse);
for (n = 0; n < nObjects; ++n) {
parser->getObj(&obj1);
parser->getObj(&obj2);
@@ -179,12 +181,11 @@
obj1.free();
obj2.free();
}
-/* The stream str is local, and it is never used hereafter.
- When parser is deleted, Lexer(xref, str), and the stream str
- are automatically deleted. Thus this line, which causes a crash
- in the case of xpdf-4.00, is not necessary.
+#ifdef POPPLER_VERSION /* 0.57.0 or older (or xpdf 3.04) */
while (str->getChar() != EOF) ;
-*/
+#else /* xpdf 4.00 */
+ lexer->skipToEOF();
+#endif
delete parser;
objStr.free();
More information about the tex-live-commits
mailing list