提交 536c1ec3 编写于 作者: J Junio C Hamano

Merge branch 'rs/urlmatch-cleanup'

Code cleanup.

* rs/urlmatch-cleanup:
  urlmatch: use hex2chr() in append_normalized_escapes()
......@@ -42,12 +42,12 @@ static int append_normalized_escapes(struct strbuf *buf,
from_len--;
if (ch == '%') {
if (from_len < 2 ||
!isxdigit(from[0]) ||
!isxdigit(from[1]))
if (from_len < 2)
return 0;
ch = hexval(*from++) << 4;
ch |= hexval(*from++);
ch = hex2chr(from);
if (ch < 0)
return 0;
from += 2;
from_len -= 2;
was_esc = 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册