Skip to content

Commit

Permalink
msrp: safety checks to avoid analyzer reports
Browse files Browse the repository at this point in the history
(cherry picked from commit 7465320)
  • Loading branch information
miconda committed Aug 30, 2017
1 parent 23162ff commit e870519
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/msrp/msrp_parser.c
Expand Up @@ -642,15 +642,17 @@ int msrp_explode_str(str **arr, str *in, str *del)
{
if(in->s[i]==del->s[j])
{
larr[k].len = in->s + i - larr[k].s;
if(k<n)
larr[k].len = in->s + i - larr[k].s;
k++;
if(k<n)
larr[k].s = in->s + i + 1;
break;
}
}
}
larr[k].len = in->s + i - larr[k].s;
if(k<n)
larr[k].len = in->s + i - larr[k].s;

*arr = larr;

Expand Down

0 comments on commit e870519

Please sign in to comment.