diff --git a/src/mod/event_handlers/mod_rayo/iks_helpers.c b/src/mod/event_handlers/mod_rayo/iks_helpers.c index 707350a97d..2f293aabb7 100644 --- a/src/mod/event_handlers/mod_rayo/iks_helpers.c +++ b/src/mod/event_handlers/mod_rayo/iks_helpers.c @@ -396,7 +396,7 @@ int iks_attrib_is_decimal_between_zero_and_one(const char *value) { if (value && *value && switch_is_number(value)) { double value_d = atof(value); - if (value_d >= 0.0 || value_d <= 1.0) { + if (value_d >= 0.0 && value_d <= 1.0) { return SWITCH_TRUE; } } diff --git a/src/mod/event_handlers/mod_rayo/mod_rayo.c b/src/mod/event_handlers/mod_rayo/mod_rayo.c index 9ef5b8c913..25ab87b975 100644 --- a/src/mod/event_handlers/mod_rayo/mod_rayo.c +++ b/src/mod/event_handlers/mod_rayo/mod_rayo.c @@ -912,6 +912,7 @@ void rayo_message_send(struct rayo_actor *from, const char *to, iks *payload, in { const char *msg_name; struct rayo_message *msg = malloc(sizeof(*msg)); + switch_assert(msg); if (dup) { msg->payload = iks_copy(payload); } else { diff --git a/src/mod/event_handlers/mod_rayo/nlsml.c b/src/mod/event_handlers/mod_rayo/nlsml.c index 752ddc3efa..732687900d 100644 --- a/src/mod/event_handlers/mod_rayo/nlsml.c +++ b/src/mod/event_handlers/mod_rayo/nlsml.c @@ -271,6 +271,7 @@ static int tag_hook(void *user_data, char *name, char **atts, int type) if (type == IKS_OPEN || type == IKS_SINGLE) { struct nlsml_node *child_node = malloc(sizeof(*child_node)); + switch_assert(child_node); child_node->name = name; child_node->tag_def = switch_core_hash_find(globals.tag_defs, name); if (!child_node->tag_def) { diff --git a/src/mod/event_handlers/mod_rayo/rayo_cpa_component.c b/src/mod/event_handlers/mod_rayo/rayo_cpa_component.c index 19f2ddafd7..15dcd74aa7 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_cpa_component.c +++ b/src/mod/event_handlers/mod_rayo/rayo_cpa_component.c @@ -310,6 +310,7 @@ iks *rayo_cpa_component_start(struct rayo_actor *call, struct rayo_message *msg, have_grammar = 1; url_dup = strdup(url); + switch_assert(url_dup); if ((url_params = strchr(url_dup, '?'))) { *url_params = '\0'; url_params++;