[Bug 13469] New: Python long sys calls
http://bugs.winehq.org/show_bug.cgi?id=13469 Summary: Python long sys calls Product: Wine Version: 0.9.46. Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs(a)winehq.org ReportedBy: simonetregnago(a)grivaonline.com Python doesn't work correctly when it have to make system calls with long strings. For example:
wine python.exe import os os.system("asdpoasid"*1000)
The same trouble happens when calling very long urls with the webbrowser module (with the open function) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #1 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2008-05-27 07:47:18 --- Please upgrade Wine and try again. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.python.org/ftp/py | |thon/2.5.2/python-2.5.2.msi Keywords| |download -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Lei Zhang <thestig(a)google.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|-unknown |programs Ever Confirmed|0 |1 --- Comment #2 from Lei Zhang <thestig(a)google.com> 2008-05-28 19:02:14 --- I get this problem with wine-1.0-rc2. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #3 from Lei Zhang <thestig(a)google.com> 2008-05-28 19:02:35 --- Created an attachment (id=13448) --> (http://bugs.winehq.org/attachment.cgi?id=13448) backtrace -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #4 from Simone Tregnago <simonetregnago(a)grivaonline.com> 2008-05-29 04:02:54 --- verified with Python 2.5.2 in wine-1.0-rc2. Using the webbrowser module a similar problem appears when using long urls. You can verify that in this way: wine python
import webbrowser
with a short url all goes well:
webbrowser.open("www.google.it") True
with a long url we get troubles:
webbrowser.open("http://www.google.it"*50) err:exec:dde_connect Argify buffer not large enough, truncated err:winebrowser:get_url_from_dde Unabled to retrieve URL from string L"\"" True err:winebrowser:wmain Usage: winebrowser URL
-- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Susan Cragin <susancragin(a)earthlink.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |susancragin(a)earthlink.net --- Comment #5 from Susan Cragin <susancragin(a)earthlink.net> 2008-06-12 09:42:01 --- verified again with wine-1.0-rc4-96-g9503965 trying to run Dragon NaturallySpeaking 9.5 fixme:ole:CoResumeClassObjects stub fixme:shdocvw:InternetExplorer_GetIDsOfNames (0x12bd20)->({00000000-0000-0000-0000-000000000000} 0x12c514 1 1024 0x12bcf0) err:winebrowser:get_url_from_dde Unabled to retrieve URL from string L"\"" err:winebrowser:wmain Usage: winebrowser URL -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #6 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2008-06-12 23:07:49 --- Well yeah the fixed size buffers are never a good thing: wcmdmain.c:47 WCHAR quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH]; This means that anything longer then 259 chars will overflow the buffer(s). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #7 from Simone Tregnago <simonetregnago(a)grivaonline.com> 2008-06-13 08:23:36 --- I don't know if we're talking about the same thing but it seems that 569 is the limit. Using 0.9.46 - python: os.system("1"*569) work, os.system("1"*570) crash -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major OS/Version|other |All Platform|Other |All Summary|Python long sys calls |cmd can't handle long input | |(buffer overflow) --- Comment #8 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2008-06-14 11:41:15 --- (In reply to comment #7)
I don't know if we're talking about the same thing but it seems that 569 is the limit. Using 0.9.46 - python: os.system("1"*569) work, os.system("1"*570) crash
Overflowing a buffer doesn't mean immediate crash. Hitting unallocated memory - yes. In either case this is pretty nasty code that should be fixed. Setting to major, since all users of Wine's cmd affected. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Jason Edmeades <us(a)edmeades.me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |us(a)edmeades.me.uk -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Matthew Millar <mattmill30(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mattmill30(a)hotmail.com --- Comment #9 from Matthew Millar <mattmill30(a)hotmail.com> 2008-12-09 17:48:56 --- Error still present in Wine 1.1.10 using Ubuntu 8.10 x86_64. Note: Tested 2.5.2, 2.6.1 and 3.0 (all generate the same error) Question: Is this really a bug with wine? or is it actually a bug with python? can the webbrowser.open("http://www.google.it"*50) command be successfully run in Windows? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #10 from Toccaro Rucca <sirius(a)sonnenkinder.org> 2008-12-11 18:21:06 ---
can the webbrowser.open("http://www.google.it"*50) command be successfully run in Windows?
Yes. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #11 from Diaa Sami <diaasami(a)gmail.com> 2009-01-30 21:03:36 --- Created an attachment (id=19115) --> (http://bugs.winehq.org/attachment.cgi?id=19115) Fixes the bug This fixes the bug, the overflow doesn't happen anymore, I've tried up to ~4093 long command-lines(couldn't go beyond that because of some console/cmd/input limitation in wine), may be with a batch file I could go up to 8192. I think that some tests should be added to make sure that long-command lines work with cmd -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Diaa Sami <diaasami(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |diaasami(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #12 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2009-01-31 11:46:40 --- (In reply to comment #11) No it's not a fix. It's a hack. Native can handle these huge size parameters. You just truncate them. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, source -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #13 from Diaa Sami <diaasami(a)gmail.com> 2009-01-31 15:44:51 --- (In reply to comment #12)
(In reply to comment #11) No it's not a fix. It's a hack. Native can handle these huge size parameters. You just truncate them.
I'll come up with a better patch. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Diaa Sami <diaasami(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19115|0 |1 is obsolete| | --- Comment #14 from Diaa Sami <diaasami(a)gmail.com> 2009-02-04 09:17:43 --- (From update of attachment 19236) This patch allows command-lines as long as 8192 character when using the interactive input(not /c or batch files), any limitations imposed by this patch come from Windows' cmd.exe I wrote a small testsuite for cmd and I'll work on expanding and automating it and adding it to wine. Detailed changes: Fixed a number of buffer overflows (based on limits of Windows cmd.exe): - Each of param1 and param2 can be almost as long as MAXSTRING(actually a few characters shorter) so their length was changed. - Fixed an overflow with long program names(aka stemofsearch), it can't be equal to or longer than MAX_PATH. - Fixed an overflow in WCMD_DumpCommands with long commands by removing the fixed-length buffer and using WINE_TRACE instead of buffer+sprintf. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #15 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-02-21 05:23:59 --- (In reply to comment #14)
(From update of attachment 19236 [details]) This patch allows command-lines as long as 8192 character when using the interactive input(not /c or batch files), any limitations imposed by this patch come from Windows' cmd.exe
I wrote a small testsuite for cmd and I'll work on expanding and automating it and adding it to wine.
Detailed changes: Fixed a number of buffer overflows (based on limits of Windows cmd.exe): - Each of param1 and param2 can be almost as long as MAXSTRING(actually a few characters shorter) so their length was changed. - Fixed an overflow with long program names(aka stemofsearch), it can't be equal to or longer than MAX_PATH. - Fixed an overflow in WCMD_DumpCommands with long commands by removing the fixed-length buffer and using WINE_TRACE instead of buffer+sprintf.
Post it to wine-patches. Change your 'const WCHAR c[]' message to use resource located string, if it supposed to be localized. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 --- Comment #16 from Diaa Sami <diaasami(a)gmail.com> 2009-03-03 16:33:44 --- The patch has been applied, these long command-lines should cause no more buffer overflows, please confirm and close the bug. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Simone Tregnago <simonetregnago(a)grivaonline.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simonetregnago(a)grivaonline.c | |om --- Comment #17 from Simone Tregnago <simonetregnago(a)grivaonline.com> 2009-03-18 05:37:09 --- (In reply to comment #16)
The patch has been applied, these long command-lines should cause no more buffer overflows, please confirm and close the bug.
doing some tests with wine 1.1.17 seems to work well. many thanks -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Status|NEW |RESOLVED OS/Version|All |other Platform|All |Other Resolution| |FIXED --- Comment #18 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2009-03-18 05:59:35 --- Fixed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #19 from Alexandre Julliard <julliard(a)winehq.org> 2009-03-27 13:50:36 --- Closing bugs fixed in 1.1.18. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13469 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|programs |cmd -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org