diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-12-09 18:16:49 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-12-09 18:16:49 +0000 |
commit | 7982a86420b8efdd162788df94d77a97d43c044e (patch) | |
tree | b6bef2134982c655e6c9b510de00ec52ad0c62dc /src/perl/perl-signals.c | |
parent | 20c362a93ddb6f969a2044b4a75d654d1171bb69 (diff) | |
download | irssi-7982a86420b8efdd162788df94d77a97d43c044e.zip |
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
Diffstat (limited to 'src/perl/perl-signals.c')
-rw-r--r-- | src/perl/perl-signals.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c index 4986c12c..a455cfd3 100644 --- a/src/perl/perl-signals.c +++ b/src/perl/perl-signals.c @@ -433,9 +433,9 @@ static void perl_signal_remove_list_one(GSList **siglist, PERL_SIGNAL_REC *rec) perl_signal_destroy(rec); } -#define sv_func_cmp(f1, f2, len) \ +#define sv_func_cmp(f1, 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) { @@ -444,7 +444,7 @@ static void perl_signal_remove_list(GSList **list, SV *func) for (tmp = *list; tmp != NULL; tmp = tmp->next) { 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); break; } |