diff options
author | Werner Koch <[email protected]> | 2014-10-29 16:07:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-10-29 16:07:51 +0000 |
commit | 0d73a242cb53522669cf712b5ece7d1ed05d003a (patch) | |
tree | ae9494b2b7b11cd349afc7a5400cbdcffdd32be7 /common/argparse.h | |
parent | Fix stdint.h problem for Apple. (diff) | |
download | gnupg-0d73a242cb53522669cf712b5ece7d1ed05d003a.tar.gz gnupg-0d73a242cb53522669cf712b5ece7d1ed05d003a.zip |
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 <[email protected]>
Diffstat (limited to 'common/argparse.h')
-rw-r--r-- | common/argparse.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/argparse.h b/common/argparse.h index 29c7b6252..471cf7479 100644 --- a/common/argparse.h +++ b/common/argparse.h @@ -190,6 +190,7 @@ typedef struct #define ARGPARSE_AMBIGUOUS_COMMAND (-9) #define ARGPARSE_INVALID_ALIAS (-10) #define ARGPARSE_OUT_OF_CORE (-11) +#define ARGPARSE_INVALID_ARG (-12) int arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts); |