This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: recvfrom patch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]