Re: [PATCH] parser: Do not read past single quote in dollarsq_escape

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

 



On Sat, Jul 06, 2024 at 11:37:16AM +1000, Herbert Xu wrote:
> The function dollarsq_escape may read past the current escape
> code in order to provide enough data to the underlying escape
> code processing function.  This is OK because we will call unget
> to return any unused characters.  However, if this occurs at
> the end of a quoted string, this may prompt the user for more
> input which is wrong.
> 
> Fix this by terminating the loop whenever we see a single quote.
> Even if this is an escaped single quote and thus does not indicate
> the end of the whole quoted string, it's still OK because no single
> escape code can continue after a single quote.
Yeah, works for me.

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux