"parser: Fix backquote support in here-document EOF mark" incomplete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Herbert,

Regarding:

commit c166b718b496da63c4df7a0972df2fc6cd38256b
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date:   Thu Mar 15 18:27:30 2018 +0800

    parser: Fix backquote support in here-document EOF mark


I discovered that bash, on encountering `` in eof mark,
also treats eof mark as quoted. Testcase (initially
intended to test that `cmd` is not expanded, but taken literally):

cat <<EO`true`F
heredoc1
EO`false`F
EO`true`F
echo Ok1:$?

$ bash heredoc.test
heredoc1
EO`false`F
Ok1:0

The fix:

            case CBQUOTE:    /* '`' */
                if (checkkwd & CHKEOFMARK) {
+                   quotef = 1;
                    USTPUTC('`', out);
                    break;
                }

                PARSEBACKQOLD();
                break;
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux