[PATCH] wineconsole: Set input stream buffer length per OS limit
hugh.mcmaster at outlook.com
Fri Mar 27 06:54:22 CDT 2015
On Thu, 26 Mar 2015 15:22:33 +0100, Stefan Dösinger wrote:
> Am 2015-03-26 um 13:58 schrieb Hugh McMaster:
> > The Windows command line (cmd or command.com) limits the maximum
> > length of an input string. 
> Do we care about this? Do you have an application that depends on this
> kind of limit?
Wineconsole currently has fixed buffer of 256 chars. Any input from a terminal that is longer than 256 bytes is truncated. (See also bug 34814.)
It is easy to test this with a (deliberately) small buffer, say 32 chars, by altering line 833 in programs/wineconsole/wineconsole.c.
Then with a test program:
./wine wineconsole cmd /k ../c.exe -abc -def -ghi -jkl
strlen(wci.ptr): 35, malloc'ed: 32 WCHARs [strlen only reads from 'cmd' onwards]
input: cmd /k ../c.exe -abc -def -ghi -jkl
GetLastError(): 122 [MultiByteToWideChar error: The data area passed to a system call is too small.]
output: cmd /k ../c.exe -abc -def -ghi - [32 characters. 'jkl' is missing]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel