Skip to content

Commit

Permalink
core: parse privacy recompute lenght of rest to parse
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Dec 8, 2023
1 parent 5d97afe commit 804ee65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/parser/parse_privacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,13 @@ int parse_privacy(struct sip_msg *msg)

values = 0;
p = next.s;
len = next.len;
beyond = p + len;
beyond = next.s + next.len;

while(p < beyond) {
len = beyond - p;
if((val_len = parse_priv_value(p, len, &value)) != 0) {
values |= value;
p = p + val_len;
len = len - val_len;
} else {
LM_ERR("invalid privacy value\n");
return -1;
Expand Down

0 comments on commit 804ee65

Please sign in to comment.