Re: [PATCH 0/18] snprintf cleanups

2017-03-30 Thread Jeff King
On Thu, Mar 30, 2017 at 10:24:36AM -0700, Junio C Hamano wrote: > > I'm OK either with the series I posted, or wrapping up the alternative > > in a commit message. > > I do find the updated one easier to follow (if anything it is more > compact); I do not think it is worth a reroll, but it is eas

Re: [PATCH 0/18] snprintf cleanups

2017-03-30 Thread Junio C Hamano
Jeff King writes: > On Wed, Mar 29, 2017 at 09:05:33AM -0700, Junio C Hamano wrote: > >> > I think there are two things going on in your example. >> > >> > One is that obviously patch_id_addf() removes the spaces from the >> > result. But we could do that now by keeping the big strbuf_addf(), and

Re: [PATCH 0/18] snprintf cleanups

2017-03-29 Thread Jeff King
On Wed, Mar 29, 2017 at 09:05:33AM -0700, Junio C Hamano wrote: > > I think there are two things going on in your example. > > > > One is that obviously patch_id_addf() removes the spaces from the > > result. But we could do that now by keeping the big strbuf_addf(), and > > then just walking the

Re: [PATCH 0/18] snprintf cleanups

2017-03-29 Thread Junio C Hamano
Jeff King writes: > On Tue, Mar 28, 2017 at 03:33:48PM -0700, Junio C Hamano wrote: > >> Jeff King writes: >> >> > It's a lot of patches, but hopefully they're all pretty straightforward >> > to read. >> >> Yes, quite a lot of changes. I didn't see anything questionable in >> there. >> >> As

Re: [PATCH 0/18] snprintf cleanups

2017-03-28 Thread Jeff King
On Tue, Mar 28, 2017 at 03:33:48PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > It's a lot of patches, but hopefully they're all pretty straightforward > > to read. > > Yes, quite a lot of changes. I didn't see anything questionable in > there. > > As to the "patch-id" thing, I find

Re: [PATCH 0/18] snprintf cleanups

2017-03-28 Thread Junio C Hamano
Jeff King writes: > It's a lot of patches, but hopefully they're all pretty straightforward > to read. Yes, quite a lot of changes. I didn't see anything questionable in there. As to the "patch-id" thing, I find the alternate one slightly easier to read. Also, exactly because this is not a pe

[PATCH 0/18] snprintf cleanups

2017-03-28 Thread Jeff King
Our code base calls snprintf() into a fixed-size buffer in a bunch of places. Sometimes we check the result, and sometimes we accept a silent truncation. In some cases an overflow is easy given long input. In some cases it's impossible. And in some cases it depends on how big PATH_MAX is on your fi