diff --git a/CHANGES.md b/CHANGES.md index 3cecd2c..f60e729 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,13 @@ Changes in PDFio ================ +v1.5.4 - YYYY-MM-DD +------------------- + +- Updated indirect reference reading code to limit the range of generation + numbers. + + v1.5.3 - 2025-05-03 ------------------- diff --git a/configure b/configure index 7d358bc..535b804 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for pdfio 1.5.3. +# Generated by GNU Autoconf 2.71 for pdfio 1.5.4. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='pdfio' PACKAGE_TARNAME='pdfio' -PACKAGE_VERSION='1.5.3' -PACKAGE_STRING='pdfio 1.5.3' +PACKAGE_VERSION='1.5.4' +PACKAGE_STRING='pdfio 1.5.4' PACKAGE_BUGREPORT='https://github.com/michaelrsweet/pdfio/issues' PACKAGE_URL='https://www.msweet.org/pdfio' @@ -1295,7 +1295,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pdfio 1.5.3 to adapt to many kinds of systems. +\`configure' configures pdfio 1.5.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1361,7 +1361,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pdfio 1.5.3:";; + short | recursive ) echo "Configuration of pdfio 1.5.4:";; esac cat <<\_ACEOF @@ -1460,7 +1460,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pdfio configure 1.5.3 +pdfio configure 1.5.4 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1678,7 +1678,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pdfio $as_me 1.5.3, which was +It was created by pdfio $as_me 1.5.4, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2434,9 +2434,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -PDFIO_VERSION="1.5.3" -PDFIO_VERSION_MAJOR="`echo 1.5.3 | awk -F. '{print $1}'`" -PDFIO_VERSION_MINOR="`echo 1.5.3 | awk -F. '{printf("%d\n",$2);}'`" +PDFIO_VERSION="1.5.4" +PDFIO_VERSION_MAJOR="`echo 1.5.4 | awk -F. '{print $1}'`" +PDFIO_VERSION_MINOR="`echo 1.5.4 | awk -F. '{printf("%d\n",$2);}'`" @@ -5099,7 +5099,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pdfio $as_me 1.5.3, which was +This file was extended by pdfio $as_me 1.5.4, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5155,7 +5155,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -pdfio config.status 1.5.3 +pdfio config.status 1.5.4 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 56fe973..75e9e81 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ AC_PREREQ([2.70]) dnl Package name and version... -AC_INIT([pdfio], [1.5.3], [https://github.com/michaelrsweet/pdfio/issues], [pdfio], [https://www.msweet.org/pdfio]) +AC_INIT([pdfio], [1.5.4], [https://github.com/michaelrsweet/pdfio/issues], [pdfio], [https://www.msweet.org/pdfio]) PDFIO_VERSION="AC_PACKAGE_VERSION" PDFIO_VERSION_MAJOR="`echo AC_PACKAGE_VERSION | awk -F. '{print $1}'`" diff --git a/pdfio-value.c b/pdfio-value.c index 767d74d..f4051f1 100644 --- a/pdfio-value.c +++ b/pdfio-value.c @@ -515,7 +515,7 @@ _pdfioValueRead(pdfio_file_t *pdf, // I - PDF file // Integer... long generation = 0; // Generation number - while (tempptr < tb->bufend && isdigit(*tempptr & 255)) + while (tempptr < tb->bufend && generation < 65536 && isdigit(*tempptr & 255)) { generation = generation * 10 + *tempptr - '0'; tempptr ++; diff --git a/pdfio.h b/pdfio.h index 3d45189..58502ee 100644 --- a/pdfio.h +++ b/pdfio.h @@ -23,7 +23,7 @@ extern "C" { // Version numbers... // -# define PDFIO_VERSION "1.5.3" +# define PDFIO_VERSION "1.5.4" # define PDFIO_VERSION_MAJOR 1 # define PDFIO_VERSION_MINOR 5