--- zzzz-none-000/linux-2.6.32.61/include/net/rtnetlink.h 2013-06-10 09:43:48.000000000 +0000 +++ virian-300e-630/linux-2.6.32.61/include/net/rtnetlink.h 2010-07-16 10:24:07.000000000 +0000 @@ -16,7 +16,9 @@ static inline int rtnl_msg_family(const struct nlmsghdr *nlh) { - if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg)) + int len = nlmsg_len(nlh); + + if ((len >= 0) && ((unsigned int) len >= sizeof(struct rtgenmsg))) return ((struct rtgenmsg *) nlmsg_data(nlh))->rtgen_family; else return AF_UNSPEC;