mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +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:
@@ -823,7 +823,7 @@ virtio_net_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
dev->func, mac_seed);
|
||||
|
||||
MD5_Init(&mdctx);
|
||||
MD5_Update(&mdctx, nstr, strlen(nstr));
|
||||
MD5_Update(&mdctx, nstr, strnlen(nstr, sizeof(nstr)));
|
||||
MD5_Final(digest, &mdctx);
|
||||
|
||||
net->config.mac[0] = 0x00;
|
||||
|
||||
Reference in New Issue
Block a user