examples/ip_pipeline: fix buffer overrun
authorFan Zhang <roy.fan.zhang@intel.com>
Fri, 11 Dec 2015 11:29:10 +0000 (11:29 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 13 Dec 2015 01:39:19 +0000 (02:39 +0100)
Coverity issue: 107127
Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
examples/ip_pipeline/config_parse_tm.c

index 3932247..e75eed7 100644 (file)
@@ -399,7 +399,7 @@ tm_cfgfile_load(struct app_pktq_tm_params *tm)
 
        memset(tm->sched_subport_params, 0, sizeof(tm->sched_subport_params));
        memset(tm->sched_pipe_profiles, 0, sizeof(tm->sched_pipe_profiles));
-       memset(&tm->sched_port_params, 0, sizeof(tm->sched_pipe_profiles));
+       memset(&tm->sched_port_params, 0, sizeof(tm->sched_port_params));
        for (i = 0; i < APP_MAX_SCHED_SUBPORTS * APP_MAX_SCHED_PIPES; i++)
                tm->sched_pipe_to_profile[i] = -1;