[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] block: Fix regression for MinGW (assertion caused b
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH] block: Fix regression for MinGW (assertion caused by short string) |
Date: |
Sun, 18 Nov 2012 09:26:15 +0100 |
The local string tmp_filename is passed to function get_tmp_filename
which expects a string with minimum size MAX_PATH for w32 hosts.
MAX_PATH is 260 and PATH_MAX is 259, so tmp_filename was too short.
Commit eba25057b9a5e19d10ace2bc7716667a31297169 introduced this
regression.
Signed-off-by: Stefan Weil <address@hidden>
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 49dd6bb..8739635 100644
--- a/block.c
+++ b/block.c
@@ -787,7 +787,7 @@ int bdrv_open(BlockDriverState *bs, const char *filename,
int flags,
BlockDriver *drv)
{
int ret;
- char tmp_filename[PATH_MAX];
+ char tmp_filename[PATH_MAX + 1];
if (flags & BDRV_O_SNAPSHOT) {
BlockDriverState *bs1;
--
1.7.10.4
- [Qemu-devel] [PATCH] block: Fix regression for MinGW (assertion caused by short string),
Stefan Weil <=