Hi Junio,
On Wed, 10 Sep 2014, Junio C Hamano wrote:
Johannes Schindelin johannes.schinde...@gmx.de writes:
diff --git a/fsck.c b/fsck.c
index dd77628..9dd7d12 100644
--- a/fsck.c
+++ b/fsck.c
@@ -237,6 +237,26 @@ static int fsck_tree(struct tree *item, int strict,
fsck_error
Johannes Schindelin johannes.schinde...@gmx.de writes:
+ for (i = 0; i size; i++) {
+ switch (buffer[i]) {
+ case '\0':
+ return error_func(obj, FSCK_ERROR,
+ invalid message: NUL at offset %d, i);
Isn't this invalid
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
Johannes Schindelin johannes.schinde...@gmx.de 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
On Wed, Sep 10, 2014 at 9:52 AM, Johannes Schindelin
johannes.schinde...@gmx.de 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
5 matches
Mail list logo