diff --git a/ChangeLog b/ChangeLog index ea3983b..dc6e3cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-08-02 Jay Berkenbilt + + * Fix off-by-one error in parsing pages options. Fixes #129. + 2017-07-29 Jay Berkenbilt * Support @filename and @- in the qpdf command-line tool to read diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index 368b9bb..5d19562 100644 --- a/qpdf/qpdf.cc +++ b/qpdf/qpdf.cc @@ -855,7 +855,7 @@ parse_pages_options( { break; } - if (cur_arg + 2 >= argc) + if (cur_arg + 1 >= argc) { usage("insufficient arguments to --pages"); }