[pjsip] Too many video codecs cause a stack overflow on Android

Roy Zhang roy.zhang at browan.com
Fri Oct 23 08:03:22 EDT 2015


Recently I met a bug which is caused by a very big sized local array and is
mainly about stack overflow.

In my test, when I started a video call, PjSIP run into this function:
pjmedia_endpt_create_video_sdp().

In this function, there is a local array:

pjmedia_vid_codec_info codec_info[PJMEDIA_VID_CODEC_MGR_MAX_CODECS];

the array's size on Android in my situation was 204*32=6528 bytes but the
thread's stack left may not be enough to hold it and hence it crashed.

So I think there should be an option to set this value and currently I just
define this macro to be 4. Thanks all.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20151023/b5276b3f/attachment-0002.html>


More information about the pjsip mailing list