summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1a3b55c)
raw | patch | inline | side by side (parent: 1a3b55c)
author | pclouds@gmail.com <pclouds@gmail.com> | |
Thu, 19 Oct 2006 01:34:41 +0000 (08:34 +0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 19 Oct 2006 04:21:50 +0000 (21:21 -0700) |
Such a string can never be a valid object name.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_name.c | patch | blob | history |
diff --git a/sha1_name.c b/sha1_name.c
index 9b226e3579b68fe8b59c7105bd926e3a0a70b0ad..6ffee22081aee3fc7b27b9ccc93c4c721652ec4b 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
char canonical[40];
unsigned char res[20];
- if (len < MINIMUM_ABBREV)
+ if (len < MINIMUM_ABBREV || len > 40)
return -1;
hashclr(res);
memset(canonical, 'x', 40);