]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: check proto length before accessing proto string buffer
authorMarek Lindner <lindner_marek@yahoo.de>
Sat, 27 Apr 2013 08:22:28 +0000 (16:22 +0800)
committerAntonio Quartulli <ordex@autistici.org>
Thu, 9 May 2013 10:39:44 +0000 (12:39 +0200)
commit71d6580e068fd526fc9ef48accb0564a2673349b
tree2ecf02ef21613e3a69cb0ebf333ad1ba8ff68665
parentbe44e614a0ea4c207fc72a5f7428d9a8c439c017
batman-adv: check proto length before accessing proto string buffer

batadv_param_set_ra() strips the trailing '\n' from the supplied
string buffer without checking the length of the buffer first. This
patches avoids random memory access and associated potential
crashes.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/main.c