@matheusbsbs / matheus-bagliano / commits / c8400d9ef5
Fork 0

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>

Hunter, D. Seth committed Jun 30, 2009 at 20:24 UTC c8400d9ef57dc68925d93d0cb9f1777396b380e2
1 file changed +2
http-push.c
+2
@@ -193,6 +193,8 @@ static char *xml_entities(char *s)
193 case '&':
194 strbuf_addstr(&buf, "&amp;");
195 break;
196 + case 0:
197 + return strbuf_detach(&buf, NULL);
198 }
199 s++;
200 }