Hi Jaben,
Please help review the attached patch?
Shell seems fail to parse the '%' in command line.  We test the following 4 
cases:
1)Execute echo "* %c %d *" in the command line, the output is "* %c %d *".
2)Script file a.nsh with the content: echo "* %c %d *", execute the a.nsh, the 
output is  "* " "d *"
3)Script file a.nsh with the content: echo %1, execute a.nsh "* %c %d *", the 
output is  "* " "d *"
4)Script file a.nsh with the content: echo %1, script b.nsh with the 
content:a.nsh "* %c %d *", execute b.nsh, the output is  "*"

The root cause is Shell treat '%c %' as an unrecognized environment variable, 
and replace it with a null string (""). The patch add code to check the name of 
an unrecognized environment variable, if it's a valid C style identifier then 
we do the remove.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin....@intel.com<mailto:shumin....@intel.com>>

Thanks
Shumin

Attachment: Shell.c_EnvironmentVariable.patch
Description: Shell.c_EnvironmentVariable.patch

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to