forked from ariadne/pkgconf
libpkgconf: tuple: fix truncation when no overflow occurs
parent
5eb9cae009
commit
354c87279b
|
@ -274,6 +274,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
|
|||
for (pptr = ptr + 2; *pptr != '\0'; pptr++)
|
||||
{
|
||||
if (*pptr != '}')
|
||||
{
|
||||
if (vptr < vend)
|
||||
*vptr++ = *pptr;
|
||||
else
|
||||
|
@ -282,6 +283,12 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*vptr = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ptr += (pptr - ptr);
|
||||
kv = pkgconf_tuple_find_global(client, varname);
|
||||
|
|
Loading…
Reference in New Issue