[Carry 22033] Add a check for size field in custom format string Upstream-commit: 1a1083ae75ac0b1018510ab80bffeab415220886 Component: engine