From 9a4aa4de2f629212ca9ce1a65beb8b102612170e Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 15 Jun 2011 10:04:43 +0200 Subject: [PATCH] Add extra check for pInfo size when loading plugin --- bacula/src/filed/fd_plugins.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.39.5