Re: improving '{...}' in bash?

2024-07-23 Thread Harald Dunkel
On 2024-07-23 11:10:23, Martin D Kealey wrote: On Tue, 23 Jul 2024, 15:50 Harald Dunkel, wrote: Hi folks, This feels weird: Did you read the manual before trying any of these? Of course not. I just wanted to say, this {...} construct is rather unintuitive to use. I know how to write thi

Re: [PATCH] malloc: fix out-of-bounds read

2024-07-23 Thread Chet Ramey
On 7/23/24 2:08 AM, Collin Funk wrote: Hi Chet, Chet Ramey writes: /* Use this when we want to be sure that NB is in bucket NU. */ #define RIGHT_BUCKET(nb, nu) \ (((nb) > binsizes[(nu)-1]) && ((nb) <= binsizes[(nu)])) The right fix here is two-fold: fix the first test here to evalua

Re: improving '{...}' in bash?

2024-07-23 Thread Martin D Kealey
On Tue, 23 Jul 2024, 15:50 Harald Dunkel, wrote: > Hi folks, > > This feels weird: > Did you read the manual before trying any of these? % echo x{1,2}x > x1x x2x > % echo x{1}x > x{1}x > Why are you trying to use a multiplier syntax when you don't have more than