1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 16:23:14 +02:00

Fix crash in perl plugin when MULTIPLICITY is disabled

This commit is contained in:
Sebastien Helleu
2010-12-16 14:27:16 +01:00
parent 29f1461c42
commit f2c9961a21
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.4-rc1, 2010-12-15
v0.3.4-rc1, 2010-12-16
Version 0.3.4 (under dev!)
@@ -194,6 +194,7 @@ Version 0.3.2 (2010-04-18)
* alias: add custom completion for aliases (task #9479)
* scripts: allow script commands to reload only one script
* scripts: fix bug with callbacks when loading a script already loaded
* perl: fix crash when MULTIPLICITY is disabled
* perl: fix crash when callbacks are called during script initialization
(bug #29018)
* perl: fix crash on /quit or unload of plugin under FreeBSD and Cygwin
+5 -2
View File
@@ -275,11 +275,14 @@ weechat_perl_exec (struct t_plugin_script *script,
if (script->interpreter)
PERL_SET_CONTEXT (script->interpreter);
#else
length = strlen (script->interpreter) + strlen (function) + 3;
length = strlen ((script->interpreter) ? script->interpreter : perl_main) +
strlen (function) + 3;
func = (char *) malloc (length);
if (!func)
return NULL;
snprintf (func, length, "%s::%s", (char *) script->interpreter, function);
snprintf (func, length, "%s::%s",
(char *) ((script->interpreter) ? script->interpreter : perl_main),
function);
#endif
ENTER;