From 883966971003bc22b83e2a3566c7a37ba2fc3e69 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 2 Dec 2014 13:06:29 +0100 Subject: [PATCH] xbps-query/list: pass correct length to strlcat to truncate results. --- bin/xbps-query/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-query/list.c b/bin/xbps-query/list.c index f9847949..45e0f075 100644 --- a/bin/xbps-query/list.c +++ b/bin/xbps-query/list.c @@ -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 {