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>
This commit is contained in:
parent
606475f317
commit
c8400d9ef5
@ -193,6 +193,8 @@ static char *xml_entities(char *s)
|
|||||||
case '&':
|
case '&':
|
||||||
strbuf_addstr(&buf, "&");
|
strbuf_addstr(&buf, "&");
|
||||||
break;
|
break;
|
||||||
|
case 0:
|
||||||
|
return strbuf_detach(&buf, NULL);
|
||||||
}
|
}
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user