Ticket #2049 (closed enhancement: fixed)

Opened 2 weeks ago

Last modified 2 weeks ago

Try to allocate larger buffer size instead of immediately returning error when converting pjsip_hdr to SipHeader

Reported by: riza Owned by: bennylp
Priority: normal Milestone: release-2.8
Component: pjsua2 Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Method SipHeader::fromPj() which converts pjsip_hdr to SipHeader, uses a local char array with a fixed size of 256 to buffer information from the pjsip_hdr.

This buffer is quite small, which leads to an unnecessary exception when large headers are exchanged. In one instance we encountered such an exception while receiving a large “Authorization”-Header.

This patch will try to allocate larger buffer space, instead of returning error on the first try.

Thanks to David Wichter for the report.

Change History

comment:1 Changed 2 weeks ago by riza

  • Status changed from new to closed
  • Resolution set to fixed

In 5669:

Close #2049: Try to allocate larger buffer size when converting pjsip_hdr to
SipHeader?.

Note: See TracTickets for help on using tickets.