xbps-query/list: pass correct length to strlcat to truncate results.

This commit is contained in:
Juan RP 2014-12-02 13:06:29 +01:00
parent 53c6a5d1d7
commit 8839669710

View File

@ -77,7 +77,7 @@ list_pkgs_in_dict(struct xbps_handle *xhp _unused,
assert(out);
snprintf(out, lpc->maxcols - 3,
"%s %s", tmp, short_desc);
xbps_strlcat(out, "...\n", sizeof(*out));
xbps_strlcat(out, "...\n", lpc->maxcols+1);
printf("%s", out);
free(out);
} else {