sock: avoid endless loop in sock_recv_chunk_header
This commit is contained in:
1 parent
dc417207a7
commit
c6bc32fab2
1 file changed
+2
-2
+2
-2
@@ -426,8 +426,8 @@ long sock_recv_chunk_header(sock *s) {
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
} else if (ret < 2) {
|
||||
continue;
|
||||
} else if (ret < 2 || ret >= sizeof(buf)) {
|
||||
return -1;
|
||||
}
|
||||
buf[ret] = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user