Re: [PATCH 3/6] Make sure fsck_commit_buffer() does not run out of the buffer

2014-08-29 Thread Jeff King
On Thu, Aug 28, 2014 at 04:46:49PM +0200, Johannes Schindelin wrote: > So far, we assumed that the buffer is NUL terminated, but this is not > a safe assumption, now that we opened the fsck_object() API to pass a > buffer directly. > > So let's make sure that there is at least an empty line in th

Re: [PATCH 3/6] Make sure fsck_commit_buffer() does not run out of the buffer

2014-08-28 Thread Junio C Hamano
Johannes Schindelin writes: > So far, we assumed that the buffer is NUL terminated, but this is not > a safe assumption, now that we opened the fsck_object() API to pass a > buffer directly. > > So let's make sure that there is at least an empty line in the buffer. > That way, our checks would fa

[PATCH 3/6] Make sure fsck_commit_buffer() does not run out of the buffer

2014-08-28 Thread Johannes Schindelin
So far, we assumed that the buffer is NUL terminated, but this is not a safe assumption, now that we opened the fsck_object() API to pass a buffer directly. So let's make sure that there is at least an empty line in the buffer. That way, our checks would fail if the empty line was encountered prem