TARGET: fix segfault in handle_dump_image_command()