-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
file/swf: Use lzma-rs decompression instead of libhtp. #8171
Conversation
Use the lzma-rs crate for decompressing swf/lzma files instead of the lzma decompressor in libhtp. This decouples suricata from libhtp except for actual http parsing, and means libhtp no longer has to export a lzma decompression interface. Ticket: OISF#5638
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.
minor feedback
@@ -0,0 +1,68 @@ | |||
use lzma_rs::decompress::{Options, Stream}; |
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.
can you add a copyright header here?
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.
Yup! Sorry I forgot it.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #8171 +/- ##
==========================================
+ Coverage 81.73% 81.80% +0.07%
==========================================
Files 962 963 +1
Lines 276975 276998 +23
==========================================
+ Hits 226379 226611 +232
+ Misses 50596 50387 -209
Flags with carried forward coverage won't be shown. Click here to find out more. |
Error::HeaderTooShort(_) => LzmaStatus::LzmaHeaderTooShortError, | ||
Error::LzmaError(e) => { | ||
if e.to_string().contains("exceeded memory limit") { | ||
LzmaStatus::LzmaMemoryError |
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 for this
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 for this nice work.
CI : ✅
Code : looks good to me, comments were taken into account
Commits segmentation : ok
Commit messages : nice
Git ID set : looks fine for me
CLA : should be fine
Redmine ticket : ok
Rustfmt : fine for new file
Tests : good enough for me with current ones
Dependencies added: MIT License is good
Updated in #8176 |
Use the lzma-rs crate for decompressing swf/lzma files instead of the lzma decompressor in libhtp. This decouples suricata from libhtp except for actual http parsing, and means libhtp no longer has to export a lzma decompression interface.
Ticket: #5638
Make sure these boxes are signed before submitting your Pull Request -- thank you.
Link to redmine ticket: 5638
Describe changes:
Update to #8154