Merge to XFA: Fix segmentation fault 'denial of service condition'