]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: properly check pskb_may_pull return value
authorAntonio Quartulli <antonio@meshcoding.com>
Wed, 29 Jan 2014 23:12:24 +0000 (00:12 +0100)
committerAntonio Quartulli <antonio@meshcoding.com>
Mon, 17 Feb 2014 16:17:01 +0000 (17:17 +0100)
commitee5e634361a7e2964488533cdc57ffc155919b08
tree168bc48d9894cdf33b3065ddc5982d44605b73c4
parent56c1d1a1b82994bbe3a108687a2d76e3ab91bab9
batman-adv: properly check pskb_may_pull return value

pskb_may_pull() returns 1 on success and 0 in case of failure,
therefore checking for the return value being negative does
not make sense at all.

This way if the function fails we will probably read beyond the current
skb data buffer. Fix this by doing the proper check.

Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
net/batman-adv/routing.c