fixed possible overrun bug
This commit is contained in:
parent
6997c780d9
commit
0520c606ec
|
@ -390,15 +390,21 @@ reswitch:
|
|||
}
|
||||
case '%':
|
||||
*buf_p++ = static_cast<D>(ch);
|
||||
if (!llen)
|
||||
goto done;
|
||||
llen--;
|
||||
break;
|
||||
case '\0':
|
||||
*buf_p++ = static_cast<D>('%');
|
||||
if (!llen)
|
||||
goto done;
|
||||
llen--;
|
||||
goto done;
|
||||
break;
|
||||
default:
|
||||
*buf_p++ = static_cast<D>(ch);
|
||||
if (!llen)
|
||||
goto done;
|
||||
llen--;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user