mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-26 13:48:03 +03:00
fixed possible overrun bug
This commit is contained in:
parent
6997c780d9
commit
0520c606ec
@ -390,15 +390,21 @@ reswitch:
|
|||||||
}
|
}
|
||||||
case '%':
|
case '%':
|
||||||
*buf_p++ = static_cast<D>(ch);
|
*buf_p++ = static_cast<D>(ch);
|
||||||
|
if (!llen)
|
||||||
|
goto done;
|
||||||
llen--;
|
llen--;
|
||||||
break;
|
break;
|
||||||
case '\0':
|
case '\0':
|
||||||
*buf_p++ = static_cast<D>('%');
|
*buf_p++ = static_cast<D>('%');
|
||||||
|
if (!llen)
|
||||||
|
goto done;
|
||||||
llen--;
|
llen--;
|
||||||
goto done;
|
goto done;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*buf_p++ = static_cast<D>(ch);
|
*buf_p++ = static_cast<D>(ch);
|
||||||
|
if (!llen)
|
||||||
|
goto done;
|
||||||
llen--;
|
llen--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user