diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-08-27 15:25:26 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-08-30 17:46:00 +0200 |
commit | 7d33779a795afb54af1a96c0da93b532f9db3ba2 (patch) | |
tree | a760a2777d752fba7f91135ae7b80d37750d5745 /src/corelib/text/qlocale_tools.cpp | |
parent | 5644af6f8a800a1516360a42ba4c1a8dc61fc516 (diff) |
Convert various callers of strtou?ll() to call strntou?ll()
Where size is known or can readily be determined.
Change-Id: I442e7ebb3757fdbf7d021a15e19aeba533b590a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale_tools.cpp')
-rw-r--r-- | src/corelib/text/qlocale_tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qlocale_tools.cpp b/src/corelib/text/qlocale_tools.cpp index c144dba938..18dd24daf1 100644 --- a/src/corelib/text/qlocale_tools.cpp +++ b/src/corelib/text/qlocale_tools.cpp @@ -223,7 +223,7 @@ void qt_doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, cha // This is why the final decimal point is offset by 1, relative to the number after 'e'. bool ok; const char *endptr; - decpt = qstrtoll(target.data() + eSign + 1, &endptr, 10, &ok) + 1; + decpt = qstrntoll(target.data() + eSign + 1, length - eSign - 1, &endptr, 10, &ok) + 1; Q_ASSERT(ok); Q_ASSERT(endptr - target.data() <= length); } else { |