Re: Bug in Dash's unquoting of backslashes within backquoted strings

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

 



Ron Yorston wrote:
>This seems to have been introduced by commit 6bbc71d (parser: use
>pgetc_eatbnl() in more places).  Reverting the following part of the
>commit makes the problem go away:
>
>            case '\\':
>-                                if ((pc = pgetc()) == '\n') {
>-                   nlprompt();
>-                   /*
>-                    * If eating a newline, avoid putting
>-                    * the newline into the new character
>-                    * stream (via the STPUTC after the
>-                    * switch).
>-                    */
>-                   continue;
>-               }
>+                                pc = pgetc_eatbnl();

Alternatively I see that BusyBox ash did this:

            case '\\':
-               pc = pgetc();
-               if (pc == '\n') {
-                   nlprompt();
-                   /*
-                    * If eating a newline, avoid putting
-                    * the newline into the new character
-                    * stream (via the STPUTC after the
-                    * switch).
-                    */
-                   continue;
-               }
+               pc = pgetc(); /* or pgetc_eatbnl()? why (example)? */

Ron



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

  Powered by Linux