Module: kamailio
Branch: master
Commit: 804ee651b45498727196886c97cb55d20b254c4a
URL:
https://github.com/kamailio/kamailio/commit/804ee651b45498727196886c97cb55d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-08T22:10:36+01:00
core: parse privacy recompute lenght of rest to parse
---
Modified: src/core/parser/parse_privacy.c
---
Diff:
https://github.com/kamailio/kamailio/commit/804ee651b45498727196886c97cb55d…
Patch:
https://github.com/kamailio/kamailio/commit/804ee651b45498727196886c97cb55d…
---
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;