Avoid crash if get_oper_name() somehow gave no {} for local oper.
This commit is contained in:
parent
70fd7fc9fb
commit
c3666dd012
|
@ -431,7 +431,8 @@ burst_ban(struct Client *client_p)
|
||||||
*/
|
*/
|
||||||
rb_strlcpy(operbuf, aconf->info.oper, sizeof buf);
|
rb_strlcpy(operbuf, aconf->info.oper, sizeof buf);
|
||||||
p = strrchr(operbuf, '{');
|
p = strrchr(operbuf, '{');
|
||||||
if (operbuf + sizeof operbuf - p > (ptrdiff_t)(melen + 2))
|
if (p != NULL &&
|
||||||
|
operbuf + sizeof operbuf - p > (ptrdiff_t)(melen + 2))
|
||||||
{
|
{
|
||||||
memcpy(p + 1, me.name, melen);
|
memcpy(p + 1, me.name, melen);
|
||||||
p[melen + 1] = '}';
|
p[melen + 1] = '}';
|
||||||
|
|
Loading…
Reference in New Issue