Re: [PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-21 Thread Ben Peart
On 5/19/2018 4:27 AM, René Scharfe wrote: Am 19.05.2018 um 03:57 schrieb Jeff King: These formatted integers should always fit into their 64-byte buffers. Let's use xsnprintf() to add an assertion that this is the case, which makes auditing for other unchecked snprintfs() easier. How about

Re: [PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-20 Thread Junio C Hamano
René Scharfe writes: > How about this instead? > > -- >8 -- > Subject: [PATCH] fsmonitor: use internal argv_array of struct child_process > > Avoid magic array sizes and indexes by constructing the fsmonitor > command line using the embedded argv_array of the child_process. The >

Re: [PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-20 Thread Jeff King
On Sat, May 19, 2018 at 10:27:46AM +0200, René Scharfe wrote: > Am 19.05.2018 um 03:57 schrieb Jeff King: > > These formatted integers should always fit into their > > 64-byte buffers. Let's use xsnprintf() to add an assertion > > that this is the case, which makes auditing for other > >

Re: [PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-19 Thread René Scharfe
Am 19.05.2018 um 03:57 schrieb Jeff King: > These formatted integers should always fit into their > 64-byte buffers. Let's use xsnprintf() to add an assertion > that this is the case, which makes auditing for other > unchecked snprintfs() easier. How about this instead? -- >8 -- Subject: [PATCH]

[PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-18 Thread Jeff King
These formatted integers should always fit into their 64-byte buffers. Let's use xsnprintf() to add an assertion that this is the case, which makes auditing for other unchecked snprintfs() easier. Signed-off-by: Jeff King --- fsmonitor.c | 4 ++-- 1 file changed, 2 insertions(+),