uint32_t flow_id_offset_present = 0;
uint32_t i;
- char key_mask_str[PIPELINE_FC_FLOW_KEY_MAX_SIZE * 2];
+ char key_mask_str[PIPELINE_FC_FLOW_KEY_MAX_SIZE * 2 + 1];
p->hash_offset = 0;
params->name, arg_name);
key_mask_present = 1;
- PIPELINE_ARG_CHECK((mask_str_len <
+ PIPELINE_ARG_CHECK((mask_str_len <=
(PIPELINE_FC_FLOW_KEY_MAX_SIZE * 2)),
"Parse error in section \"%s\": entry "
"\"%s\" is too long", params->name,
arg_name);
- snprintf(key_mask_str, sizeof(key_mask_str), "%s",
+ snprintf(key_mask_str, mask_str_len + 1, "%s",
arg_value);
continue;
uint32_t dma_hash_offset_present = 0;
uint32_t lb_present = 0;
uint32_t i;
- char dma_mask_str[PIPELINE_PASSTHROUGH_DMA_SIZE_MAX * 2];
+ char dma_mask_str[PIPELINE_PASSTHROUGH_DMA_SIZE_MAX * 2 + 1];
/* default values */
p->dma_enabled = 0;
params->name, arg_name);
dma_src_mask_present = 1;
- PIPELINE_ARG_CHECK((mask_str_len <
+ PIPELINE_ARG_CHECK((mask_str_len <=
(PIPELINE_PASSTHROUGH_DMA_SIZE_MAX * 2)),
"Parse error in section \"%s\": entry "
"\"%s\" too long", params->name,