mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-4862 C++ TBinaryProtocol crashes on port scan
Client: cpp Patch: Michael Patrick This closes #1939
This commit is contained in:
parent
528a0f0731
commit
225646b554
@ -492,7 +492,11 @@ void TNonblockingServer::TConnection::workSocket() {
|
|||||||
|
|
||||||
case SOCKET_RECV:
|
case SOCKET_RECV:
|
||||||
// It is an error to be in this state if we already have all the data
|
// It is an error to be in this state if we already have all the data
|
||||||
assert(readBufferPos_ < readWant_);
|
if (!(readBufferPos_ < readWant_)) {
|
||||||
|
GlobalOutput.printf("TNonblockingServer: frame size too short");
|
||||||
|
close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Read from the socket
|
// Read from the socket
|
||||||
|
Loading…
Reference in New Issue
Block a user