Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge pull request from GHSA-2qpg-f6wf-w984
  • Loading branch information
sauwming committed Aug 10, 2021
1 parent f6dfae1 commit 15663e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pjnath/src/pjnath/stun_msg.c
Expand Up @@ -1763,6 +1763,9 @@ static pj_status_t decode_errcode_attr(pj_pool_t *pool,
/* Get pointer to the string in the message */
value.ptr = ((char*)buf + ATTR_HDR_LEN + 4);
value.slen = attr->hdr.length - 4;
/* Make sure the length is never negative */
if (value.slen < 0)
value.slen = 0;

/* Copy the string to the attribute */
pj_strdup(pool, &attr->reason, &value);
Expand Down

0 comments on commit 15663e3

Please sign in to comment.