Re: [PATCH] parser: Do not read past single quote in dollarsq_escape
наб <[email protected]>
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <jbdj2lqrhxw2xkwvvrvdwu3nrcuikmfrng6a6j5o4iza6s7niv@tarta.nabijaczleweli.xyz> |
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.
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmaItWsACgkQvP0LAY0m WPH8tBAAjJR7Gc+Nc4RAFrvhmgCMG3/VueTQXTbLVQHyz2MpolnbEWAK4RK+KyZn /DPdvgq8wYPdjvt5uvJBvyKHSnxRPUHfIfR96vKAKEJHKxf4Ammr7vMnO8aoUBA+ 9CG0JmQjsQ9c2vzi1IYkHBF8TdCsNpVNvlymitDBZufPNacxpHzSde5QzsALQikL E/BZz4TGx7aEqNIgf8J/yEvZnElomKXiudDql7KkeJZAPvjGjQXn7AMuCv/McJc7 SCx16Yqo5pY8nKVDu5NMu3JlniEGyPUlNHzi6tev0cyF7n1p7a84PatsuiFi8PbO vcdMoShcS1tmjiUobbVXQFrwcWA4xOnXI/xtCt0yMdb4clv+/l0JcK+YwbhK8KIX l6ispj8bD1eBrx3zzFHEz+j1SBmT4mXjoPr/CWinQMYH3uyvNikaMBDEXUXf3sw9 s9KZ+1MU5YGVqJHkC3v5M+OTmBXQv9FEUCArWPzj8k2+/ltexTDwF04BgA28Kxrt walo5mMfFyMcSoLTs4OGhAy7XUIcZS+VCLWXIoOoOvFCLIRZuIQ4VxK9eMY1WD0A +6ngkveNieXKv86v1jGI2ESd9MaAO2Vk9ZDd763Hki6qGti5RLbzklMCTI5BITSO 4tek4VTn4GXok2XhqaMN6y+KlKH3yV2asVJcbCVtjMQ5NsXOiUI= =HjhP -----END PGP SIGNATURE-----