提交 0fde7ad7 编写于 作者: D David S. Miller

sparc64: Fix build warnings with gcc 7.

arch/sparc/kernel/ds.c: In function ‘register_services’:
arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte
into a region of size 0 overflows the destination
Reported-by: NAnatoly Pugachev <matorola@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7485af89
...@@ -909,7 +909,7 @@ static int register_services(struct ds_info *dp) ...@@ -909,7 +909,7 @@ static int register_services(struct ds_info *dp)
pbuf.req.handle = cp->handle; pbuf.req.handle = cp->handle;
pbuf.req.major = 1; pbuf.req.major = 1;
pbuf.req.minor = 0; pbuf.req.minor = 0;
strcpy(pbuf.req.svc_id, cp->service_id); strcpy(pbuf.id_buf, cp->service_id);
err = __ds_send(lp, &pbuf, msg_len); err = __ds_send(lp, &pbuf, msg_len);
if (err > 0) if (err > 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册