b53: fix memory out of bounds access on 64 bit targets
authorjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 10 Jun 2015 09:21:36 +0000 (09:21 +0000)
committerjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 10 Jun 2015 09:21:36 +0000 (09:21 +0000)
commit4486bb4173378ab04658df48e7b2f6dea303bcbf
tree8e247e5d9c2f4f0f894f4ea5abf5de26bf07f2e0
parentd9c2caa8422df9a82587d5d2d6a6d526228fee68
b53: fix memory out of bounds access on 64 bit targets

On device reset the sizes for the vlan and port tables were wrongly
calculated based on the pointer size instead of the struct size. This
causes buffer overruns on 64 bit targets, resulting in panics.

Fix this by dereferencing the pointers.

Reported-by: Fedor Konstantinov <blmink@mink.su>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45938 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/generic/files/drivers/net/phy/b53/b53_common.c