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-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9a4aa4de2f629212ca9ce1a65beb8b102612170e;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; }