- COTP: fixed possible heap buffer overflow when handling message with invalid (zero) value in length field (#250)

pull/254/head
Michael Zillgith 5 years ago
parent 2ce48a7a32
commit 033ab5b648

@ -720,6 +720,9 @@ CotpConnection_readToTpktBuffer(CotpConnection* self)
goto exit_waiting; goto exit_waiting;
} }
if (self->packetSize <= bufPos)
goto exit_error;
readBytes = readFromSocket(self, buffer + bufPos, self->packetSize - bufPos); readBytes = readFromSocket(self, buffer + bufPos, self->packetSize - bufPos);
if (readBytes < 0) if (readBytes < 0)

Loading…
Cancel
Save