xbps_package_remove: use xbps_set_pkg_state_dictionary().
fixes a use-after-free found by @duncaen via gcc -fsanitize=address.
This commit is contained in:
parent
829c5835f1
commit
6627ffb84f
@ -422,7 +422,7 @@ xbps_remove_pkg(struct xbps_handle *xhp, const char *pkgver, bool update)
|
||||
/*
|
||||
* Set package state to "half-removed".
|
||||
*/
|
||||
rv = xbps_set_pkg_state_installed(xhp, pkgver,
|
||||
rv = xbps_set_pkg_state_dictionary(pkgd,
|
||||
XBPS_PKG_STATE_HALF_REMOVED);
|
||||
if (rv != 0) {
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_FAIL,
|
||||
|
Loading…
Reference in New Issue
Block a user