summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-07-30 14:16:07 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-07-30 14:16:07 -0300
commit2f74f1bd701788c3fe8bcb1d96ff8c5da1456986 (patch)
treee4b0bd264e451a05a08589c824266e759aba2de7 /git.c
parent5130612773003d6f7e7d658f7162a4da84fadf69 (diff)
git: Check if either `lhs`, or `buf` are empty in
`parse_colon_key_value_file()`
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 16f7810..47cb186 100644
--- a/git.c
+++ b/git.c
@@ -196,7 +196,7 @@ static int parse_colon_key_value_file(void *ret, void *ctx, const keyword **keyw
lhs = strtok_r(lhs, " \t\v\r\n", &rhs);
/* Did we hit EOF? */
- if (lhs == NULL) {
+ if (is_empty(lhs) || is_empty(buf)) {
break;
} else {
int error;