Opened 7 years ago

Closed 7 years ago

Last modified 6 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

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

comment:1 Changed 7 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
SipHeader?.

comment:2 Changed 6 years ago by riza

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