-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
6.12
-
None
In the QContainerImplHelper::mid function (qtbase/src/corelib/tools/qarraydata.h:189), there is an integer overflow issue when processing INT_MIN as the position parameter.Specific Issue:When position = INT_MIN and length = INT_MAX, the calculation of length + position causes integer overflow:
- On 32-bit systems: INT_MIN = -2147483648, INT_MAX = 2147483647
- length + position = 2147483647 + (-2147483648) = -1
This leads to unexpected behavior and may return incorrect results.
For Gerrit Dashboard: QTBUG-139034 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
667080,4 | corelib: add boundary condition test for QString::mid with extreme values | dev | qt/qtbase | Status: NEW | 0 | 0 |