Commit be96c417e34cf83ef497d65c5eb4dcf44abef57c

Stefan Sperling 2020-09-17T11:51:59

fix got.conf overriding GOT_AUTHOR even if no author is set in got.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libexec/got-read-gotconfig/got-read-gotconfig.c b/libexec/got-read-gotconfig/got-read-gotconfig.c
index 325d7ca..159d313 100644
--- a/libexec/got-read-gotconfig/got-read-gotconfig.c
+++ b/libexec/got-read-gotconfig/got-read-gotconfig.c
@@ -104,7 +104,7 @@ done:
 static const struct got_error *
 send_gotconfig_str(struct imsgbuf *ibuf, const char *value)
 {
-	size_t len = value ? strlen(value) + 1 : 0;
+	size_t len = value ? strlen(value) : 0;
 
 	if (imsg_compose(ibuf, GOT_IMSG_GOTCONFIG_STR_VAL, 0, 0, -1,
 	    value, len) == -1)