restrict read() to 160 char
This commit is contained in:
parent
91e1073f69
commit
974d600c09
|
@ -94,9 +94,9 @@ int main(void) {
|
||||||
printf("error in tcp connection init : %s\n",strerror(errsv));
|
printf("error in tcp connection init : %s\n",strerror(errsv));
|
||||||
}
|
}
|
||||||
|
|
||||||
// get data
|
// get data (only 160 first char)
|
||||||
memset(&buf,0,BUFSIZ);
|
memset(&buf,0,BUFSIZ);
|
||||||
bytes_read = read(fd,buf,BUFSIZ);
|
bytes_read = read(fd,buf,160);
|
||||||
|
|
||||||
// url encoding
|
// url encoding
|
||||||
memset(&encbuf,0,BUFSIZ);
|
memset(&encbuf,0,BUFSIZ);
|
||||||
|
|
Loading…
Reference in a new issue