On Sun, Apr 9, 2017 at 5:56 PM, Chet Ramey <chet.ra...@case.edu> wrote: > Thanks for the report and fix. This is the patch where you could have used > dequote_escapes() ;-) .
Yup, I realized I'd done the previous one incorrectly shortly after writing this one, sorry about that. But I'm not sure about dequoting the function name, so I wanted to dequote just the value, not the whole sting pointed to by q. In retrospect, maybe I should have clarified that issue first: $ eval $'\001() { :; }' $ declare -F | xxd 00000000: 6465 636c 6172 6520 2d66 2001 010a declare -f ... ^^ ^^ The actual function that's created actually *is* $'\001\001': $ type -t $'\001' $ type -t $'\001\001' function So I was assuming the error is with not dequoting the function name *before* the function is created and that when mk_env_string is called `name' would already be dequoted and `value' would not be.