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.
This PR addresses the following Coverity issues, which are not publically available:-
468106
In summary,
trans_get_wait_objs()
can write a maximum of two values to the array (for TLS connections), and there's only space for one. In practice this can't happen. Simplest fix is to make the buffer big enough for two values.468113
Coverity can't be sure that subtracting the int parameters min and max passed to the function won't result in integer overflow when
max - min
is calculated. Extra checks are added to the parameters and the call tosysconf(_SC_OPEN_MAX)
to mitigate this. In practice, this won't happen, as this function is only used in testing.468121
Coverity can't be sure that adding the result of a
write()
to anint
won't cause integer overflow. In practice it won't but a simple extra check should make this clear to Coverity.468142
Coverity is complaining that if "0" (which is two bytes long) is passed to this code as a pointed-to value by
str
:-that
str
could be incremented beyond the end of the string. Coverity is unable to see that the second byte of "0" (i.e. a '\0' character) cannot pass the testtolower(<byte>) == 'x'
. This is therefor a false-positive, and marked as such.468150
A codepath in this function results in the
passwd_file
not being freed. This is a confirmed defect.I can't currently run Coverity locally, so these are very much a best-shot at getting these addressed.