mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-18 23:40:11 +00:00
dm: use strnlen to replace strlen
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:
@@ -205,7 +205,7 @@ static int rpmb_check_frame(const char *cmd_str, int *err,
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = strlen(cmd_str) + 1;
|
||||
len = strnlen(cmd_str, sizeof(WRITE_DATA_STR)) + 1;
|
||||
if (len > sizeof(WRITE_DATA_STR))
|
||||
len = sizeof(WRITE_DATA_STR);
|
||||
|
||||
|
Reference in New Issue
Block a user