summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qlocalsocket_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2016-04-08 16:55:39 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2016-04-30 13:13:26 +0000
commita4d26cf522b966056e47e47a004b7e4d668e3a2d (patch)
tree7e26cda8249fd557f411a030a05dfa2cb7ca4af5 /src/network/socket/qlocalsocket_p.h
parentc9f9f54d3f79915723270b2a6d06216a54c87433 (diff)
QWindowsPipeWriter: ensure validity of the write buffer
QWindowsPipeWriter uses asynchronous API to perform writing. Once a cycle has been started, the write buffer must remain valid until the write operation is completed. To avoid data corruption and possibly undefined behavior, this patch makes QWindowsPipeWriter::write() take a QByteArray, which it keeps alive for the duration of the write cycle. Autotest-by: Thomas Hartmann Task-number: QTBUG-52401 Change-Id: Ia35faee735c4e684267daa1f6bd689512b670cd2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/network/socket/qlocalsocket_p.h')
-rw-r--r--src/network/socket/qlocalsocket_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h
index a594605ae0..5e9a07be82 100644
--- a/src/network/socket/qlocalsocket_p.h
+++ b/src/network/socket/qlocalsocket_p.h
@@ -124,8 +124,7 @@ public:
~QLocalSocketPrivate();
void destroyPipeHandles();
void setErrorString(const QString &function);
- void startNextWrite();
- void _q_bytesWritten(qint64 bytes);
+ void _q_canWrite();
void _q_pipeClosed();
void _q_winError(ulong windowsError, const QString &function);
HANDLE handle;