提交 7f59ebb5 编写于 作者: D Dan Carpenter 提交者: John W. Linville

airo: copying wrong data in airo_get_aplist()

"qual" used to be declared on the stack, but then in 998a5a7d ("airo:
reduce stack memory footprint") we made it dynamically allocated.
Unfortunately the memcpy() here was missed and it's still copying stack
memory instead of the data that we want.  In other words, "&qual" should
be "qual".
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 73dc3b90
......@@ -7233,8 +7233,8 @@ static int airo_get_aplist(struct net_device *dev,
}
} else {
dwrq->flags = 1; /* Should be define'd */
memcpy(extra + sizeof(struct sockaddr)*i,
&qual, sizeof(struct iw_quality)*i);
memcpy(extra + sizeof(struct sockaddr) * i, qual,
sizeof(struct iw_quality) * i);
}
dwrq->length = i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册