summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2007-02-03 15:11:41 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-02-04 20:21:46 (UTC)
commitebd7b0fbc378e9beca0b275c5cd9150c930bde56 (patch) (side-by-side diff)
tree6ee9ef66be06b164732bcc77930b9186c2819da9
parentbb3e7950c39b67e863a618b3a0e766544b65d3cb (diff)
downloadcgit-ebd7b0fbc378e9beca0b275c5cd9150c930bde56.zip
cgit-ebd7b0fbc378e9beca0b275c5cd9150c930bde56.tar.gz
cgit-ebd7b0fbc378e9beca0b275c5cd9150c930bde56.tar.bz2
Do not die if tag has no message
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--parsing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing.c b/parsing.c
index 8aad1dd..1013dad 100644
--- a/parsing.c
+++ b/parsing.c
@@ -217,13 +217,13 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
ret->tagger_email = NULL;
ret->tagger_date = 0;
ret->msg = NULL;
p = data;
- while (p) {
+ while (p && *p) {
if (*p == '\n')
break;
if (!strncmp(p, "tagger ", 7)) {
p += 7;
t = strchr(p, '<') - 1;
@@ -235,11 +235,11 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
}
p = strchr(p, '\n') + 1;
}
while (p && (*p == '\n'))
p = strchr(p, '\n') + 1;
- if (p)
+ if (p && *p)
ret->msg = xstrdup(p);
free(data);
return ret;
}