Repository: qpid-dispatch Updated Branches: refs/heads/master a7fa80f26 -> a94a7a9b7
DISPATCH-246 - Check if the name pointer is not null before doing strcmp Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/a94a7a9b Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/a94a7a9b Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/a94a7a9b Branch: refs/heads/master Commit: a94a7a9b7514e792811941708c6e1ef326661b08 Parents: a7fa80f Author: Ganesh Murthy <[email protected]> Authored: Wed Mar 30 16:57:03 2016 -0400 Committer: Ganesh Murthy <[email protected]> Committed: Wed Mar 30 16:57:03 2016 -0400 ---------------------------------------------------------------------- src/router_node.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a94a7a9b/src/router_node.c ---------------------------------------------------------------------- diff --git a/src/router_node.c b/src/router_node.c index 4b0f6e9..4bc5ad9 100644 --- a/src/router_node.c +++ b/src/router_node.c @@ -64,9 +64,11 @@ static void qd_router_connection_get_config(const qd_connection_t *conn, *role = QDR_ROLE_NORMAL; *name = cf->name; - if (strncmp("listener/", *name, 9) == 0 || - strncmp("connector/", *name, 10) == 0) - *name = 0; + if (*name) { + if (strncmp("listener/", *name, 9) == 0 || + strncmp("connector/", *name, 10) == 0) + *name = 0; + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
