Skip to content
Snippets Groups Projects
Commit 5fb707f9 authored by Saurabh Verma's avatar Saurabh Verma
Browse files

fixed cmdu_parse_single_tlv for strict length checking

parent 78804be8
Branches
Tags
1 merge request!55fixed cmdu_parse_single_tlv for strict length checking
Pipeline #49310 passed
...@@ -588,7 +588,7 @@ int cmdu_parse_tlv_single(struct cmdu_buff *c, struct tlv *tv[], ...@@ -588,7 +588,7 @@ int cmdu_parse_tlv_single(struct cmdu_buff *c, struct tlv *tv[],
if (policy->type != t->type) if (policy->type != t->type)
continue; continue;
if (policy[i].len && tlv_length(t) != policy[i].len) if (policy->len && tlv_length(t) != policy->len)
return -1; return -1;
if (policy->minlen > 0 && tlv_length(t) < policy->minlen) if (policy->minlen > 0 && tlv_length(t) < policy->minlen)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment