]> git.sur5r.net Git - bacula/bacula/commitdiff
Add extra check for pInfo size when loading plugin
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 15 Jun 2011 08:04:43 +0000 (10:04 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:02 +0000 (14:49 +0200)
bacula/src/filed/fd_plugins.c

index e02b49e98dd1544a1d1be9af33df11d151b40135..a4cd7c0e497422c349137d614066313647631d35 100644 (file)
@@ -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;
 }