mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 02:24:45 +00:00
dm: use strncpy to replace strcpy
Tracked-On: #2133 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -347,7 +347,7 @@ connect_hdcp_daemon()
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_UNIX;
|
||||
strcpy(addr.sun_path, HDCP_SDK_SOCKET_PATH);
|
||||
strncpy(addr.sun_path, HDCP_SDK_SOCKET_PATH, sizeof(addr.sun_path));
|
||||
|
||||
ret = connect(fd, &addr, sizeof(struct sockaddr_un));
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user