urlmatch.c: recompute pointer after append_normalized_escapes
commita7f0a0efa5aa2459e284a2aa5a217324bf9d3875
authorThomas Rast <trast@inf.ethz.ch>
Thu, 12 Sep 2013 14:15:40 +0000 (12 07:15 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Sep 2013 22:27:01 +0000 (12 15:27 -0700)
tree9e9ae52ffee3d4810b9fc4330c9eb9f6345ba013
parent6667a6ac20747eb56eb2c03c39aceaf6aebbae3c
urlmatch.c: recompute pointer after append_normalized_escapes

When append_normalized_escapes is called, its internal strbuf_add* calls can
cause the strbuf's buf to be reallocated changing the value of the buf pointer.

Do not use the strbuf buf pointer from before any append_normalized_escapes
calls afterwards.  Instead recompute the needed pointer.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
urlmatch.c