This makes collectd resistant against vulnerable copies of libltdl
(CVE-2009-3736). See <http://bugs.debian.org/559801#15> for further
details.
const char *dir;
char filename[BUFSIZE] = "";
char typename[BUFSIZE];
- int typename_len;
int ret;
struct stat statbuf;
struct dirent *de;
WARNING ("plugin_load: Filename too long: \"%s.so\"", type);
return (-1);
}
- typename_len = strlen (typename);
if ((dh = opendir (dir)) == NULL)
{
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),