projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
sha1_to_hex: properly terminate the SHA1
[git.git]
/
sha1_file.c
diff --git
a/sha1_file.c
b/sha1_file.c
index
6011473
..
d451a94
100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-81,6
+81,8
@@
char * sha1_to_hex(const unsigned char *sha1)
*buf++ = hex[val >> 4];
*buf++ = hex[val & 0xf];
}
+ *buf = '\0';
+
return buffer;
}