mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Merge branch 'percent_flag' into 'security'
fix %[ See merge request !5
This commit is contained in:
commit
1b99299ed2
@ -68,7 +68,7 @@ static void format_expand_code(const char **format, GString *out, int *flags)
|
||||
|
||||
if (flags == NULL) {
|
||||
/* flags are being ignored - skip the code */
|
||||
while (**format != ']')
|
||||
while (**format != ']' && **format != '\0')
|
||||
(*format)++;
|
||||
return;
|
||||
}
|
||||
@ -246,6 +246,10 @@ int format_expand_styles(GString *out, const char **format, int *flags)
|
||||
case '[':
|
||||
/* code */
|
||||
format_expand_code(format, out, flags);
|
||||
if ((*format)[0] == '\0')
|
||||
/* oops, reached end prematurely */
|
||||
(*format)--;
|
||||
|
||||
break;
|
||||
case 'x':
|
||||
case 'X':
|
||||
|
Loading…
x
Reference in New Issue
Block a user