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++)
|
for (pptr = ptr + 2; *pptr != '\0'; pptr++)
|
||||||
{
|
{
|
||||||
if (*pptr != '}')
|
if (*pptr != '}')
|
||||||
|
{
|
||||||
if (vptr < vend)
|
if (vptr < vend)
|
||||||
*vptr++ = *pptr;
|
*vptr++ = *pptr;
|
||||||
else
|
else
|
||||||
|
@ -282,6 +283,12 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*vptr = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ptr += (pptr - ptr);
|
ptr += (pptr - ptr);
|
||||||
kv = pkgconf_tuple_find_global(client, varname);
|
kv = pkgconf_tuple_find_global(client, varname);
|
||||||
|
|
Loading…
Reference in New Issue