summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -219,9 +219,9 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
ret->msg = NULL;
p = data;
- while (p) {
+ while (p && *p) {
if (*p == '\n')
break;
if (!strncmp(p, "tagger ", 7)) {
@@ -237,9 +237,9 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
}
while (p && (*p == '\n'))
p = strchr(p, '\n') + 1;
- if (p)
+ if (p && *p)
ret->msg = xstrdup(p);
free(data);
return ret;
}