Ensure WIM has filename before doing WIMBoot extraction
authorEric Biggers <ebiggers3@gmail.com>
Fri, 4 Jul 2014 02:00:00 +0000 (21:00 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 4 Jul 2014 02:00:00 +0000 (21:00 -0500)
src/extract.c

index 0663edd75ba92d4f736b8249d572b292e0adc04b..edac626e4e6eb94331d46435caf9d1360785ce39 100644 (file)
@@ -1511,12 +1511,16 @@ check_extract_flags(const WIMStruct *wim, int *extract_flags_p)
        }
 #endif
 
        }
 #endif
 
-#ifndef __WIN32__
        if (extract_flags & WIMLIB_EXTRACT_FLAG_WIMBOOT) {
        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;
                ERROR("WIMBoot extraction is only supported on Windows!");
                return WIMLIB_ERR_UNSUPPORTED;
-       }
 #endif
 #endif
+       }
+
 
        if ((extract_flags & (WIMLIB_EXTRACT_FLAG_RPFIX |
                              WIMLIB_EXTRACT_FLAG_NORPFIX |
 
        if ((extract_flags & (WIMLIB_EXTRACT_FLAG_RPFIX |
                              WIMLIB_EXTRACT_FLAG_NORPFIX |