Commit a4d26cf5 authored by Alex Trotsenko's avatar Alex Trotsenko
Browse files

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: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent c9f9f54d
Showing with 185 additions and 73 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment