From: Bogdan-Andrei Iancu <bogdan@opensips.org>
Date: Tue, 30 Jan 2018 14:42:22 +0200
Subject: [PATCH] Explicit reset of conn ID on error
if reverse_hex2int fails, be sure the conn id stays 0.
(cherry picked from commit a61fa8646e6f865b347b3e725c6362dc15d4e57b)
diff --git a/forward.c b/forward.c
index 835e8b4eb..24dc2da5f 100644
--- a/forward.c
+++ b/forward.c
@@ -523,7 +523,8 @@ int forward_reply(struct sip_msg* msg)
if (msg->via1->i&&msg->via1->i->value.s){
s=msg->via1->i->value.s;
len=msg->via1->i->value.len;
- reverse_hex2int(s, len, &id);
+ if (reverse_hex2int(s, len, &id)<0)
+ id = 0;
}
}