diff options
author | David Schulz <david.schulz@qt.io> | 2018-12-12 08:00:55 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2018-12-13 05:36:03 +0000 |
commit | 9ce4260d232d94a9c902333e4b894fc0514d9e6d (patch) | |
tree | 6dd960c9a9f800b677dce9f946a2c4d69fdf2e93 /src/corelib/global/qglobal.cpp | |
parent | eaf4438b3511c8380b9b691b656a87a60e342e29 (diff) |
QWindowsLocalCodec::convertToUnicode(): Fix remaining char conversion
Prevent passing a zero argument to the cbMultiByte parameter of
MultiByteToWideChar. According to the documentation this will always
fail.
This is triggered when calling convertToUnicode with a state having
remainingChars of one and a length of one. The remaining chars will be
completed and the length will be reduced to zero before the actual
convert.
Adding an early return after the completion to prevent calling
MultiByteToWideChar with the invalid zero argument.
Fixes: QTCREATORBUG-21622
Change-Id: Ic6a433dd929e97b1681583cb1b9a347afaa9a09f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
0 files changed, 0 insertions, 0 deletions