forked from ariadne/pkgconf
libpkgconf: pkg: fix out ouf boundary access
If a file with a matching "uninstalled" name exists but cannot be parsed, an invalid memory area is accessed. How to reproduce: $ touch poc-uninstalled.pc $ PKG_CONFIG_PATH=. pkgconf pocmaster
parent
ef135d819c
commit
f818a69b3d
|
@ -539,6 +539,7 @@ pkgconf_pkg_try_specific_path(pkgconf_client_t *client, const char *path, const
|
|||
{
|
||||
PKGCONF_TRACE(client, "found (uninstalled): %s", uninst_locbuf);
|
||||
pkg = pkgconf_pkg_new_from_file(client, uninst_locbuf, f);
|
||||
if (pkg != NULL)
|
||||
pkg->flags |= PKGCONF_PKG_PROPF_UNINSTALLED;
|
||||
}
|
||||
else if ((f = fopen(locbuf, "r")) != NULL)
|
||||
|
|
Loading…
Reference in New Issue