Opened 11 years ago

Closed 11 years ago

#685 closed defect (fixed)

Crash or assertion on debug mode when processing large SIP packet

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.0.1
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

A crash or assertion on debug mode will occur when processing (RX or TX) SIP packet with size close to PJ_LOG_MAX_SIZE (default is 2000).

The assertion is in pjlib/src/pj/compat/string_compat.c:76:

pj_assert(s1[len-1] == MARK_CHAR || s1[len-1] == '\0');

This is because the total log message size that is created to log this SIP packet may exceed the PJ_LOG_MAX_SIZE and this will cause the log to write data to outside the given buffer (because Symbian doesn't have vsnprintf). On debug mode it will trigger the above assertion.

Change History (1)

comment:1 Changed 11 years ago by bennylp

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

Workaround in r2381:

  • set the PJ_LOG_MAX_SIZE to (PJSIP_MAX_PKT_LEN+500) in config_site_sample.h
Note: See TracTickets for help on using tickets.