STUN server, NULL int pointer, exc_bad_access

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

 



Hi all,

I'm trying to setup a connection to a STUN server and have what seems a bug
to me. Can someone confirm this is a bug or let me know what I'm doing
wrong?

The method resolve_stun_entry passes a NULL value for a pointer to an
integer. The target method (pj_sockaddr_parse2) tests that value in a
BOOLEAN if statement, which causes an EXC_BAD_ACCESS error.

pjsua_core.c:1014

static void resolve_stun_entry(pjsua_stun_resolve *sess)

..

 /* Parse the server entry into host:port */

sess->status = pj_sockaddr_parse2(af, 0, &sess->srv[sess->idx],

  &hostpart, &port, NULL); // last param causes error

__________

sock_common.c:461


PJ_DEF(pj_status_t) pj_sockaddr_parse2(int af, unsigned options,

       const pj_str_t *str,

       pj_str_t *p_hostpart,

       pj_uint16_t *p_port,

       int *raf)

{

..

 if (*raf) // <-- crash happens here

    *raf = PJ_AF_INET;


Has anyone else run into this?

Does anyone else have this working against a STUN server?

Thanks very much,

-- 
Joe Meade
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100525/56127f59/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