Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.6, 6.10
-
None
-
3
-
5a230596c (dev), 055b5a83b (6.9), 9c59689de (6.8), 3d71e69a7 (tqtc/lts-6.5), 44ddb34da (dev), 05b91b119 (6.9), 7a2e24a07 (tqtc/lts-5.15), 051518320 (6.8), 9e7e3be21 (tqtc/lts-6.5), a35a46a4d (tqtc/lts-5.15)
-
Foundation Sprint 124, Foundation Sprint 125
Description
In qtextstream.cpp there's:
void QTextStreamPrivate::putNumber(qulonglong number, bool negative)
{
...
if (negative && base == 10) {
result = dd->longLongToString(-static_cast<qlonglong>(number), -1,
base, -1, flags);
If the cast results in LLONG_MIN, the subsequent negation (unary -) is UB. Probably the same code can be rewritten...?
Attachments
For Gerrit Dashboard: QTBUG-133269 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
622087,6 | Fix UB in QTextStreamPrivate::putNumber() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
622331,2 | Modernise tst_QTextStream::manipulators() and add two new data rows | dev | qt/qtbase | Status: MERGED | +2 | 0 |
623255,2 | Modernise tst_QTextStream::manipulators() and add two new data rows | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
623268,2 | Modernise tst_QTextStream::manipulators() and add two new data rows | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
623402,2 | Modernise tst_QTextStream::manipulators() and add two new data rows | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | +1 |
624458,4 | Modernise tst_QTextStream::manipulators() and add two new data rows | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | +1 |
625843,2 | Fix UB in QTextStreamPrivate::putNumber() | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
625876,2 | Fix UB in QTextStreamPrivate::putNumber() | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
632089,2 | Fix UB in QTextStreamPrivate::putNumber() | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
634215,4 | Fix UB in QTextStreamPrivate::putNumber() | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |