Commit 684316ba authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Forgot this file in c8393e7b

parent c8393e7b
...@@ -263,7 +263,6 @@ cls_exec(struct VCLS_fd *cfd, char * const *av) ...@@ -263,7 +263,6 @@ cls_exec(struct VCLS_fd *cfd, char * const *av)
char *s; char *s;
unsigned lim; unsigned lim;
int retval = 0; int retval = 0;
const char *trunc = "!\n[response was truncated]\n";
CHECK_OBJ_NOTNULL(cfd, VCLS_FD_MAGIC); CHECK_OBJ_NOTNULL(cfd, VCLS_FD_MAGIC);
cs = cfd->cls; cs = cfd->cls;
...@@ -334,7 +333,7 @@ cls_exec(struct VCLS_fd *cfd, char * const *av) ...@@ -334,7 +333,7 @@ cls_exec(struct VCLS_fd *cfd, char * const *av)
if (len > lim) { if (len > lim) {
if (cli->result == CLIS_OK) if (cli->result == CLIS_OK)
cli->result = CLIS_TRUNCATED; cli->result = CLIS_TRUNCATED;
strcpy(s + (lim - strlen(trunc)), trunc); s[lim - 1] = '\0';
assert(strlen(s) <= lim); assert(strlen(s) <= lim);
} }
if (VCLI_WriteResult(cfd->fdo, cli->result, s) || if (VCLI_WriteResult(cfd->fdo, cli->result, s) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment