From 82a8b59bc70c6f84a5f370b3010ccac812f9b2be Mon Sep 17 00:00:00 2001 From: longpanda Date: Thu, 8 Oct 2020 17:13:40 +0800 Subject: [PATCH] fix issue #512 show file with name .iso --- GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c index 95b12089..b7fb52d3 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c @@ -1197,7 +1197,7 @@ static int ventoy_colect_img_files(const char *filename, const struct grub_dirho else { debug("Find a file %s\n", filename); - if (len <= 4) + if (len < 4) { return 0; } @@ -1211,7 +1211,7 @@ static int ventoy_colect_img_files(const char *filename, const struct grub_dirho type = img_type_wim; } else if (g_vhdboot_enable && (0 == grub_strcasecmp(filename + len - 4, ".vhd") || - 0 == grub_strcasecmp(filename + len - 5, ".vhdx"))) + (len >= 5 && 0 == grub_strcasecmp(filename + len - 5, ".vhdx")))) { type = img_type_vhd; }