On Sat, 2008-05-10 at 00:25 -0400, Rishi Khan wrote:
> in lwip_accept (in sockets.c) there is this code:
>
> memset(&sin, 0, sizeof(sin));
> sin.sin_len = sizeof(sin);
> sin.sin_family = AF_INET;
> sin.sin_port = htons(port);
> sin.sin_addr.s_addr = naddr.addr;
>
> if (*addrlen > sizeof(sin))
> *addrlen = sizeof(sin);
>
> SMEMCPY(addr, &sin, *addrlen);
>
> When addrlen and or addr are NULL, this code crashes. Most BSD and
> linux implementations allow it to be NULL. Could/should we change
> this code to be enclosed in:
> if (addr != NULL)
> {
> ...
> }
I'd suggest filing a bug, otherwise we're likely to forget changes like
these.
Kieran
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users