-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[V0.10] Coverity fixes #3423
Draft
matt335672
wants to merge
9
commits into
neutrinolabs:v0.10
Choose a base branch
from
matt335672:vo_10_coverity_scan
base: v0.10
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[V0.10] Coverity fixes #3423
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-02-11: Needs rebasing - see #3427 |
Add additional check to prevent Coverity assuming the worst (cherry picked from commit db32f9c)
1) file descriptors cannot be zero when not in use. 2) Coverity seems to have some problems with the loop(s) copying data from one socket to another, in that it assumes that eventually an integer overflow will occur. It's not obvious why this should be flagged, but this seems likely to be a false positive. This commit avoids the integer issue by using a simple pointer + count mechanism. The socket copy code has been placed in a separate function - before it was duplicated. Minor fixes have been made to error reporting around the connection code. (cherry picked from commit 1/3 2d29342) (cherry picked from commit 2/3 c122e05) (cherry picked from commit 3/3 e169733)
(cherry picked from commit eff8ba7)
(cherry picked from commit b7a94bd)
(cherry picked from commit f7543c2)
This Coverity issue was encountered in a private build, but does not appear to be in the Github CI build. Coverity is suspecting a copy-paste betweem these lines in sound.c:- 1838: xstream_copyin(s, &g_stream_inp->data[g_stream_inp->size - g_bytes_in_stream], i); 1844: xstream_copyin(s, &g_stream_inp->data[g_stream_inp->size - g_bytes_in_stream], g_bytes_in_stream); An inspection of the code shows this to bre a false positive (cherry picked from commit 6088ba3)
(cherry picked from commit cb90458)
(cherry picked from commit 8769481)
(cherry picked from commit f376196)
a8b70bc
to
9d99ab1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backports of the following devel PRs:-
#3421
#3422
Draft for now, so a few more can be added. None of these look crucial at the moment.