Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential over/underflow as noted by "TODO:" comment (#8081)
Fixed potential errors caused by overflow or underfow in SectionInput.cpp ## PR Checklist * [x] CLA signed * [x] Tests added/passed ## Detailed Description of the Pull Request / Additional comments In selectionInput.cpp, there is both a potential overflow and potential underflow. To address this issue, I casted the calculation up to int, which is then checked because of integer promotion. Underflow and underflow is therefore impossible because now if the calculation exceeds SHORT_MAX, it will have exceeded bufferSize.BottomInclusive() or bufferSize.Top() anyway, and be set to them. ## Validation Steps Performed Passed Unit Testing Manual Validation
- Loading branch information