You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2016/02/02 23:23:01 UTC

[2/2] qpid-proton git commit: PROTON-1121: Avoid null dereference discovered by Coverity.

PROTON-1121: Avoid null dereference discovered by Coverity.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/5917bf8a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/5917bf8a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/5917bf8a

Branch: refs/heads/0.12.x
Commit: 5917bf8aac443a2ab3da24dcf5bc923cd8b77375
Parents: 5c38001
Author: Andrew Stitcher <as...@apache.org>
Authored: Mon Feb 1 16:56:27 2016 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Feb 2 17:17:05 2016 -0500

----------------------------------------------------------------------
 proton-c/src/sasl/sasl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5917bf8a/proton-c/src/sasl/sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/sasl.c b/proton-c/src/sasl/sasl.c
index 994082c..29d377e 100644
--- a/proton-c/src/sasl/sasl.c
+++ b/proton-c/src/sasl/sasl.c
@@ -600,7 +600,7 @@ void pn_sasl_allowed_mechs(pn_sasl_t *sasl0, const char *mechs)
     pni_sasl_t *sasl = get_sasl_internal(sasl0);
     free(sasl->included_mechanisms);
     sasl->included_mechanisms = mechs ? pn_strdup(mechs) : NULL;
-    if (strcmp(mechs, "ANONYMOUS")==0 ) {
+    if (mechs && strcmp(mechs, "ANONYMOUS")==0 ) {
       pn_transport_t *transport = get_transport_internal(sasl0);
       pni_sasl_force_anonymous(transport);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org