mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-20 00:08:07 +00:00
Fix string may be truncated issue with using snprintf
New compiler options introduced by commit
519c4285cf
will cause DM compile failure
which caused by warnings from some snprintf usage might be truncated.
Expanding the string buffer to make compiler happy.
v3: change format string
v2: Address comment from Hao, shrink bident string size to satify
tname length in blockif_open.
Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
Signed-off-by: Liu Shuo <shuo.a.liu@intel.com>
This commit is contained in:
@@ -285,7 +285,7 @@ virtio_blk_notify(void *vdev, struct virtio_vq_info *vq)
|
||||
static int
|
||||
virtio_blk_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
{
|
||||
char bident[sizeof("XX:X:X")];
|
||||
char bident[16];
|
||||
struct blockif_ctxt *bctxt;
|
||||
MD5_CTX mdctx;
|
||||
u_char digest[16];
|
||||
|
Reference in New Issue
Block a user