Skip to content

Commit

Permalink
mangler: Add coverity tag
Browse files Browse the repository at this point in the history
CID #417694, #417767
  • Loading branch information
oanatitoc committed Sep 27, 2024
1 parent 7eb84c8 commit d384b0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/mangler/contact_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ encode_uri (str uri, str *encoding_prefix, str *public_ip,char separator, str *
if (foo < 0)
{
LM_ERR("unable to encode Contact URI [%.*s].Return code %d\n",uri.len,uri.s,foo);

/* coverity[return_overflow: FALSE] - foo is min -10 */
return foo - 20;
}
#ifdef DEBUG
Expand Down Expand Up @@ -597,6 +599,8 @@ decode_uri (str uri, char separator, str * result)
if (foo < 0)
{
LM_ERR("failed to decode Contact uri .Error code %d\n",foo);

/* coverity[return_overflow: FALSE] - foo is min -6 */
return foo - 20;
}
/* sanity check */
Expand Down

0 comments on commit d384b0e

Please sign in to comment.