From f7a401210914f27b637cf201704144666f7cf851 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 3 Jul 2014 21:00:00 -0500 Subject: [PATCH] Ensure WIM has filename before doing WIMBoot extraction --- src/extract.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/extract.c b/src/extract.c index 0663edd7..edac626e 100644 --- a/src/extract.c +++ b/src/extract.c @@ -1511,12 +1511,16 @@ check_extract_flags(const WIMStruct *wim, int *extract_flags_p) } #endif -#ifndef __WIN32__ if (extract_flags & WIMLIB_EXTRACT_FLAG_WIMBOOT) { +#ifdef __WIN32__ + if (!wim->filename) + return WIMLIB_ERR_NO_FILENAME; +#else ERROR("WIMBoot extraction is only supported on Windows!"); return WIMLIB_ERR_UNSUPPORTED; - } #endif + } + if ((extract_flags & (WIMLIB_EXTRACT_FLAG_RPFIX | WIMLIB_EXTRACT_FLAG_NORPFIX | -- 2.43.0