Fix wildcard regexp dot and other special characters handling.

Reported by: Robert Mabee.

	* grub-core/commands/wildcard.c (isregexop): Add "|+{}[]?".
	(make_regex): Escape "|+{}[]". Transform '?' to '.?'.
	(split_path): Trigger expansion on '?'.
	(unescape): New function.
	(wildcard_expand): Unescape parts copied without globbing.
	* grub-core/script/execute.c (wildcard_escape): Escape '?'.
	(grub_script_arglist_to_argv): Don't unescape expansions.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-19 14:13:19 +02:00
parent 0494408e7e
commit 485568790c
3 changed files with 52 additions and 9 deletions

View file

@ -1,3 +1,16 @@
2012-06-19 Vladimir Serbinenko <phcoder@gmail.com>
Fix wildcard regexp dot and other special characters handling.
Reported by: Robert Mabee.
* grub-core/commands/wildcard.c (isregexop): Add "|+{}[]?".
(make_regex): Escape "|+{}[]". Transform '?' to '.?'.
(split_path): Trigger expansion on '?'.
(unescape): New function.
(wildcard_expand): Unescape parts copied without globbing.
* grub-core/script/execute.c (wildcard_escape): Escape '?'.
(grub_script_arglist_to_argv): Don't unescape expansions.
2012-06-19 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/net.h (grub_net_card): New member txbufsize.