24 Oct
2019
24 Oct
'19
1:41 p.m.
Use after free. Signed-off-by: Allan McRae <allan@archlinux.org> --- lib/libalpm/be_package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index 0f45c331..73d466de 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -759,7 +759,7 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful if(_alpm_key_in_keychain(handle, key) == 0) { pkg_temp = _alpm_pkg_load_internal(handle, filename, full); if(pkg_temp) { - packager = pkg_temp->packager; + packager = strdup(pkg_temp->packager); _alpm_pkg_free(pkg_temp); } else { packager = NULL; -- 2.23.0