iproute/iproute2-2.6.25-xfrmsegfault.patch
2008-07-04 12:44:07 +00:00

16 lines
568 B
Diff

diff -up iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c.seg iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c
--- iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c.seg 2008-07-04 13:22:13.000000000 +0200
+++ iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c 2008-07-04 13:30:51.000000000 +0200
@@ -162,8 +162,9 @@ static int xfrm_algo_parse(struct xfrm_a
if (len > 0) {
if (len > max)
invarg("\"ALGOKEY\" makes buffer overflow\n", key);
-
- strncpy(buf, key, len);
+ else
+ invarg("\"ALGOKEY\" is invalid", key);
+ /* strncpy(buf, key, len); */
}
}