mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 09:02:13 +02:00
Fix undefined behavior due to modifying PL_na twice between sequence points.
Patch by Lukas Mai. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4960 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
20c362a93d
commit
7982a86420
1 changed files with 3 additions and 3 deletions
|
|
@ -433,9 +433,9 @@ static void perl_signal_remove_list_one(GSList **siglist, PERL_SIGNAL_REC *rec)
|
||||||
perl_signal_destroy(rec);
|
perl_signal_destroy(rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define sv_func_cmp(f1, f2, len) \
|
#define sv_func_cmp(f1, f2) \
|
||||||
(f1 == f2 || (SvPOK(f1) && SvPOK(f2) && \
|
(f1 == f2 || (SvPOK(f1) && SvPOK(f2) && \
|
||||||
strcmp((char *) SvPV(f1, len), (char *) SvPV(f2, len)) == 0))
|
strcmp((char *) SvPV_nolen(f1), (char *) SvPV_nolen(f2)) == 0))
|
||||||
|
|
||||||
static void perl_signal_remove_list(GSList **list, SV *func)
|
static void perl_signal_remove_list(GSList **list, SV *func)
|
||||||
{
|
{
|
||||||
|
|
@ -444,7 +444,7 @@ static void perl_signal_remove_list(GSList **list, SV *func)
|
||||||
for (tmp = *list; tmp != NULL; tmp = tmp->next) {
|
for (tmp = *list; tmp != NULL; tmp = tmp->next) {
|
||||||
PERL_SIGNAL_REC *rec = tmp->data;
|
PERL_SIGNAL_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (sv_func_cmp(rec->func, func, PL_na)) {
|
if (sv_func_cmp(rec->func, func)) {
|
||||||
perl_signal_remove_list_one(list, rec);
|
perl_signal_remove_list_one(list, rec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue