From 83d00e4e8c3ffd789e75d3e28c12546952242d72 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 18 Nov 2014 07:35:25 +0100 Subject: [PATCH] xbps-query/search: pass correct length to strlcat to truncate results. --- bin/xbps-query/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-query/search.c b/bin/xbps-query/search.c index fc4091f4..c0da3fca 100644 --- a/bin/xbps-query/search.c +++ b/bin/xbps-query/search.c @@ -84,7 +84,7 @@ print_results(struct xbps_handle *xhp, struct search_data *sd) assert(out); snprintf(out, sd->maxcols-3, "%s %s %s", inststr, tmp, desc); - xbps_strlcat(out, "...\n", sizeof(*out)); + xbps_strlcat(out, "...\n", sd->maxcols+1); printf("%s", out); free(out); } else {