Re: [PATCH] Receive-pack: include entire SHA1 in nonce

2014-09-25 Thread Brian Gernhardt
On Sep 25, 2014, at 1:54 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> I am not happy with this version, either, though, because now we >> have an uninitialized piece of memory at the end of sha1[20] of the >> caller, which is given to sha1_to_hex() to produce garbage. It is >> disca

Re: [PATCH] Receive-pack: include entire SHA1 in nonce

2014-09-25 Thread Junio C Hamano
Junio C Hamano writes: > I am not happy with this version, either, though, because now we > have an uninitialized piece of memory at the end of sha1[20] of the > caller, which is given to sha1_to_hex() to produce garbage. It is > discarded by %.*s format so there is no negative net effect, but I

Re: [PATCH] Receive-pack: include entire SHA1 in nonce

2014-09-25 Thread Junio C Hamano
Brian Gernhardt writes: > clang gives the following warning: > > builtin/receive-pack.c:327:35: error: sizeof on array function > parameter will return size of 'unsigned char *' instead of 'unsigned > char [20]' [-Werror,-Wsizeof-array-argument] > git_SHA1_Update(&ctx, out, sizeof(out));

Re: [PATCH] Receive-pack: include entire SHA1 in nonce

2014-09-25 Thread Junio C Hamano
Brian Gernhardt writes: > clang gives the following warning: > > builtin/receive-pack.c:327:35: error: sizeof on array function > parameter will return size of 'unsigned char *' instead of 'unsigned > char [20]' [-Werror,-Wsizeof-array-argument] > git_SHA1_Update(&ctx, out, sizeof(out));

[PATCH] Receive-pack: include entire SHA1 in nonce

2014-09-25 Thread Brian Gernhardt
clang gives the following warning: builtin/receive-pack.c:327:35: error: sizeof on array function parameter will return size of 'unsigned char *' instead of 'unsigned char [20]' [-Werror,-Wsizeof-array-argument] git_SHA1_Update(&ctx, out, sizeof(out));