ivi-resource-manager: fix out-of-bounds access in screen.c