Skip to content

Commit

Permalink
topoh: check returned pointer when decoding call-id
Browse files Browse the repository at this point in the history
(cherry picked from commit b5ce9d8)
(cherry picked from commit 77eebed)
(cherry picked from commit c14bb3c)
  • Loading branch information
miconda committed Apr 3, 2019
1 parent 3198cfa commit 0c20541
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/topoh/th_msg.c
Expand Up @@ -541,6 +541,10 @@ int th_unmask_callid_str(str *icallid, str *ocallid)
}
out.s = th_mask_decode(icallid->s, icallid->len,
&th_callid_prefix, 0, &out.len);
if(out.s == NULL) {
LM_ERR("failed to decode call-id\n");
return -2;
}
if(out.len>=TH_CALLID_SIZE) {
pkg_free(out.s);
LM_ERR("not enough callid buf size (needed %d)\n", out.len);
Expand Down

0 comments on commit 0c20541

Please sign in to comment.