Skip to content

Commit

Permalink
http-push: fix xml_entities() string parsing overrun
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hunter, D. Seth authored and Junio C Hamano committed Jul 6, 2009
1 parent 606475f commit c8400d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ static char *xml_entities(char *s)
case '&':
strbuf_addstr(&buf, "&amp;");
break;
case 0:
return strbuf_detach(&buf, NULL);
}
s++;
}
Expand Down

0 comments on commit c8400d9

Please sign in to comment.