Module: kamailio
Branch: master
Commit: bf6bd11a9b969c02a106f94ebf40cefbe8028456
URL:
https://github.com/kamailio/kamailio/commit/bf6bd11a9b969c02a106f94ebf40cef…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-20T07:17:27+02:00
core: parser - additioal check for content lenght spanning next line
---
Modified: src/core/parser/parse_content.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bf6bd11a9b969c02a106f94ebf40cef…
Patch:
https://github.com/kamailio/kamailio/commit/bf6bd11a9b969c02a106f94ebf40cef…
---
diff --git a/src/core/parser/parse_content.c b/src/core/parser/parse_content.c
index cda4b8177d..aff70f8660 100644
--- a/src/core/parser/parse_content.c
+++ b/src/core/parser/parse_content.c
@@ -224,8 +224,8 @@ char* parse_content_length(char* const buffer, const char* const end,
goto error;
}
/* search the begining of the number */
- while ( p<end && (*p==' ' || *p=='\t' ||
- (*p=='\n' && (*(p+1)==' '||*(p+1)=='\t')) ))
+ while ( p<end && (*p==' ' || *p=='\t'
+ || (*p=='\n' && p+1<end && (*(p+1)==' ' ||
*(p+1)=='\t')) ) )
p++;
if (p==end)
goto error;