xbps{,-static}: patch from master to fix a heap overflow.