Fix stack buffer overflow in deserialization of hooks.