summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-01-05 13:28:10 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-01-05 13:28:10 -0800
commita741e2825b3a3045254f404696c0051714c0e7c3 (patch)
treed15baf9081e6518009d5434a20a68cef2499afb9
parentMerge branch 'ew/empty-merge-with-dirty-index' (diff)
parentstrbuf: fix urlencode format string on signed char (diff)
downloadtgif-a741e2825b3a3045254f404696c0051714c0e7c3.tar.xz
Merge branch 'jd/fix-strbuf-add-urlencode-bytes'
Bytes with high-bit set were encoded incorrectly and made credential helper fail. * jd/fix-strbuf-add-urlencode-bytes: strbuf: fix urlencode format string on signed char
-rw-r--r--strbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strbuf.c b/strbuf.c
index 8007be8fba..1df674e919 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -683,7 +683,7 @@ static void strbuf_add_urlencode(struct strbuf *sb, const char *s, size_t len,
(!reserved && is_rfc3986_reserved(ch)))
strbuf_addch(sb, ch);
else
- strbuf_addf(sb, "%%%02x", ch);
+ strbuf_addf(sb, "%%%02x", (unsigned char)ch);
}
}