git://wimlib.net
/
wimlib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
image_name_ok_as_dir(): Don't allow names of '.' and '..'
[wimlib]
/
src
/
extract_image.c
diff --git
a/src/extract_image.c
b/src/extract_image.c
index 7a46fe8f839dd9b08c5eafbd28ed1cce711ad480..7793a8c0cefa5bc08e5ca24c05ef6a671e7baf7f 100644
(file)
--- 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 &&
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
}
/* Extracts all images from the WIM to the directory @target, with the images