NXP-10820: safer code