diff options
| author | Xiong LinLin <xionglinlin@uniontech.com> | 2025-08-29 13:17:03 +0800 |
|---|---|---|
| committer | Xiong LinLin <xionglinlin@uniontech.com> | 2025-12-18 05:19:05 +0000 |
| commit | 91f617899e63817c32eb47d8bbcf08603734158a (patch) | |
| tree | e150fada39f73c89e196e1a06ffe62872da7b0d1 /examples/opengl/stereoqopenglwidget/main.cpp | |
| parent | fee75b8b1370a1d47d9a8350567a5fd853c5108e (diff) | |
The old code used direct negation to convert negative numbers to
positive values, which caused undefined behavior when the input
was INT_MIN since -INT_MIN cannot be represented in signed int.
Use QtPrivate::qUnsignedAbs() instead, which safely handles all
signed integer values including INT_MIN without overflow.
Fixes: QTBUG-139635
Pick-to: 6.11 6.10 6.9 6.8
Change-Id: Ifff7241bc25e50f52d40fe3373a6c779eb430cc6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples/opengl/stereoqopenglwidget/main.cpp')
0 files changed, 0 insertions, 0 deletions
