Re: [PATCH v2 1/2] url: do not read past end of buffer

2019-06-04 Thread Junio C Hamano
Matthew DeVore writes: > url_decode_internal could have been tricked into reading past the length > of the **query buffer if there are fewer than 2 characters after a % (in > a null-terminated string, % would have to be the last character). > Prevent this from happening by checking len before dec

[PATCH v2 1/2] url: do not read past end of buffer

2019-06-04 Thread Matthew DeVore
url_decode_internal could have been tricked into reading past the length of the **query buffer if there are fewer than 2 characters after a % (in a null-terminated string, % would have to be the last character). Prevent this from happening by checking len before decoding the % sequence. Helped-by: