b53: fix memory out of bounds access on 64 bit targets
authorJonas Gorski <jogo@openwrt.org>
Wed, 10 Jun 2015 09:21:36 +0000 (09:21 +0000)
committerJonas Gorski <jogo@openwrt.org>
Wed, 10 Jun 2015 09:21:36 +0000 (09:21 +0000)
commit9fbd6d0ba0af16648e9d6b70bab953184a263d94
treea8526e3a38857c01cd359c5cb6dcd5857dd4504e
parentd24d5412fff17cc0ddafecc47ca9564795e1df3a
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>
SVN-Revision: 45938
target/linux/generic/files/drivers/net/phy/b53/b53_common.c