From a756060d38a5a8e58dcd72489e6f112499679d4e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 21 Jul 2012 10:41:19 +0200 Subject: [PATCH] libxbps: [unpack] fixed passing dangling pointer to unpack cb. --- lib/package_unpack.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/package_unpack.c b/lib/package_unpack.c index 95643327..af274675 100644 --- a/lib/package_unpack.c +++ b/lib/package_unpack.c @@ -473,6 +473,11 @@ unpack_archive(struct xbps_handle *xhp, archive_read_data_skip(ar); continue; } + /* + * Reset entry_pname again because if entry's pathname + * has been changed it will become a dangling pointer. + */ + entry_pname = archive_entry_pathname(entry); } /* * Extract entry from archive.