Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter, D. Seth <hunter@ll.mit.edu>2009-07-01 04:24:47 +0400
committerJunio C Hamano <gitster@pobox.com>2009-07-06 20:36:08 +0400
commitc8400d9ef57dc68925d93d0cb9f1777396b380e2 (patch)
tree5cb47b05d9dac55925dc868b3d9689cf066c8e78
parent606475f3178784e5a6b3a01dce1a54314345cf43 (diff)
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 <hunter@ll.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--http-push.c2
1 files changed, 2 insertions, 0 deletions
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, "&amp;");
break;
+ case 0:
+ return strbuf_detach(&buf, NULL);
}
s++;
}