From: Jetchko Jekov Date: Thu, 21 May 2015 14:32:24 +0000 (+0200) Subject: gre: raising the size of the buffer holding nl messages. X-Git-Tag: v4.1.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bde5baa5476cd8d7d33afc42170dc984f3717e14;p=thirdparty%2Fiproute2.git gre: raising the size of the buffer holding nl messages. Now it matches the size for the answer defined in rtnl_talk() and prevents stack corruption with answer > 1024 bytes. --- diff --git a/ip/link_gre.c b/ip/link_gre.c index 1d7838768..193726109 100644 --- a/ip/link_gre.c +++ b/ip/link_gre.c @@ -53,7 +53,7 @@ static int gre_parse_opt(struct link_util *lu, int argc, char **argv, struct { struct nlmsghdr n; struct ifinfomsg i; - char buf[1024]; + char buf[16384]; } req; struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1); struct rtattr *tb[IFLA_MAX + 1];