summaryrefslogtreecommitdiffabout
Unidiff
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)
219 ret->msg = NULL; 219 ret->msg = NULL;
220 220
221 p = data; 221 p = data;
222 222
223 while (p) { 223 while (p && *p) {
224 if (*p == '\n') 224 if (*p == '\n')
225 break; 225 break;
226 226
227 if (!strncmp(p, "tagger ", 7)) { 227 if (!strncmp(p, "tagger ", 7)) {
@@ -237,9 +237,9 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
237 } 237 }
238 238
239 while (p && (*p == '\n')) 239 while (p && (*p == '\n'))
240 p = strchr(p, '\n') + 1; 240 p = strchr(p, '\n') + 1;
241 if (p) 241 if (p && *p)
242 ret->msg = xstrdup(p); 242 ret->msg = xstrdup(p);
243 free(data); 243 free(data);
244 return ret; 244 return ret;
245} 245}