Commit c88eaae2f226ac0df534d14c51d0faeb720f62d9
1 parent
164c37b5
Fix off-by-one error in --pages argument parsing (fixes #129)
Showing
2 changed files
with
5 additions
and
1 deletions
ChangeLog
| 1 | +2017-08-02 Jay Berkenbilt <ejb@ql.org> | ||
| 2 | + | ||
| 3 | + * Fix off-by-one error in parsing pages options. Fixes #129. | ||
| 4 | + | ||
| 1 | 2017-07-29 Jay Berkenbilt <ejb@ql.org> | 5 | 2017-07-29 Jay Berkenbilt <ejb@ql.org> |
| 2 | 6 | ||
| 3 | * Support @filename and @- in the qpdf command-line tool to read | 7 | * Support @filename and @- in the qpdf command-line tool to read |
qpdf/qpdf.cc
| @@ -855,7 +855,7 @@ parse_pages_options( | @@ -855,7 +855,7 @@ parse_pages_options( | ||
| 855 | { | 855 | { |
| 856 | break; | 856 | break; |
| 857 | } | 857 | } |
| 858 | - if (cur_arg + 2 >= argc) | 858 | + if (cur_arg + 1 >= argc) |
| 859 | { | 859 | { |
| 860 | usage("insufficient arguments to --pages"); | 860 | usage("insufficient arguments to --pages"); |
| 861 | } | 861 | } |