forked from ariadne/pkgconf
libpkgconf: personality: ensure the path list is properly initialized before searching for triplets
parent
c46868294f
commit
3ccc4454d1
|
@ -100,8 +100,8 @@ valid_triplet(const char *triplet)
|
||||||
{
|
{
|
||||||
const char *c = triplet;
|
const char *c = triplet;
|
||||||
|
|
||||||
for (; c != '\0'; c++)
|
for (; *c; c++)
|
||||||
if (!isalnum(*c) && *c != '-')
|
if (!isalnum(*c) && *c != '-' && *c != '_')
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -219,7 +219,7 @@ load_personality_with_path(const char *path, const char *triplet)
|
||||||
pkgconf_cross_personality_t *
|
pkgconf_cross_personality_t *
|
||||||
pkgconf_cross_personality_find(const char *triplet)
|
pkgconf_cross_personality_find(const char *triplet)
|
||||||
{
|
{
|
||||||
pkgconf_list_t plist;
|
pkgconf_list_t plist = PKGCONF_LIST_INITIALIZER;
|
||||||
pkgconf_node_t *n;
|
pkgconf_node_t *n;
|
||||||
pkgconf_cross_personality_t *out = NULL;
|
pkgconf_cross_personality_t *out = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue