8000 check max/min values for ms, s, min when constructing TimeDuration by jadamcrain · Pull Request #382 · dnp3/opendnp3 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

check max/min values for ms, s, min when constructing TimeDuration - #382

Merged
jadamcrain merged 2 commits into
developfrom
bug/prevent-duration-overflow
Jun 1, 2020
Merged

jadamcrain merged 2 commits into
developfrom
bug/prevent-duration-overflow

Conversation

@jadamcrain
Copy link
Copy Markdown
Member

Fix for #381

std::chrono::<milliseconds, seconds, etc> can mult overflow b/c of ratio conversions when
storing in std::chrono::steady_clock duration.

@codecov
codecov Bot commented Jun 1, 2020 •
Copy link
Copy Markdown

Codecov Report

Merging #382 into develop will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #382      +/-   ##
===========================================
+ Coverage    51.67%   51.75%   +0.08%     
===========================================
  Files          456      456              
  Lines        13598    13602       +4     
===========================================
+ Hits          7027     7040      +13     
+ Misses        6571     6562       -9     
Impacted Files Coverage Δ
cpp/lib/src/util/TimeDuration.cpp 87.50% <100.00%> (+12.50%) ⬆️
cpp/lib/src/link/LinkContext.cpp 90.16% <0.00%> (+0.54%) ⬆️
cpp/lib/src/channel/IOHandler.cpp 80.15% <0.00%> (+3.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 315546b...3a29024. Read the comment docs.

@jadamcrain
jadamcrain merged commit 279788e into develop Jun 1, 2020
@jadamcrain
jadamcrain deleted the bug/prevent-duration-overflow branch June 1, 2020 21:05
@jadamcrain jadamcrain changed the title check maximum values for ms, s, min when constructing TimeDuration check max/min values for ms, s, min when constructing TimeDuration Jun 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0