uninitialized variable in icedemo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found a bug in icedemo.c -- use of an uninitialized variable.

In static int encode_session(char buffer[], unsigned maxlen)
I added
        cand_cnt = PJ_ICE_ST_MAX_CAND;
before
        status = pj_ice_strans_enum_cands(icedemo.icest, comp+1,
                                          &cand_cnt, cand);
because this parameter's in value defines the maximum number of candidates.

The uninitialized variable seemed to work (randomly?) on Linux and Windows
but not at all on MacOS X.

Without that fix I would never see the candidates included in the SDP when
running ice demo on MacOS X. After the fix the candidates were listed.

thanks,
Magnus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120727/4734d262/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux