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

Clam 2484: Fix warning when scanning some HTML files #1084

Merged

Conversation

micahsnyder
Copy link
Contributor

HTML files with <style> blocks containing non-utf8 sequences are causing warnings when processing them to extract base64 encoded images.

To resolve this, we can use the to_string_lossy() method that may allocate and sanitize a copy of the content if the non-utf8 characters are encountered.

Resolves: #1082

HTML files with <style> blocks containing non-utf8 sequences are causing
warnings when processing them to extract base64 encoded images.

To resolve this, we can use the to_string_lossy() method that may
allocate and sanitize a copy of the content if the non-utf8 characters
are encountered.

Resolves: Cisco-Talos#1082
@shutton shutton self-requested a review November 14, 2023 19:30
Copy link
Contributor

@shutton shutton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner

@micahsnyder micahsnyder merged commit 86ba9bc into Cisco-Talos:main Nov 21, 2023
23 of 24 checks passed
@micahsnyder micahsnyder deleted the CLAM-2484-file-bytes-not-valid branch November 21, 2023 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants