diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-12-27 15:42:53 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-12-27 16:00:53 +0000 |
commit | 1ae0c4a643ba41eddfe875d9dde46a3811eda5bc (patch) | |
tree | 6ef69d4069bc3ad683f87b6d09bdfe489d82442f /epan/stat_tap_ui.c | |
parent | 0ea310dd2f7bd34f2d9858a91873102e1909537a (diff) |
Fix -z statistics command line parsing
The string comparison must be done against the length of the registered command, not against the length or the string given as an argument.
Otherwise optional parameters are taken into account.
Change-Id: Iec4032fc10b00e606770533c5a567d7b49663593
Reviewed-on: https://code.wireshark.org/review/6075
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/stat_tap_ui.c')
-rw-r--r-- | epan/stat_tap_ui.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/stat_tap_ui.c b/epan/stat_tap_ui.c index 263fd330a9..eb8d1df20a 100644 --- a/epan/stat_tap_ui.c +++ b/epan/stat_tap_ui.c @@ -85,7 +85,7 @@ process_stat_cmd_arg(char *optstr) for(entry=stat_cmd_arg_list;entry;entry=g_slist_next(entry)){ sca=(stat_cmd_arg *)entry->data; - if(!strncmp(sca->cmd,optstr,strlen(optstr))){ + if(!strncmp(sca->cmd,optstr,strlen(sca->cmd))){ tr=(stat_requested *)g_malloc(sizeof (stat_requested)); tr->sca = sca; tr->arg=g_strdup(optstr); |