Ticket #2049 (closed enhancement: fixed)

Opened 15 months ago

Last modified 3 months 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.7.1
Component: pjsua2 Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no


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 15 months 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

comment:2 Changed 3 months ago by riza

Last edited 3 months ago by riza (previous) (diff)
Note: See TracTickets for help on using tickets.