summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-03-31 18:47:04 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-04-05 19:40:17 +0200
commit7db6aa4395541288ba790e5acdfad4a5cc5d4cd2 (patch)
tree207d09611d9cca09b9f8073832692e8af5b03b70 /src/tools/moc
parentd9ae822e05c90ee6b4df3fdbf7a8d798b2f92c72 (diff)
Fix overflow issue discovered by MSVC in C++20 mode
In setMSecsSinceEpoch(), when epochMSecsToLocalTime() fails (e.g. when msecs is near one end of time and the offset being added causes overflow), the call to setDateTime(d, ...) is bypassed so the d-ptr is not updated and getStatus(d) returns the status prior to the function call. The new status being prepared by the function should thus not be updated to getStatus(d) unless setDateTime(d, ...) was called. This amends commit 74eddd5bf0672db4edd190aefd813bcf7eb26df4 Done-with: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Fixes: QTBUG-102157 Pick-to: 6.3 Change-Id: I25e358070907f22d9e4fb0030fa82ec290c7a730 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/tools/moc')
0 files changed, 0 insertions, 0 deletions