Repository: qpid-proton
Updated Branches:
  refs/heads/master f0e6a0dba -> a8974a320


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/a8974a32
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a8974a32
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a8974a32

Branch: refs/heads/master
Commit: a8974a3202216b190e6a3c04180b81e431d06894
Parents: f0e6a0d
Author: Andrew Stitcher <[email protected]>
Authored: Mon Feb 1 16:56:27 2016 -0500
Committer: Andrew Stitcher <[email protected]>
Committed: Mon Feb 1 17:01:52 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/a8974a32/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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to