-
Notifications
You must be signed in to change notification settings - Fork 650
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
fix(route_handler): exception in route_handler caused by int overflow #6755
Conversation
Signed-off-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl>
067890d
to
6617ec1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
It looks like we need to care invalid narrowing conversion throughout the codebase for better quality. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6755 +/- ##
=======================================
Coverage 14.93% 14.93%
=======================================
Files 1944 1944
Lines 134061 134061
Branches 39891 39891
=======================================
Hits 20025 20025
Misses 91735 91735
Partials 22301 22301
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…autowarefoundation#6755) Remove cast to int which might cause overflow Signed-off-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl> Co-authored-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl>
…#6755) Remove cast to int which might cause overflow Signed-off-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl> Co-authored-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl>
…autowarefoundation#6755) Remove cast to int which might cause overflow Signed-off-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl> Co-authored-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl>
Description
Removed cast to int which cause overflow and exception when lanelet id is greater than int. verified that lanelet.Id is type int64
Tests performed
before, exception was thrown because could not find element with negative id :
after there is no exception
Effects on system behavior
Fix exception in case when lanelet contains larger ids (int could not handle)
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.