PR: 1407
Submitted by: Tomas Mraz <tmraz@redhat.com>
s=dir;
p=s;
- for (;;)
+ for (;;p++)
{
if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0'))
{
for (j=0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++)
{
ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
- if (strncmp(ent->dir,ss,(unsigned int)len) == 0)
- continue;
+ if (strlen(ent->dir) == len &&
+ strncmp(ent->dir,ss,(unsigned int)len) == 0)
+ break;
}
-
+ if (j < sk_BY_DIR_ENTRY_num(ctx->dirs))
+ continue;
if (ctx->dirs == NULL)
{
ctx->dirs = sk_BY_DIR_ENTRY_new_null();
}
if (*p == '\0')
break;
- p++;
}
return 1;
}