diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2020-04-15 13:58:33 -0300 |
|---|---|---|
| committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-04-30 11:00:29 +0000 |
| commit | 52a2505672cbb1ca8b5b32f7bc1259485c65483b (patch) | |
| tree | 9acd649a7bbdc4a76f80466c1357a3f830fef2b6 /src/widgets/doc/snippets/graphicsview.cpp | |
| parent | 1eeabc6652220ff263eaa63872cd52c1693cbf69 (diff) | |
QCborValue: avoid signed integer oveflows when decoding time_t
QDateTime::fromSecsSinceEpoch() multiplies by 1000 but does not check
for overflow. That means we must do so in QCborValue validation. We
can't use mul_overflow<qint64> on 32-bit platforms, so we do a compare-
and-branch there. For 64-bit platforms, we prefer to do the
multiplication with checked overflow, as the common case is that it will
not overflow and we'll need the multiplication anyway.
Change-Id: Ibdc95e9af7bd456a94ecfffd16060cba6f1c86b8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/graphicsview.cpp')
0 files changed, 0 insertions, 0 deletions
