Skip to content

Commit

Permalink
fixing coverity found defects - null dereference, invalid e164 number…
Browse files Browse the repository at this point in the history
… check

(cherry picked from commit b8e2318)
(cherry picked from commit c48773c)
  • Loading branch information
ph4r05 authored and liviuchircu committed Jan 18, 2016
1 parent 5e31e35 commit 26de471
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/rtpproxy/rtpproxy.c
Expand Up @@ -2822,7 +2822,7 @@ static int move_bavp2dlg(struct sip_msg *msg, struct dlg_cell *dlg, str *rval1,
}

not_moved:
LM_DBG("nothing moved - message type %d\n", msg->first_line.type);
LM_DBG("nothing moved - message type %d\n", !msg ? -1 : msg->first_line.type);
if (rval1) rval1->len = 0;
if (rval2) rval2->len = 0;
if (setid) *setid = DEFAULT_RTPP_SET_ID;
Expand Down
2 changes: 1 addition & 1 deletion modules/uri/checks.c
Expand Up @@ -440,7 +440,7 @@ static inline int e164_check(str* _user)
if ((_user->len > 2) && (_user->len < 17) && ((_user->s)[0] == '+')) {
for (i = 1; i <= _user->len; i++) {
c = (_user->s)[i];
if (c < '0' && c > '9') return -1;
if (c < '0' || c > '9') return -1;
}
return 1;
}
Expand Down

0 comments on commit 26de471

Please sign in to comment.