From: Eric Bollengier Date: Wed, 15 Jun 2011 08:04:43 +0000 (+0200) Subject: Add extra check for pInfo size when loading plugin X-Git-Tag: Release-7.0.0~899 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=87daaa5dd215aed0ad12b6379446f63d9ea452a7;p=bacula%2Fbacula Add extra check for pInfo size when loading plugin --- diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index e02b49e98d..a4cd7c0e49 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -789,7 +789,10 @@ static bool is_plugin_compatible(Plugin *plugin) plugin->file, info->plugin_license); return false; } - + if (info->size != sizeof(pInfo)) { + Jmsg(NULL, M_ERROR, 0, _("Plugin size mismatch.\n")); + return false; + } return true; }