mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-29 10:16:38 +02:00
Fix OOB read (1 byte to the left)
This commit is contained in:
@@ -695,7 +695,7 @@ void make_mode_str(aChannel *chptr, long oldm, Cmode_t oldem, long oldl, int pco
|
||||
chptr->mode.extmode = oldem;
|
||||
}
|
||||
z = strlen(para_buf);
|
||||
if (para_buf[z - 1] == ' ')
|
||||
if ((z > 0) && (para_buf[z - 1] == ' '))
|
||||
para_buf[z - 1] = '\0';
|
||||
*x = '\0';
|
||||
if (*mode_buf == '\0')
|
||||
|
||||
Reference in New Issue
Block a user