From: "f6bvp@free" <f6bvp@free.fr>
To: netdev@vger.kernel.org, Mathias Krause <minipli@googlemail.com>
Subject: Re: [PATCH -next] netrom: fix invalid use of sizeof in nr_recvmsg()
Date: Sun, 21 Apr 2013 19:56:25 +0200 [thread overview]
Message-ID: <51742849.80603@free.fr> (raw)
Hi,
According to the proximity of NetRom and Rose codes I looked at af_rose.c
and it seems that similarly sockaddr_rose structure is let uninitialized
in rose_recvmsg().
Then, would you consider the following patch interesting to be committed ?
--- a/net/rose/af_rose.c 2013-04-17 07:11:28.000000000 +0200
+++ b/net/rose/af_rose.c 2013-04-21 17:26:06.914967897 +0200
@@ -1257,6 +1257,7 @@ static int rose_recvmsg(struct kiocb *io
skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
if (srose != NULL) {
+ memset(srose, 0, sizeof(*srose));
srose->srose_family = AF_ROSE;
srose->srose_addr = rose->dest_addr;
srose->srose_call = rose->dest_call;
Bernard Pidoux
next reply other threads:[~2013-04-21 17:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-21 17:56 f6bvp@free [this message]
2013-04-21 18:00 ` [PATCH -next] netrom: fix invalid use of sizeof in nr_recvmsg() Mathias Krause
[not found] <51742437.6080406@free.fr>
2013-04-21 18:05 ` f6bvp@free
-- strict thread matches above, loose matches on Subject: below --
2013-04-09 2:07 Wei Yongjun
2013-04-09 2:49 ` David Miller
2013-04-09 3:05 ` Wei Yongjun
2013-04-09 3:09 ` Hannes Frederic Sowa
2013-04-09 5:49 ` Mathias Krause
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51742849.80603@free.fr \
--to=f6bvp@free.fr \
--cc=minipli@googlemail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox