From 87345050a103f26b8bd4be4b26f26e2931345317 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 24 May 2013 15:33:56 -0500 Subject: [PATCH 1/1] select_wim_image(): Do not try to select image from non-first part of split WIM --- src/wim.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wim.c b/src/wim.c index ba0702f7..73f0060e 100644 --- a/src/wim.c +++ b/src/wim.c @@ -176,6 +176,11 @@ select_wim_image(WIMStruct *w, int image) return WIMLIB_ERR_INVALID_IMAGE; } + if (w->hdr.part_number != 1) { + ERROR("Cannot select an image from a non-first part of a split WIM"); + return WIMLIB_ERR_SPLIT_UNSUPPORTED; + } + /* If a valid image is currently selected, it can be freed if it is not * modified. */ if (w->current_image != WIMLIB_NO_IMAGE) { -- 2.43.0