mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
f5592fcff3
commit
0d73a242cb
2 changed files with 46 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue