diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | qpdf/qpdf.cc | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2017-08-02 Jay Berkenbilt <ejb@ql.org> + + * Fix off-by-one error in parsing pages options. Fixes #129. + 2017-07-29 Jay Berkenbilt <ejb@ql.org> * Support @filename and @- in the qpdf command-line tool to read diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index 368b9bba..5d195629 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"); } |