Module: kamailio
Branch: 5.7
Commit: 8674b333300d5829bff9cb4993886bcf7bea249b
URL:
https://github.com/kamailio/kamailio/commit/8674b333300d5829bff9cb4993886bc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-08T22:12:01+01:00
core: parse privacy recompute lenght of rest to parse
(cherry picked from commit 804ee651b45498727196886c97cb55d20b254c4a)
---
Modified: src/core/parser/parse_privacy.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8674b333300d5829bff9cb4993886bc…
Patch:
https://github.com/kamailio/kamailio/commit/8674b333300d5829bff9cb4993886bc…
---
diff --git a/src/core/parser/parse_privacy.c b/src/core/parser/parse_privacy.c
index 64431468675..89423c1dffa 100644
--- a/src/core/parser/parse_privacy.c
+++ b/src/core/parser/parse_privacy.c
@@ -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;