Re: [patch] isdn: mISDN: set ->family in ->getname()

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

 




Am 23.04.2013 08:24, schrieb Dan Carpenter:
> The "maddr->family" variable was not set but instead it leaked stack
> information to userspace.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
> index 8b07f83..a838864 100644
> --- a/drivers/isdn/mISDN/socket.c
> +++ b/drivers/isdn/mISDN/socket.c
> @@ -578,6 +578,7 @@ data_sock_getname(struct socket *sock, struct sockaddr *addr,
>  	lock_sock(sk);
>  
>  	*addr_len = sizeof(*maddr);
> +	maddr->family = AF_ISDN;
>  	maddr->dev = _pms(sk)->dev->id;
>  	maddr->channel = _pms(sk)->ch.nr;
>  	maddr->sapi = _pms(sk)->ch.addr & 0xff;

just nitpicking ...
net/nfc/llcp/sock.c has a memset(..0,..) for the struct. Is this an options here also ?
(just to make sure everything is 0 in the beginning)
re,
 wh

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux