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

detect/asn1: Fix relative_offset keyword option - v2 #4978

Closed

Conversation

sharksforarms
Copy link
Contributor

Previous PR: #4966

Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/3720

Describe changes:

  • Fix relative_offset keyword option to be relative in regards to the
    last content match
  • Change relative_offset to int32_t with bounds check to allow the full
    range of the packet buffer size (uint16_t)
  • Added checks for over/underflows
  • Changed the offset type to uint16_t because the offset is applied to
    the payload length, which is a uint16_t
  • Adjusted test cases to work relative to the content match
  • Added test case to verify bounds

PRScript output (if applicable):

Note: I fixed this in #4954 as well

- Fix relative_offset keyword option to be relative in regards to the
last content match
- Change relative_offset to int32_t with bounds check to allow the full
range of the packet buffer size (uint16_t)
- Added checks for over/underflows
- Changed the offset type to uint16_t because the offset is applied to
the payload length, which is a uint16_t
- Adjusted test cases to work relative to the content match
- Added test case to verify bounds
@victorjulien victorjulien mentioned this pull request Jun 9, 2020
@victorjulien
Copy link
Member

Merged in #5047, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants