Skip to content

Fix scan error when image fuzzy hash fails (0.105.1)#644

Merged
val-ms merged 1 commit intoCisco-Talos:dev/0.105.1from
val-ms:CLAM-1978-fuzzy-errors-0.105.1
Jul 19, 2022
Merged

Fix scan error when image fuzzy hash fails (0.105.1)#644
val-ms merged 1 commit intoCisco-Talos:dev/0.105.1from
val-ms:CLAM-1978-fuzzy-errors-0.105.1

Conversation

@val-ms
Copy link
Contributor

@val-ms val-ms commented Jul 19, 2022

This is a backport of #618


Scanning a file containing an image where it fails to calculate the
image fuzzy hash may cause the entire scan to end with an error.

This commit fixes that by ignoring any image fuzzy hash failure.
If calculating the hash fails, the hash is left uninitialized (all
zeroes). To prevent doing image fuzzy hash lookups when it failed,
I added a boolean that is set to true only after creating the hash.

Fixes: #600
Fixes: #593

Scanning a file containing an image where it fails to calculate the
image fuzzy hash may cause the entire scan to end with an error.

This commit fixes that by ignoring any image fuzzy hash failure.
If calculating the hash fails, the hash is left uninitialized (all
zeroes). To prevent doing image fuzzy hash lookups when it failed,
I added a boolean that is set to true only after creating the hash.

Fixes: Cisco-Talos#600
Fixes: Cisco-Talos#593
@val-ms val-ms changed the base branch from main to dev/0.105.1 July 19, 2022 17:57
@val-ms val-ms merged commit 9ababfc into Cisco-Talos:dev/0.105.1 Jul 19, 2022
@val-ms val-ms deleted the CLAM-1978-fuzzy-errors-0.105.1 branch July 19, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Can't parse data ERROR" upon scanning simple png Some PDFs fail to scan with 0.105 (but work with 0.104)

1 participant