diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c index 140a450..d7d13c8 100644 --- a/ip/xfrm_state.c +++ b/ip/xfrm_state.c @@ -125,7 +125,7 @@ static int xfrm_algo_parse(struct xfrm_algo *alg, enum xfrm_attr_type_t type, strncpy(alg->alg_name, name, sizeof(alg->alg_name)); - if (slen > 2 && strncmp(key, "0x", 2) == 0) { + if (slen >= 2 && strncmp(key, "0x", 2) == 0) { /* split two chars "0x" from the top */ char *p = key + 2; int plen = slen - 2;