Re: [PATCH] printf %ls/%lc/%Q fixes

2023-10-21 Thread Grisha Levit
On Thu, Oct 19, 2023 at 8:23 PM Grisha Levit wrote: > @@ -490,7 +491,10 @@ printf_builtin (WORD_LIST *list) > ws[0] = wc; > ws[1] = L'\0'; > > - r = printwidestr (start, ws, 1, fieldwidth, precision); > + if (wc == L'\0')

Re: bash tries to parse comsub in quoted PE pattern

2023-10-21 Thread Emanuele Torre
On Thu, Oct 19, 2023 at 04:12:16PM -0400, Chet Ramey wrote: > On 10/18/23 1:08 PM, Emanuele Torre wrote: > > While we are at it, when examining this issue now, I have also noticed > > that, regardless of whether brace expansion is enabled or not, the bash > > parser always reads single quotes in do

Re: [PATCH] printf width/precision argument overflow

2023-10-21 Thread Chet Ramey
On 10/19/23 11:45 PM, Grisha Levit wrote: When reading a printf width/precision argument, the value isn't checked for overflow if it happens to be the last argument: Thanks for the report. There are a couple more things we need to do in the case of field width or precision overflow. Chet -- `

Re: [PATCH] printf %ls/%lc/%Q fixes

2023-10-21 Thread Chet Ramey
On 10/19/23 8:23 PM, Grisha Levit wrote: A few issues with handling of the new %ls, %lc and %Q conversion specifications: Thanks for the report and fixes. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech,