#! /bin/sh /usr/share/dpatch/dpatch-run ## bts559801_plugin_find_fix.dpatch by Sebastian Harl ## ## DP: plugin: Use strcasecmp rather than strncasecmp to find a plugin. ## DP: ## DP: This makes collectd resistant against vulnerable copies of libltdl ## DP: (CVE-2009-3736). ## DP: See ## DP: for details. @DPATCH@ diff a/src/plugin.c b/src/plugin.c --- a/src/plugin.c +++ b/src/plugin.c @@ -572,7 +572,7 @@ int plugin_load (const char *type) while ((de = readdir (dh)) != NULL) { - if (strncasecmp (de->d_name, typename, typename_len)) + if (strcasecmp (de->d_name, typename)) continue; status = ssnprintf (filename, sizeof (filename),