diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2023-03-20 12:33:02 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2023-03-23 06:22:13 +0000 |
| commit | a845725d13e73b7be3cd9e05e726bf5b6234b26c (patch) | |
| tree | 39cd8befd2cce3f1bd55f11c80d9a1e577eddcb3 /src/gui/opengl/qopenglprogrambinarycache.cpp | |
| parent | fa5a8fa82193f82ca9fd3f6c20497ed634674c1f (diff) | |
QSQL/ODBC: fix regression (trailing NUL)
When we fixed the callers of toSQLTCHAR() to use the result's size()
instead of the input's (which differ, if sizeof(SQLTCHAR) != 2), we
exposed callers to the append(0), which changes the size() of the
result QVLA. Callers that don't rely on NUL-termination (all?) now saw
an additional training NUL.
Fix by not NUL-terminating, and changing the only user of SQL_NTS to
use an explicit length.
Amends 4c445ef0bae8b36ec4a742552f0ebd81a1a90723 and
46af1fe49f7f419dc1b3231de9860e2da0ea48f8.
Done-with: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I6210b77e9417f46294df94cb32ab4134af8dc4c2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 9020034b3b6a3a8118e5959beed699bb8aaa3f95)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/gui/opengl/qopenglprogrambinarycache.cpp')
0 files changed, 0 insertions, 0 deletions
