Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.15.0
-
None
-
-
8
Description
All of the QByteArray .toInt() .toLong(), etc methods call the internal function nulTerminated() which ensures that the buffer being processed is terminated with a NUL character.
.toDouble() doesn't do this – which would not be a problem except for the fact that the numLen argument being passed to qt_asciiToDouble is not being respected inside that function (it may read past the end of buffer). See related issue: QTBUG-85580.
As such, I suggest either fixing QTBUG-85580 above or if not, then making .toDouble() operate on an enforced nulTerminated() buffer.
Attachments
Issue Links
- relates to
-
QTBUG-74286 Reimplement QLocaleData::stringTo(Uns|)LongLong() to take size of string
- Closed
-
QTBUG-66115 Let (QString|QLocale)::toFloat ignore trailing non-digits
- Open
- resulted in
-
QTBUG-85580 Often-used function `qt_asciiToDouble` may read past end of buffer
- Closed