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 2410 recent coverity issues #998

Merged

Conversation

micahsnyder
Copy link
Contributor

No description provided.

`cli_getpagesize()` may return -1 in an error condition.
If it does, let's just treat it as 4096.

I believe the actual coverity complaint is a false positive, but it's
fair to account for the error case and this should shut it up.
On error `getmaxyx()` may set the output params to -1.
We must check for this before treating the result as unsigned.
The `read()` function doesn't null terminate the `nwatch_str`, but
`strtol` requires it to be NULL-terminated.
In aspack decrypt function, there's a check to make sure that backbytes
doesn't exceed 57, because it is used as an index in init_array.
However, it is mathematically impossible.
So this commit removes the check.
Somehow forgot to save and commit final error handling check on the new
set_tls_client_certificate() function.
This change is needed to have Freshclam fail if you try to use the new
client certificate environment variables incorrectly.
@micahsnyder micahsnyder force-pushed the CLAM-2410-recent-coverity-issues branch from 17eefa5 to 9581ed6 Compare August 17, 2023 01:10
@micahsnyder micahsnyder merged commit a6501dd into Cisco-Talos:main Aug 17, 2023
22 of 23 checks passed
@micahsnyder micahsnyder deleted the CLAM-2410-recent-coverity-issues branch August 17, 2023 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants