Module: kamailio
Branch: 4.2
Commit: 2457b856f327191c7b85c79f4e99f3948c9d49d4
URL:
https://github.com/kamailio/kamailio/commit/2457b856f327191c7b85c79f4e99f39…
Author: Hugh Waite <hugh.waite(a)acision.com>
Committer: Hugh Waite <hugh.waite(a)acision.com>
Date: 2015-09-17T15:57:45+01:00
parser: Fix parser error when Retry-After is last header
- Prevent off-by-one error when CRLF is followed by CRLF
(cherry picked from commit deab9d061cbe180aaf32b7416c2477b4eb901ec8)
---
Modified: parser/parse_retry_after.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2457b856f327191c7b85c79f4e99f39…
Patch:
https://github.com/kamailio/kamailio/commit/2457b856f327191c7b85c79f4e99f39…
---
diff --git a/parser/parse_retry_after.c b/parser/parse_retry_after.c
index 5c30830..4ce09f4 100644
--- a/parser/parse_retry_after.c
+++ b/parser/parse_retry_after.c
@@ -75,8 +75,6 @@ char* parse_retry_after(char* const buf, const char* const end,
unsigned* const
/* find the end of header */
for (; t<end; t++){
if (*t=='\n'){
- if (((t+1)<end) && (*(t+1)=='\r'))
- t++;
if (((t+1)<end) && (*(t+1)==' ' || *(t+1)=='\t')){
t++;
continue; /* line folding ... */