fixed possible overrun bug

This commit is contained in:
David Anderson 2006-02-24 00:11:37 +00:00
parent 6997c780d9
commit 0520c606ec

View File

@ -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;
}