Commit f77bc218 authored by Albert Astals Cid's avatar Albert Astals Cid

Merge remote-tracking branch 'origin/poppler-0.24'

Conflicts:
	utils/pdfimages.cc
	utils/pdfinfo.cc
	utils/pdfseparate.cc
parents 06e9dc91 58e04a08
......@@ -18,7 +18,7 @@ CHECK_FILE_OFFSET_BITS()
set(POPPLER_MAJOR_VERSION "0")
set(POPPLER_MINOR_VERSION "24")
set(POPPLER_MICRO_VERSION "3")
set(POPPLER_MICRO_VERSION "4")
set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
# command line switches
......@@ -427,7 +427,7 @@ add_library(poppler STATIC ${poppler_SRCS})
else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
set_target_properties(poppler PROPERTIES VERSION 43.0.0 SOVERSION 43)
set_target_properties(poppler PROPERTIES VERSION 44.0.0 SOVERSION 44)
target_link_libraries(poppler ${poppler_LIBS})
target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
......
Release 0.24.4
core:
* Fix regression in broken endstream detection. Bug #70854
* Catalog: sort entries of NameTrees to make sure lookup works. Bug #26049
* Don't infinite loop if reading from GooFile::read fails. Bug #71835
utils:
* pdftotext: Do not close stdout. Bug #71639
* pdftotext: Silence warning for may be used uninitialized variable. Bug #71640
* pdftotext: Escape the text of the xml headers
* Warn the user if he provides a wrong range
qt4:
* Fix typo in xml API. Bug #71643
qt5:
* Fix typo in xml API. Bug #71643
Release 0.24.3
core:
* PSOutputDev: Fix PFB font embedding. Bug #69717
......
m4_define([poppler_version_major],[0])
m4_define([poppler_version_minor],[24])
m4_define([poppler_version_micro],[3])
m4_define([poppler_version_micro],[4])
m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
AC_PREREQ(2.59)
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = "Poppler CPP"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.24.3
PROJECT_NUMBER = 0.24.4
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -1495,7 +1495,7 @@ void JBIG2Stream::readSegments() {
// arithmetic-coded symbol dictionary segments when numNewSyms
// == 0. Segments like this often occur for blank pages.
error(errSyntaxError, curStr->getPos(), "{0:d} extraneous byte{1:s} after segment",
error(errSyntaxError, curStr->getPos(), "{0:lld} extraneous byte{1:s} after segment",
segExtraBytes, (segExtraBytes > 1) ? "s" : "");
// Burn through the remaining bytes -- inefficient, but
......
......@@ -157,7 +157,7 @@ libpoppler_la_LIBADD = \
$(PTHREAD_LIBS) \
$(win32_libs)
libpoppler_la_LDFLAGS = -version-info 43:0:0 @create_shared_lib@ @auto_import_flags@
libpoppler_la_LDFLAGS = -version-info 44:0:0 @create_shared_lib@ @auto_import_flags@
if ENABLE_XPDF_HEADERS
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = "Poppler Qt4 "
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.24.3
PROJECT_NUMBER = 0.24.4
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = "Poppler Qt5"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.24.3
PROJECT_NUMBER = 0.24.4
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -17,6 +17,7 @@
// Copyright (C) 2007-2008, 2010 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// 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
......@@ -150,6 +151,12 @@ int main(int argc, char *argv[]) {
if (lastPage < 1 || lastPage > doc->getNumPages()) {
lastPage = doc->getNumPages();
}
if (lastPage < firstPage) {
fprintf(stderr,
"Wrong page range given: the first page (%d) can not be after the last page (%d).\n",
firstPage, lastPage);
goto err1;
}
// get the fonts
{
......
......@@ -19,6 +19,7 @@
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2010 Jakob Voss <jakob.voss@gbv.de>
// Copyright (C) 2012, 2013 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// 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
......@@ -188,6 +189,12 @@ int main(int argc, char *argv[]) {
firstPage = 1;
if (lastPage < 1 || lastPage > doc->getNumPages())
lastPage = doc->getNumPages();
if (lastPage < firstPage) {
error(errCommandLine, -1,
"Wrong page range given: the first page ({0:d}) can not be after the last page ({1:d}).",
firstPage, lastPage);
goto err1;
}
// write image files
imgOut = new ImageOutputDev(imgRoot, pageNames, listImages);
......
......@@ -20,6 +20,7 @@
// Copyright (C) 2012, 2013 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// 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
......@@ -207,6 +208,12 @@ int main(int argc, char *argv[]) {
if (lastPage < 1 || lastPage > doc->getNumPages()) {
lastPage = doc->getNumPages();
}
if (lastPage < firstPage) {
error(errCommandLine, -1,
"Wrong page range given: the first page ({0:d}) can not be after the last page ({1:d}).",
firstPage, lastPage);
goto err2;
}
// print doc info
doc->getDocInfo(&info);
......
......@@ -8,6 +8,7 @@
// Copyright (C) 2012, 2013 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2013 Pino Toscano <pino@kde.org>
// Copyright (C) 2013 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
//========================================================================
#include "config.h"
......@@ -70,6 +71,12 @@ bool extractPages (const char *srcFileName, const char *destFileName) {
lastPage = doc->getNumPages();
if (firstPage == 0)
firstPage = 1;
if (lastPage < firstPage) {
error(errCommandLine, -1,
"Wrong page range given: the first page ({0:d}) can not be after the last page ({1:d}).",
firstPage, lastPage);
return false;
}
bool foundmatch = false;
char *p = strstr(auxDestFileName, "%d");
if (p != NULL) {
......
......@@ -27,6 +27,7 @@
// Copyright (C) 2011 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2012 Koji Otani <sho@bbr.jp>
// Copyright (C) 2013 Lu Wang <coolwanglu@gmail.com>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// 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
......@@ -964,6 +965,12 @@ int main(int argc, char *argv[]) {
if (lastPage < 1 || lastPage > doc->getNumPages())
lastPage = doc->getNumPages();
if (lastPage < firstPage) {
fprintf(stderr,
"Wrong page range given: the first page (%d) can not be after the last page (%d).\n",
firstPage, lastPage);
exit(99);
}
if (eps && firstPage != lastPage) {
fprintf(stderr, "EPS files can only contain one page.\n");
exit(99);
......
......@@ -326,6 +326,12 @@ int main(int argc, char *argv[]) {
firstPage = 1;
if (lastPage < 1 || lastPage > doc->getNumPages())
lastPage = doc->getNumPages();
if (lastPage < firstPage) {
error(errCommandLine, -1,
"Wrong page range given: the first page ({0:d}) can not be after the last page ({1:d}).",
firstPage, lastPage);
goto error;
}
doc->getDocInfo(&info);
if (info.isDict()) {
......
......@@ -25,6 +25,7 @@
// Copyright (C) 2010 William Bader <williambader@hotmail.com>
// Copyright (C) 2011-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// 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
......@@ -425,6 +426,12 @@ int main(int argc, char *argv[]) {
lastPage = firstPage;
if (lastPage < 1 || lastPage > doc->getNumPages())
lastPage = doc->getNumPages();
if (lastPage < firstPage) {
fprintf(stderr,
"Wrong page range given: the first page (%d) can not be after the last page (%d).\n",
firstPage, lastPage);
goto err1;
}
if (singleFile && firstPage < lastPage) {
if (!quiet) {
......
......@@ -22,6 +22,7 @@
// Copyright (C) 2009, 2011, 2012 William Bader <williambader@hotmail.com>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// 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
......@@ -380,6 +381,12 @@ int main(int argc, char *argv[]) {
if (lastPage < 1 || lastPage > doc->getNumPages()) {
lastPage = doc->getNumPages();
}
if (lastPage < firstPage) {
error(errCommandLine, -1,
"Wrong page range given: the first page ({0:d}) can not be after the last page ({1:d}).",
firstPage, lastPage);
goto err2;
}
// check for multi-page EPS or form
if ((doEPS || doForm) && firstPage != lastPage) {
......
......@@ -23,6 +23,7 @@
// Copyright (C) 2011 Tom Gleason <tom@buildadam.com>
// Copyright (C) 2011 Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk>
// Copyright (C) 2013 Yury G. Kudryashov <urkud.urkud@gmail.com>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// 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
......@@ -290,6 +291,12 @@ int main(int argc, char *argv[]) {
if (lastPage < 1 || lastPage > doc->getNumPages()) {
lastPage = doc->getNumPages();
}
if (lastPage < firstPage) {
error(errCommandLine, -1,
"Wrong page range given: the first page ({0:d}) can not be after the last page ({1:d}).",
firstPage, lastPage);
goto err3;
}
// write HTML header
if (htmlMeta) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment