Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.43k stars 706 forks source link

Clam 2256 add alz support #1183

Closed ragusaa closed 7 months ago

micahsnyder commented 8 months ago

PR needs to be rebased with the upstream main branch to bump the FLEVEL to 210 so ALZ file type detection works and tests pass, and to resolve merge conflicts.

ragusaa commented 8 months ago

Over all I'm super impressed with this being your first large amount of Rust code. Pretty awesome.

Thank you, I am starting to really like rust.

ragusaa commented 7 months ago

A few minor things this time. My main concern is I don't think we should use info! at all. We've gotten (understandable) complaints about the "early end" warnings in the PDF parser. Users get confused by warnings when scanning malformed (but non-malicious) files.

In the future, we would want to record such events as weak indicators that could be used by signatures. That is of course pending implementing the weak indicator feature. Anyways... I ramble.

Final thing -- there is a linker error when building on Windows. It seems that the bzip-sys crate is compiling bzip2-1.0.8 into our libclamav_rust static library. That of course causes a linker error when we link libclamav (+libclamav_rust) with bz2.dll. I'm not sure how to solve it. I created this issue to seek help: alexcrichton/bzip2-rs#102

I agree on the info!.

So we'll wait to merge until we resolve the link issue?

ragusaa commented 7 months ago

Re-ran testing with your changes, and everything still looks good.

micahsnyder commented 7 months ago

I just rebased it, fixed merged conflicts, and squashed commits down, and re-ran clam-format once more.