summary refs log tree commit diff
path: root/strbuf.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-01-05 13:28:10 -0800
committerJunio C Hamano <gitster@pobox.com>2018-01-05 13:28:10 -0800
commita741e2825b3a3045254f404696c0051714c0e7c3 (patch)
treed15baf9081e6518009d5434a20a68cef2499afb9 /strbuf.c
parent843d94b3cd30e61c7c4879f9bc6d013021b9350a (diff)
parent4c267f2ae37e5b5f834172f04b7dd4343e370689 (diff)
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
Diffstat (limited to 'strbuf.c')
-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);
 	}
 }