libs/pjproject: security revision bump
[feed/telephony.git] / libs / pjproject / patches / 140-Ensure-2543-transaction-key-buffer-is-large-enough.patch
1 From b5f0f8868363c482a2c4ce343e3ee6ad256b0708 Mon Sep 17 00:00:00 2001
2 From: Mark Michelson <mmichelson@digium.com>
3 Date: Thu, 13 Apr 2017 16:20:07 -0500
4 Subject: [PATCH] Ensure 2543 transaction key buffer is large enough.
5
6 The CSeq method length needs to be factored into the allocated buffer
7 length. Otherwise, the buffer may not be large enough to accommodate the
8 entire key.
9 ---
10 pjsip/src/pjsip/sip_transaction.c | 3 ++-
11 1 file changed, 2 insertions(+), 1 deletion(-)
12
13 --- a/pjsip/src/pjsip/sip_transaction.c
14 +++ b/pjsip/src/pjsip/sip_transaction.c
15 @@ -288,7 +288,8 @@ static pj_status_t create_tsx_key_2543(
16 host = &rdata->msg_info.via->sent_by.host;
17
18 /* Calculate length required. */
19 - len_required = 9 + /* CSeq number */
20 + len_required = method->name.slen + /* Method */
21 + 9 + /* CSeq number */
22 rdata->msg_info.from->tag.slen + /* From tag. */
23 rdata->msg_info.cid->id.slen + /* Call-ID */
24 host->slen + /* Via host. */