Module: kamailio
Branch: master
Commit: 685817088ff9c72c055e72091fa6f923b824c206
URL:
https://github.com/kamailio/kamailio/commit/685817088ff9c72c055e72091fa6f92…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-14T08:03:47+02:00
core: parse content - group operation to avoid overflow
---
Modified: src/core/parser/parse_content.c
---
Diff:
https://github.com/kamailio/kamailio/commit/685817088ff9c72c055e72091fa6f92…
Patch:
https://github.com/kamailio/kamailio/commit/685817088ff9c72c055e72091fa6f92…
---
diff --git a/src/core/parser/parse_content.c b/src/core/parser/parse_content.c
index ee56e09b7a..cda4b8177d 100644
--- a/src/core/parser/parse_content.c
+++ b/src/core/parser/parse_content.c
@@ -237,7 +237,7 @@ char* parse_content_length(char* const buffer, const char* const end,
LM_ERR("content lenght value is too large\n");
goto error;
}
- number = number*10 + (*p)-'0';
+ number = number*10 + ((*p) - '0');
size ++;
p++;
}