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

pull/259/head
Michael Zillgith 5 years ago
parent 0129032f08
commit 88acbd49c4

@ -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