diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-08-17 10:26:30 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-09-02 18:31:21 (GMT) |
commit | a005f19eff946454985785788c344f10616d571e (patch) | |
tree | 0399c46a5551a7a83c37f75574891126019ef378 /common/cmd_mii.c | |
parent | 641b0d374eeea65778bf8cb2107064c2aff195eb (diff) | |
download | u-boot-fsl-qoriq-a005f19eff946454985785788c344f10616d571e.tar.xz |
hush: Don't parse the contents of a dereferenced var
When a variable which contains a user-supplied value is dereferenced
(e.g. to be echo'ed), make sure that the value is not further parsed
by hush.
Set the hush local variable "HUSH_NO_EVAL=1" to enable this behavior.
Without this patch, a sequence like this occurs:
Panda # env set my_user_string Bob\'s favorite device
Panda # print my_user_string
my_user_string=Bob's favorite device
Panda # echo $my_user_string
syntax error hush.c:3007
With this patch, it looks like this:
Panda # HUSH_NO_EVAL=1
Panda # env set my_user_string Bob\'s favorite device
Panda # print my_user_string
my_user_string=Bob's favorite device
Panda # echo $my_user_string
Bob's favorite device
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'common/cmd_mii.c')
0 files changed, 0 insertions, 0 deletions