netdev
[Top] [All Lists]

Re: [PATCH 2.6 NET] Catch wrong RTATTR_MAX with BUG()

To: tgraf@xxxxxxx
Subject: Re: [PATCH 2.6 NET] Catch wrong RTATTR_MAX with BUG()
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Fri, 10 Sep 2004 02:24:28 +0900 (JST)
Cc: davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20040909164346.GA18994@xxxxxxxxxxxxxx>
Organization: USAGI Project
References: <20040909164346.GA18994@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
In article <20040909164346.GA18994@xxxxxxxxxxxxxx> (at Thu, 9 Sep 2004 18:43:46 
+0200), Thomas Graf <tgraf@xxxxxxx> says:

>       kind = type&3;
>  
> +     if (RTATTR_MAX < rta_max[sz_idx])
> +             BUG();
> +

Something like:
        if (rta_max[sz_idx] > RTATTR_MAX)
                goto err_inval;

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

<Prev in Thread] Current Thread [Next in Thread>