Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-send-email: SIG{TERM,INT} handlers
[gitweb.git]
/
transport.c
diff --git
a/transport.c
b/transport.c
index 4e151a9e878b402fd0b70c31057b9bcfcff7d9b7..babaa21398522939076151f1c240a4f18f9a90a1 100644
(file)
--- a/
transport.c
+++ b/
transport.c
@@
-118,7
+118,7
@@
static void insert_packed_refs(const char *packed_refs, struct ref **list)
if (hexval(buffer[0]) > 0xf)
continue;
len = strlen(buffer);
- if (buffer[len - 1] == '\n')
+ if (
len &&
buffer[len - 1] == '\n')
buffer[--len] = '\0';
if (len < 41)
continue;