]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[SNAP]: Check packet length before reading
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Nov 2007 21:53:44 +0000 (22:53 +0100)
committerAdrian Bunk <bunk@kernel.org>
Fri, 2 Nov 2007 21:53:44 +0000 (22:53 +0100)
commit4c94bf7f6f414af1ac449d3d6741522311b1fc07
tree763a98821515ea22205a5944e816821f8bc3c7f9
parent2ba6064c00a38885e8997059908f9aed5299e196
[SNAP]: Check packet length before reading

The snap_rcv code reads 5 bytes so we should make sure that
we have 5 bytes in the head before proceeding.

Based on diagnosis and fix by Evgeniy Polyakov, reported by
Alan J. Wylie.

Patch also kills the skb->sk assignment before kfree_skb
since it's redundant.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
net/802/psnap.c