From: Eric Biggers Date: Mon, 13 May 2013 04:51:28 +0000 (-0500) Subject: image_name_ok_as_dir(): Don't allow names of '.' and '..' X-Git-Tag: v1.4.0~87 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=18b97ba5b37c0134513886062946d0fd521a9b5e;ds=sidebyside image_name_ok_as_dir(): Don't allow names of '.' and '..' --- diff --git a/src/extract_image.c b/src/extract_image.c index 7a46fe8f..7793a8c0 100644 --- a/src/extract_image.c +++ b/src/extract_image.c @@ -897,7 +897,9 @@ static bool image_name_ok_as_dir(const tchar *image_name) { return image_name && *image_name && - !tstrpbrk(image_name, filename_forbidden_chars); + !tstrpbrk(image_name, filename_forbidden_chars) && + tstrcmp(image_name, T(".")) && + tstrcmp(image_name, T("..")); } /* Extracts all images from the WIM to the directory @target, with the images