[Serdev] CVS:commitlog: sip_router/modules/mediaproxy functions.h
Dan Pascu
dan at ag-projects.com
Tue Mar 1 12:08:51 UTC 2005
It seems the format of the data returned by get_all_ucontacts() had changed
and now includes a socket_info pointer as well, so there shouldn't be any
issue.
Disregard the question.
On Tuesday 01 March 2005 00:52, Dan Pascu wrote:
> I'm not sure what exactly the intention of this patch is, but at a first
> glance it seems to do some some bad things.
>
> considering that this is the definition of sock:
>
> struct socket_info* sock;
>
> then memcpy(&sock, ptr, sizeof(sock)); will simply mess the pointer address
> (which was dangling anyway, being an uninitialized pointer on the stack)
> with some bytes from a string resulting in a random and most likely invalid
> memory pointer.
>
> even more, this test
>
> if (sock==0) ...
>
> will almost always fail and in result calling udp_send(sock, ...) will most
> like sigsegv considering the random memory address that sock now holds.
>
> Or is there something that I'm missing?
>
> On Monday 28 February 2005 20:54, Jan Janak wrote:
> > janakj 2005/02/28 19:54:42 CET
> >
> > SER CVS Repository
> >
> > Modified files:
> > modules/mediaproxy functions.h
> > Log:
> > - Included Bogdan's patch (usrloc now passes also the socket to be used
> > to NAT ping functions).
> >
> > Revision Changes Path
> > 1.6 +10 -5 sip_router/modules/mediaproxy/functions.h
> > http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/modules/mediapro
> >xy /functions.h.diff?r1=1.5&r2=1.6
> >
> > _______________________________________________
> > Serdev mailing list
> > serdev at lists.iptel.org
> > http://lists.iptel.org/mailman/listinfo/serdev
--
Dan
More information about the Serdev
mailing list