always null-terminate reqbuf buffer
thanks Hiltjo for the patch
This commit is contained in:
parent
29c8cfa201
commit
73d8b456eb
1 changed files with 2 additions and 1 deletions
3
quark.c
3
quark.c
|
@ -451,8 +451,9 @@ request(void) {
|
|||
&& !strstr(reqbuf, "\r\n\r\n") && !strstr(reqbuf, "\n\n"); )
|
||||
{
|
||||
offset += r;
|
||||
reqbuf[offset] = 0;
|
||||
}
|
||||
reqbuf[offset] = 0;
|
||||
|
||||
if (r == -1) {
|
||||
logerrmsg("error\tread: %s\n", strerror(errno));
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue