uri: fix buffer overflow
This commit is contained in:
parent
338b84eb8f
commit
a9a987942d
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ static int comp_unescape(struct re_printf *pf, const struct pl *pl, esc_h *eh)
|
|||
}
|
||||
|
||||
if ('%' == c) {
|
||||
if (i < (pl->l - 2)) {
|
||||
if (i+2 < pl->l) {
|
||||
const uint8_t hi = ch_hex(pl->p[++i]);
|
||||
const uint8_t lo = ch_hex(pl->p[++i]);
|
||||
const char b = hi<<4 | lo;
|
||||
|
|
Loading…
Add table
Reference in a new issue