[cmd] Prevent overflow for long command string
Ann and Jason Edmeades
jason at edmeades.me.uk
Mon Nov 26 15:05:27 CST 2012
If an individual parameter is longer than MAX_PATH characters,
an overflow occurs - for the syntax cmd.exe /c "<command line>"
the whole command line can be a single parameter during the
cmd.exe /c processing logic.
[Fixes bug 11073]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121126/b1bf7c27/attachment.html>
-------------- next part --------------
From c448df40399827a9805dfafa0254282060f9eff9 Mon Sep 17 00:00:00 2001
From: Jason Edmeades <jason at edmeades.me.uk>
Date: Mon, 19 Nov 2012 22:34:09 +0000
Subject: [cmd] Prevent overflow for long command string
If an individual parameter is longer than MAX_PATH characters,
an overflow occurs - for the syntax cmd.exe /c "<command line>"
the whole command line can be a single parameter during the
cmd.exe /c processing logic.
[Fixes bug 11073]
---
programs/cmd/batch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
index e9b98dc..8cd48e8 100644
--- a/programs/cmd/batch.c
+++ b/programs/cmd/batch.c
@@ -153,7 +153,7 @@ WCHAR *WCMD_parameter_with_delims (WCHAR *s, int n, WCHAR **start,
BOOL raw, BOOL wholecmdline, const WCHAR *delims)
{
int curParamNb = 0;
- static WCHAR param[MAX_PATH];
+ static WCHAR param[MAXSTRING];
WCHAR *p = s, *begin;
if (start != NULL) *start = NULL;
--
1.7.9.5
More information about the wine-patches
mailing list