QSocks5SocketEngine: Fix out-of-bounds access of QBA
This should've been caught a long time ago, but long story short: it wasn't. This has been deprecated since 5.14 and is now asserting. Pick-to: 5.15 Change-Id: Iddee22b1a68e5d1a03006831f795db8ec1c472be Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
28e4a8421c
commit
456699da93
@ -1635,9 +1635,7 @@ qint64 QSocks5SocketEngine::writeDatagram(const char *data, qint64 len, const QI
|
||||
|
||||
QByteArray outBuf;
|
||||
outBuf.reserve(270 + len);
|
||||
outBuf[0] = 0x00;
|
||||
outBuf[1] = 0x00;
|
||||
outBuf[2] = 0x00;
|
||||
outBuf.append(3, '\0');
|
||||
if (!qt_socks5_set_host_address_and_port(header.destinationAddress, header.destinationPort, &outBuf)) {
|
||||
}
|
||||
outBuf += QByteArray(data, len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user