From: Hunter, D. Seth Date: Wed, 1 Jul 2009 00:24:47 +0000 (-0400) Subject: http-push: fix xml_entities() string parsing overrun X-Git-Tag: v1.6.4-rc0~22 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c8400d9ef57dc68925d93d0cb9f1777396b380e2 http-push: fix xml_entities() string parsing overrun xml_entities() in http-push.c did not properly stop at the end of the string being examined, which would occasionally cause nonsense to be appended to escaped URL strings and result in failed DAV XML queries Signed-off-by: Seth Hunter Signed-off-by: Junio C Hamano --- diff --git a/http-push.c b/http-push.c index 8cc8ee0dfd..00e83dcec1 100644 --- a/http-push.c +++ b/http-push.c @@ -193,6 +193,8 @@ static char *xml_entities(char *s) case '&': strbuf_addstr(&buf, "&"); break; + case 0: + return strbuf_detach(&buf, NULL); } s++; }