Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#2049 closed enhancement (fixed)

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 (2)

comment:1 Changed 3 years ago by riza

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

In 5669:

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

comment:2 Changed 2 years ago by riza

In 5877:

Re #2049 (misc): Add local RTP/RTCP address information to MediaTransportInfo?.

Version 0, edited 2 years ago by riza (next)
Note: See TracTickets for help on using tickets.