libfdt: Fix segfault when calling fit_check_format() on corrupt FIT images