common: Check option arguments for a valid range.
authorWerner Koch <wk@gnupg.org>
Wed, 29 Oct 2014 16:07:51 +0000 (17:07 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 29 Oct 2014 16:07:51 +0000 (17:07 +0100)
commit0d73a242cb53522669cf712b5ece7d1ed05d003a
treeae9494b2b7b11cd349afc7a5400cbdcffdd32be7
parentf5592fcff308007322a201c970a6d5e8763c9fe3
common: Check option arguments for a valid range.

* common/argparse.h (ARGPARSE_INVALID_ARG): New.
* common/argparse.c: Include limits h and errno.h.
(initialize): Add error strings for new error constant.
(set_opt_arg): Add range checking.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/argparse.c
common/argparse.h