X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fipv6%2Fdatagram.c;h=f7b535dec860ea2ee29dca14581610e443b6042b;hb=407d819cf0fd54c6fc1138a509225696aecafd15;hp=b9c2de84a8a212d137e1ba0c17bc1125dd5b288d;hpb=c8d10bffdbea5f82a8e491467a23fb2cc7da921b;p=linux-2.6 diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index b9c2de84a8..f7b535dec8 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -5,8 +5,6 @@ * Authors: * Pedro Roque * - * $Id: datagram.c,v 1.24 2002/02/01 22:01:04 davem Exp $ - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version @@ -705,6 +703,11 @@ int datagram_send_ctl(struct net *net, } *hlimit = *(int *)CMSG_DATA(cmsg); + if (*hlimit < -1 || *hlimit > 0xff) { + err = -EINVAL; + goto exit_f; + } + break; case IPV6_TCLASS: