From eb817e4566771e7ffd822e10f284b5b4b967aac4 Mon Sep 17 00:00:00 2001 From: crc Date: Fri, 11 Jan 2019 03:30:56 +0000 Subject: [PATCH] use strlcat in gopher i/o device FossilOrigin-Name: 0c74bdf49042376340861baf1ec1f4155a775380fd50efb23bc1fa9ea6880834 --- interfaces/io_gopher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/io_gopher.c b/interfaces/io_gopher.c index e879133..a64bb64 100644 --- a/interfaces/io_gopher.c +++ b/interfaces/io_gopher.c @@ -109,7 +109,7 @@ void gopher_fetch(char *host, CELL port, char *selector, CELL dest) { while (n > 0) { bzero(buffer,1025); n = read(sockfd,buffer,1024); - strcat(data, buffer); + strlcat(data, buffer, (128 * 1024) + 1); } close(sockfd);