xbps: merge patch from git to fix segfault in xbps-query.