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

responder: fix covscan issues #5646

Closed
wants to merge 1 commit into from
Closed

Conversation

ikerexxe
Copy link
Contributor

Fix two covscan issues that I accidentally included in commit
f890fc4.

Error: FORWARD_NULL (CWE-476): [#def60]
sssd-2.4.0/src/responder/common/responder_common.c:1009: var_compare_op: Comparing "rctx->sock_name" to null implies that "rctx->sock_name" might be null.
sssd-2.4.0/src/responder/common/responder_common.c:1039: var_deref_model: Passing null pointer "rctx->sock_name" to "strlen", which dereferences it.

Error: CLANG_WARNING: [#def61]
sssd-2.4.0/src/responder/common/responder_common.c:1039:64: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'

Resolves: #5638

Fix two covscan issues that I accidentally included in commit
f890fc4.

Error: FORWARD_NULL (CWE-476): [#def60]
sssd-2.4.0/src/responder/common/responder_common.c:1009: var_compare_op: Comparing "rctx->sock_name" to null implies that "rctx->sock_name" might be null.
sssd-2.4.0/src/responder/common/responder_common.c:1039: var_deref_model: Passing null pointer "rctx->sock_name" to "strlen", which dereferences it.

Error: CLANG_WARNING: [#def61]
sssd-2.4.0/src/responder/common/responder_common.c:1039:64: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'

Resolves: SSSD#5638
@ikerexxe
Copy link
Contributor Author

@alexey-tikhonov can you review it? I already tested it with covscan and the error disappear so I think that it should be quite straightforward.

@alexey-tikhonov
Copy link
Member

Thank you, ACK.

@pbrezina
Copy link
Member

Pushed PR: #5646

  • master
    • ac1a07a - responder: fix covscan issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Responder: potential NULL deref
3 participants