mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +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:
@@ -50,7 +50,7 @@ int acrn_parse_vtpm2(char *arg)
|
||||
sock_path = calloc(len + 1, 1);
|
||||
if (!sock_path)
|
||||
return -1;
|
||||
strcpy(sock_path, value);
|
||||
strncpy(sock_path, value, len + 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user