[master] 684316bac Forgot this file in c8393e7b6ef98fe2
Poul-Henning Kamp
phk at FreeBSD.org
Mon Dec 9 19:20:09 UTC 2019
commit 684316bac1d6e46c5753c659057d6e4df7e8c906
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Dec 9 19:18:49 2019 +0000
Forgot this file in c8393e7b6ef98fe2
diff --git a/lib/libvarnish/vcli_serve.c b/lib/libvarnish/vcli_serve.c
index 5c95f4f74..b97611978 100644
--- a/lib/libvarnish/vcli_serve.c
+++ b/lib/libvarnish/vcli_serve.c
@@ -263,7 +263,6 @@ cls_exec(struct VCLS_fd *cfd, char * const *av)
char *s;
unsigned lim;
int retval = 0;
- const char *trunc = "!\n[response was truncated]\n";
CHECK_OBJ_NOTNULL(cfd, VCLS_FD_MAGIC);
cs = cfd->cls;
@@ -334,7 +333,7 @@ cls_exec(struct VCLS_fd *cfd, char * const *av)
if (len > lim) {
if (cli->result == CLIS_OK)
cli->result = CLIS_TRUNCATED;
- strcpy(s + (lim - strlen(trunc)), trunc);
+ s[lim - 1] = '\0';
assert(strlen(s) <= lim);
}
if (VCLI_WriteResult(cfd->fdo, cli->result, s) ||
More information about the varnish-commit
mailing list