You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kamailio/debian/patches/upstream/core-parse-privacy-recomput...

31 lines
927 B

From: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri, 8 Dec 2023 22:10:36 +0100
Subject: core: parse privacy recompute lenght of rest to parse
(cherry picked from commit 804ee651b45498727196886c97cb55d20b254c4a)
---
src/core/parser/parse_privacy.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/core/parser/parse_privacy.c b/src/core/parser/parse_privacy.c
index cfc009a..4b683cb 100644
--- a/src/core/parser/parse_privacy.c
+++ b/src/core/parser/parse_privacy.c
@@ -177,14 +177,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;