diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-04-15 15:37:24 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-04-16 15:46:01 +0000 |
commit | 5ce567c536fde6b7cb93657d14df404f3e270119 (patch) | |
tree | 4095caef7fc813f383b06dbcc3c7771c421b0ee5 /src/corelib/io/qwindowspipereader_p.h | |
parent | a7f1c97d6096b7f9cc44df275b20d91cc75f7347 (diff) |
let QWindowsPipeReader::stop() cancel the current I/O operation
In rare cases the I/O operation was still running after the destructor
was running, which then modified free'd memory and caused a malformed
heap. To prevent this, we ensure that QWindowsPipeReader::stop() cancels
a running I/O operation and sets the readSequenceStarted flag correctly.
Also, we prevent the start of a new read operation after we called stop().
Change-Id: If8a28bdf23a39a0e88c1770a6f66e2b24ea426bb
Task-number: QTBUG-45601
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qwindowspipereader_p.h')
-rw-r--r-- | src/corelib/io/qwindowspipereader_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qwindowspipereader_p.h b/src/corelib/io/qwindowspipereader_p.h index 7651093b05..b0a23e1a51 100644 --- a/src/corelib/io/qwindowspipereader_p.h +++ b/src/corelib/io/qwindowspipereader_p.h @@ -97,6 +97,7 @@ private: qint64 readBufferMaxSize; QRingBuffer readBuffer; int actualReadBufferSize; + bool stopped; bool readSequenceStarted; bool pipeBroken; bool readyReadEmitted; |