[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160224.235315.1205744186191236308.davem@davemloft.net>
Date: Wed, 24 Feb 2016 23:53:15 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: g.nault@...halink.fr
Cc: netdev@...r.kernel.org, paulus@...ba.org
Subject: Re: [PATCH net-next] ppp: clarify parsing of user supplied data in
ppp_set_compress()
From: Guillaume Nault <g.nault@...halink.fr>
Date: Tue, 23 Feb 2016 13:59:43 +0100
> * Split big conditional statement.
> * Check (data.length <= CCP_MAX_OPTION_LENGTH) only once.
> * Don't read ccp_option[1] if not initialised.
>
> Reading uninitialised ccp_option[1] was harmless, because this could
> only happen when data.length was 0 or 1. So even then, we couldn't pass
> the (ccp_option[1] < 2 || ccp_option[1] > data.length) test anyway.
>
> Signed-off-by: Guillaume Nault <g.nault@...halink.fr>
Applied, thanks.
Powered by blists - more mailing lists