]> git.sur5r.net Git - u-boot/commit
spmi: Fix sandbox spmi driver memory corruption
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Mon, 4 Apr 2016 17:55:58 +0000 (19:55 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 12 Apr 2016 00:48:22 +0000 (20:48 -0400)
commitaafa64827f30a7d2aa2c2cc2a60906eabd0272b8
tree8a4b72727ea48a370be8a63bdc1e11c6506450d4
parenteed095da30bb6f464c24db81fb6406f7ba1cc16b
spmi: Fix sandbox spmi driver memory corruption

There is off-by-one error in sandbox_emul_gpio that causes
segfault of certain tests.

EMUL_GPIO_REG_END is the address of last valid (emulated) register.
This patch fixed this (by adding one more element to emulated register array).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
drivers/spmi/spmi-sandbox.c