fix(cli): buffer overflow
add 1 to PING_OPTSTR_LEN for the \0
This commit is contained in:
parent
25116a7787
commit
cdc4df4f85
1 changed files with 2 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ enum { PING_OPT_LEN = (0 PING_OPTIONS_LIST) };
|
|||
+ (1 * (has_arg == no_argument) \
|
||||
+ (2 * (has_arg == required_argument) \
|
||||
+ (3 * (has_arg == optional_argument))))
|
||||
enum { PING_OPTSTR_LEN = (1 PING_OPTIONS_LIST) };
|
||||
/* +1 for ':' to disable getopt error messages */
|
||||
enum { PING_OPTSTR_LEN = (2 PING_OPTIONS_LIST) };
|
||||
/* +2 for ':' to disable getopt error messages and \0 */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue