use strlcat in gopher i/o device

FossilOrigin-Name: 0c74bdf49042376340861baf1ec1f4155a775380fd50efb23bc1fa9ea6880834
This commit is contained in:
crc 2019-01-11 03:30:56 +00:00
parent a94065866a
commit eb817e4566

View file

@ -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);