author | Johannes Schindelin <johannes.schindelin@gmx.de> | |
Tue, 27 Jan 2009 23:07:46 +0000 (00:07 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 27 Jan 2009 23:16:31 +0000 (15:16 -0800) | ||
commit | f265458f6116a0c03200477ae3b839f2a75bf0fa | |
tree | fd73456d14510000e51a9b536d294371643abab0 | tree | snapshot |
parent | b938f62a208d24f3d6bed260ceb809cd6b3924d7 | commit | diff |
get_sha1_basic(): fix invalid memory access, found by valgrind
When get_sha1_basic() is passed a buffer of len 0, it should not
check if buf[len-1] is a curly bracket.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When get_sha1_basic() is passed a buffer of len 0, it should not
check if buf[len-1] is a curly bracket.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c | diff | blob | history |