mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 10:36:03 +00:00
tools: acrnctl fix cmd buffer is truncated when vmname too long
'acrnctl start vmname' use a cmd buffer with a sizeof 128 bytes, cmd[128] buffer will be truncated, when vmnane size is bigger than 29 bytes. In that situation, vmnane size still smaller than MAX_VM_OS_NAME_LEN, so it should be fixed. Macro PATH_LEN is useful to determine the cmd[] buffer length, so move it from acrn_mngr.c into acrn_mngr.h Tracked-On: #2851 Signed-off-by: Tao Yuhong <yuhong.tao@intel.com> Reviewed-by: Yan Like <like.yan@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
committed by
wenlingz
parent
b2f2d95246
commit
5a7be9b869
@@ -40,7 +40,6 @@ static int check_dir(const char *path)
|
||||
#define MNGR_SOCK_FMT "/run/acrn/mngr/%s.%d.socket"
|
||||
#define MNGR_MAX_HANDLER 8
|
||||
#define MNGR_MAX_CLIENT 4
|
||||
#define PATH_LEN 128
|
||||
|
||||
#define CLIENT_BUF_LEN 4096
|
||||
|
||||
|
||||
Reference in New Issue
Block a user