ruby-changes:19275
From: tarui <ko1@a...>
Date: Thu, 21 Apr 2011 01:15:41 +0900 (JST)
Subject: [ruby-changes:19275] Ruby:r31314 (trunk): * win32/win32.c (CreateChild): maximum length of lpCommandLine is
tarui 2011-04-21 01:15:35 +0900 (Thu, 21 Apr 2011) New Revision: 31314 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31314 Log: * win32/win32.c (CreateChild): maximum length of lpCommandLine is 32,768 characters, including the Unicode terminating null character. Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31313) +++ ChangeLog (revision 31314) @@ -1,3 +1,8 @@ +Thu Apr 21 01:01:28 2011 Masaya Tarui <tarui@r...> + + * win32/win32.c (CreateChild): maximum length of lpCommandLine is + 32,768 characters, including the Unicode terminating null character. + Wed Apr 20 21:32:11 2011 Tadayoshi Funaba <tadf@d...> * ext/date/date_strptime.c (date__strptime_internal): do not Index: win32/win32.c =================================================================== --- win32/win32.c (revision 31313) +++ win32/win32.c (revision 31314) @@ -1060,6 +1060,12 @@ dwCreationFlags = (NORMAL_PRIORITY_CLASS); + if (lstrlenW(cmd) > 32767) { + child->pid = 0; /* release the slot */ + errno = E2BIG; + return NULL; + } + RUBY_CRITICAL({ fRet = CreateProcessW(prog, (WCHAR *)cmd, psa, psa, psa->bInheritHandle, dwCreationFlags, NULL, NULL, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/