Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
I was fuzz-testing a library that depends on this repo, and I got some errors.
Simply in SerMsg::unpack_corbs(...) there were two additions that in some particular circumstances could overflow, but rust adds some controls for this types of error and sometimes it panicked with "attempting to add with overflow".
Changing this to additions with "wrapping_add" we get a "controlled overflow" like in C (and i think this was the intent).
Description
Changed two additions (line 273 and 277) with wrapping add.
Motivation and Context
Fixes some hard to catch panics in an embedded context.
Types of changes
Checklist:
Other info