Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
dev
-
None
-
d351a97e8 (dev), 923918c66 (6.7), 59a273d15 (6.6), a175c5266 (tqtc/lts-6.5)
Description
UBsan complains when building qtdeclarative because a null pointer is passed as an argument to memcpy when that argument is declared non-null.
This happens because a null string is passed to QString::arg().
Passing a null string to QString::arg() may seem silly but it can occur in code where it would make sense to expect it to work.
https://codereview.qt-project.org/c/qt/qtdeclarative/+/528756?tab=comments
The documentation for QString::arg() doesn't say anything about not expecting a null string.
Attachments
For Gerrit Dashboard: QTBUG-120624 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
531023,1 | QString::arg: don't pass nullptr to memcpy() | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: NEW | 0 | 0 |
528880,7 | QString::arg: don't pass nullptr to memcpy() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
529628,2 | QString::arg: don't pass nullptr to memcpy() | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
529935,2 | QString::arg: don't pass nullptr to memcpy() | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
530961,2 | QString::arg: don't pass nullptr to memcpy() | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |