id = pool_str2id(pool, arch, 0);
if (!id || id == ARCH_SRC || id == ARCH_NOSRC || id == ARCH_NOARCH)
return id;
- if (pool->id2arch && (id > pool->lastarch || !pool->id2arch[id]))
+ if (pool->id2arch && pool_arch2score(pool, id) == 0)
return 0;
return id;
}
static int
matchdep_str(const char *pattern, const char *string, int flags)
{
+ if (!pattern || !string)
+ return 0;
if (flags & SELECTION_GLOB)
{
int globflags = (flags & SELECTION_NOCASE) != 0 ? FNM_CASEFOLD : 0;
return 0;
if (!name && !dep)
return 0;
+ if (name && dep)
+ return 0;
if ((flags & SELECTION_MATCH_DEPSTR) != 0)
flags &= ~SELECTION_REL;