Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'maint'
[gitweb.git]
/
sha1_name.c
diff --git
a/sha1_name.c
b/sha1_name.c
index 159c2ab84fa2cdde0e540024a1ca22e0bbb43af8..722fc35a6d98e1c260c6e14738ad3b2d41d924aa 100644
(file)
--- a/
sha1_name.c
+++ b/
sha1_name.c
@@
-309,7
+309,7
@@
static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
/* basic@{time or number} format to query ref-log */
reflog_len = at = 0;
- if (str[len-1] == '}') {
+ if (
len &&
str[len-1] == '}') {
for (at = 0; at < len - 1; at++) {
if (str[at] == '@' && str[at+1] == '{') {
reflog_len = (len-1) - (at+2);