From bb85a2d65adaa14fd6310a70f58e5b818ebdcc1c Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 2 May 2015 17:40:06 -0500 Subject: [PATCH] wimlib_export_image(): error if src_wim == dest_wim --- src/export_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export_image.c b/src/export_image.c index e88107a9..8ad2d533 100644 --- a/src/export_image.c +++ b/src/export_image.c @@ -128,7 +128,7 @@ wimlib_export_image(WIMStruct *src_wim, WIMLIB_EXPORT_FLAG_WIMBOOT)) return WIMLIB_ERR_INVALID_PARAM; - if (src_wim == NULL || dest_wim == NULL) + if (!src_wim || !dest_wim || src_wim == dest_wim) return WIMLIB_ERR_INVALID_PARAM; if (!wim_has_metadata(src_wim) || !wim_has_metadata(dest_wim)) -- 2.46.1