This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: recvfrom patch
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Wade Jensen <Wade_Jensen at inter-tel dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 04 Jan 2002 02:04:28 +0000
- Subject: Re: [ECOS] recvfrom patch
- References: <07256B35.007C02EA.00@chd-nt-mail01.inter-tel.com>
Wade Jensen wrote:
>
> Hello,
>
> The recv function calls recvfrom with NULL parameters. recvfrom then
> dereferences a NULL pointer. This patch is a simple fix for this. I have
> tested it a LOT, and it does not seem to have any bad effects.
Thanks for the patch!
Although:
+ msg.msg_namelen = fromlen ? *fromlen : (socklen_t)fromlen;
why use (socklen_t)fromlen, i.e. the address of some variable? I've checked
in just:
msg.msg_namelen = fromlen ? *fromlen : 0;
instead if that's alright.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine