Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resumption timestamps are limited to 32 bits #3948

Closed
jacobkeeler opened this issue Sep 21, 2022 · 1 comment
Closed

Resumption timestamps are limited to 32 bits #3948

jacobkeeler opened this issue Sep 21, 2022 · 1 comment
Projects

Comments

@jacobkeeler
Copy link
Contributor

Bug Report

Detected by Coverity (CIDs 277332 and 277353).

The timestamp and last_ign_off_time parameters in the resumption data storage are currently written to and read as uint32_t, which could be shorter than time_t. These parameters should be stored as int64_t to prevent narrowing conversions. See here

Reproduction Steps
  1. Set clock so that the timestamp goes past the unsigned 32 bit limit (year=2200 should work)
  2. Start Core
  3. Connect app
  4. Stop Core and check app_info.dat
Expected Behavior

timestamp should match up with system clock

Observed Behavior

timestamp does not match up with system clock due to narrowing conversion

OS & Version Information
  • OS/Version: Ubuntu 20.04
  • SDL Core Version: master
@theresalech theresalech added this to Review In Progress in 8.2.0 Sep 21, 2022
@ShobhitAd
Copy link
Contributor

Closed via #3946

@ShobhitAd ShobhitAd moved this from Review In Progress to Completed Bug Fixes/ Enhancements in 8.2.0 Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
8.2.0
Completed Bug Fixes / Enhancements
Development

No branches or pull requests

2 participants