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>
This commit is contained in:
parent
0ea310dd2f
commit
1ae0c4a643
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue