mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 16:42:30 +02:00
Patches for heap corruption and missing bounds check
By Gabriel Campana and Adrien Guinet from Quarkslab.
This commit is contained in:
parent
20b5d4d982
commit
295a4b77f0
1 changed files with 5 additions and 0 deletions
|
|
@ -131,6 +131,8 @@ void unformat_24bit_color(char **ptr, int off, int *fgcolor, int *bgcolor, int *
|
||||||
unsigned char rgbx[4];
|
unsigned char rgbx[4];
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < 4; ++i) {
|
for (i = 0; i < 4; ++i) {
|
||||||
|
if ((*ptr)[i + off] == '\0')
|
||||||
|
return;
|
||||||
rgbx[i] = (*ptr)[i + off];
|
rgbx[i] = (*ptr)[i + off];
|
||||||
}
|
}
|
||||||
rgbx[3] -= 0x20;
|
rgbx[3] -= 0x20;
|
||||||
|
|
@ -1341,6 +1343,9 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
|
||||||
bgcolor = *ptr==(char)0xff ? -1 : *ptr-'0';
|
bgcolor = *ptr==(char)0xff ? -1 : *ptr-'0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (*ptr == '\0')
|
||||||
|
break;
|
||||||
|
|
||||||
ptr++;
|
ptr++;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue