sunrast: Check for out of bounds reads