diff options
| author | Edward Welbourne <edward.welbourne@qt.io> | 2020-09-21 16:51:33 +0200 |
|---|---|---|
| committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-03-25 17:04:37 +0100 |
| commit | 460d7c87803b47b28434cc44d7d027b3a9c48dac (patch) | |
| tree | 30cd4c71976bfd8a15d196a908390696d1449593 /src/plugins/platforms/android/androidcontentfileengine.cpp | |
| parent | 131c7009fa4b3969bb74b17f8e2cec8ba6e710a8 (diff) | |
Avoid overflow in some more qdatetime.cpp functions
One multiplied TIME_T_MAX * MSECS_PER_SEC despite knowing this to be
too close for comfort to the bounds of qint64; but the comment
indicated it should have been using a 32-bit signed max in place of
TIME_T_MAX. Two others simply neglected to check for overflow.
Also use QRoundingDown::qMod() in one place to avoid needlessly
complicating arithmetic; and assert, in another, that we were never in
danger of overflowing anyway (thanks to an earlier isValid() check).
Restructured QDateTimePrivate::zoneMSecsToEpochMSecs() in the process
of catching its potential overflow.
Change-Id: I429321d90246ba922cccf09a4f028f03a514cb6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/androidcontentfileengine.cpp')
0 files changed, 0 insertions, 0 deletions
