On Thu, Feb 9, 2023 at 4:26 PM Rich Felker wrote: > The concept of this seems fine, but if the limit was previously 255 on > supported kernel versions, why stop at 253? It doesn't really cost > anything to go up large enough that the 255 would work too. I can use 255. > As a technical detail, I'd probably also just put the full size > expression in the [], then use sizeof when you need it later. As > written, this change makes chbuf[] formally a VLA. The compiler > probably optimizes it to the same code as if it wasn't a VLA, but > there's no good reason for it to be a VLA. Using sizeof with the original buffer would have effectively fixed this issue, the extra "+1" in the number of chbuf elements adds 16 extra bytes to the buffer on x86_64, which would have been sufficient to hold the extra fds. It might as well be explicit though so it doesn't get reduced in the future. Attached v2.