From dce5f89e48cc63668b90fbf2a435cbb54bcf4571 Mon Sep 17 00:00:00 2001 From: Jason Edmeades Date: Sun, 15 Jul 2018 23:15:28 +0100 Subject: [PATCH] cmd: Expand the storage space for qualifiers. When parsing a command, after the first '/' we store the characters away in quals. The command itself can be MAXSTRING in bytes, but the quals was limited to MAX_PATH. This is incorrect, as you can provide very long qualifiers as well. Expand the space to allow the maximum size possible. Signed-off-by: Jason Edmeades Signed-off-by: Alexandre Julliard --- programs/cmd/wcmd.h | 2 +- programs/cmd/wcmdmain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index d4d97a0067e..8d6eb6b48e9 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -204,7 +204,7 @@ typedef struct _FOR_CONTEXT { * (uppercased and concatenated) and parameters entered, with environment * variables and batch parameters substitution already done. */ -extern WCHAR quals[MAX_PATH], param1[MAXSTRING], param2[MAXSTRING]; +extern WCHAR quals[MAXSTRING], param1[MAXSTRING], param2[MAXSTRING]; extern DWORD errorlevel; extern BATCH_CONTEXT *context; extern FOR_CONTEXT forloopcontext; diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 0d02f1f3882..8fe2d574e56 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -38,7 +38,7 @@ extern struct env_stack *pushd_directories; BATCH_CONTEXT *context = NULL; DWORD errorlevel; -WCHAR quals[MAX_PATH], param1[MAXSTRING], param2[MAXSTRING]; +WCHAR quals[MAXSTRING], param1[MAXSTRING], param2[MAXSTRING]; BOOL interactive; FOR_CONTEXT forloopcontext; /* The 'for' loop context */ BOOL delayedsubst = FALSE; /* The current delayed substitution setting */