From: Eric Biggers Date: Fri, 24 May 2013 20:33:56 +0000 (-0500) Subject: select_wim_image(): Do not try to select image from non-first part of split WIM X-Git-Tag: v1.4.2~19 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=87345050a103f26b8bd4be4b26f26e2931345317 select_wim_image(): Do not try to select image from non-first part of split WIM --- 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) {