[Bug 20334] New: SysReAllocStringLen should return null terminated strings
http://bugs.winehq.org/show_bug.cgi?id=20334 Summary: SysReAllocStringLen should return null terminated strings Product: Wine Version: 1.1.31 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: oleaut32 AssignedTo: wine-bugs(a)winehq.org ReportedBy: al.kochet(a)gmail.com Created an attachment (id=24050) --> (http://bugs.winehq.org/attachment.cgi?id=24050) wine log +seh,+tid,+relay The call like SysReAllocStringLen (&buffer, NULL, EXPECTED_LEN) should return null terminated strings. I found that problem, then playing with Texas Instruments Code Composer Studio v3.3 under wine. Test and logs are attached. -- 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=20334 --- Comment #1 from A. Kochetkov <al.kochet(a)gmail.com> 2009-10-12 08:56:48 --- Created an attachment (id=24051) --> (http://bugs.winehq.org/attachment.cgi?id=24051) The 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=20334 --- Comment #2 from A. Kochetkov <al.kochet(a)gmail.com> 2009-10-12 08:59:24 --- Created an attachment (id=24052) --> (http://bugs.winehq.org/attachment.cgi?id=24052) The test programm -- 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=20334 --- Comment #3 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-10-12 09:07:40 --- Hi, thanks for report. Could you provide a test diff for Wine test suite (oleaut32/tests/vartype.c)? It's too complicated now, all you need to check is does it add null terminator and how it depends on previous string length. -- 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=20334 --- Comment #4 from A. Kochetkov <al.kochet(a)gmail.com> 2009-10-12 11:34:21 --- Created an attachment (id=24053) --> (http://bugs.winehq.org/attachment.cgi?id=24053) test diff -- 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=20334 --- Comment #5 from Austin English <austinenglish(a)gmail.com> 2009-10-12 13:05:51 --- Excellent work. Please submit the test/patch to wine-patches(a)winehq.org -- 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=20334 --- Comment #6 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-10-12 13:09:24 --- (In reply to comment #4)
Created an attachment (id=24053) --> (http://bugs.winehq.org/attachment.cgi?id=24053) [details] test diff
(In reply to comment #5)
Excellent work. Please submit the test/patch to wine-patches(a)winehq.org
A small comment here. Could you reduce the buffer size? Or allocating 8K really means something? -- 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=20334 --- Comment #7 from Juan Lang <juan_lang(a)yahoo.com> 2009-10-12 17:08:10 --- (In reply to comment #4)
Created an attachment (id=24053) --> (http://bugs.winehq.org/attachment.cgi?id=24053) [details] test diff
One further small comment: any tests that currently fail on wine need to be preceded with todo_wine. -- 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=20334 A. Kochetkov <al.kochet(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24051|0 |1 is obsolete| | Attachment #24053|0 |1 is obsolete| | --- Comment #8 from A. Kochetkov <al.kochet(a)gmail.com> 2009-10-13 03:54:28 --- Created an attachment (id=24070) --> (http://bugs.winehq.org/attachment.cgi?id=24070) New version of 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=20334 --- Comment #9 from A. Kochetkov <al.kochet(a)gmail.com> 2009-10-13 03:55:09 --- (In reply to comment #6)
A small comment here. Could you reduce the buffer size? Or allocating 8K really means something?
It doen't means something for wine, but under XP with 95, 98, Me compatability mode, new allocated string is outside of previous if CHUNK_SIZE is less than 16384. Range test fails, so I cannot assert is null terminator always present. But, with 16394, range test pass, new string allocated on the old string with trash, and new string is null terminated. (In reply to comment #7)
One further small comment: any tests that currently fail on wine need to be preceded with todo_wine.
I provide bug fix and test. Test with bug fix doesn't fail. Should I add todo_wine? Please review another version of 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=20334 --- Comment #10 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-10-13 04:25:01 --- (In reply to comment #9)
(In reply to comment #6)
A small comment here. Could you reduce the buffer size? Or allocating 8K really means something?
It doen't means something for wine, but under XP with 95, 98, Me compatability mode, new allocated string is outside of previous if CHUNK_SIZE is less than 16384. Range test fails, so I cannot assert is null terminator always present. But, with 16394, range test pass, new string allocated on the old string with trash, and new string is null terminated.
Didn't know that, if it will fail on native you should use required 8K size of course.
(In reply to comment #7)
One further small comment: any tests that currently fail on wine need to be preceded with todo_wine.
I provide bug fix and test. Test with bug fix doesn't fail. Should I add todo_wine?
Of course not, patch shouldn't bring new failures including success inside todo_wine.
Please review another version of patch.
Send it to wine-patches for review. -- 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=20334 --- Comment #11 from A. Kochetkov <al.kochet(a)gmail.com> 2009-10-13 05:20:00 --- The patch was sended to wine-patches(a)winehq.org. Nikolay Sivov, Austin English, Juan Lang thanks a lot for your help. -- 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=20334 A. Kochetkov <al.kochet(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #12 from A. Kochetkov <al.kochet(a)gmail.com> 2009-10-14 10:13:55 --- Fixed, in commits: http://source.winehq.org/git/wine.git/?a=commit;h=ae4de9d6956a18b2e8bff0cfd2... http://source.winehq.org/git/wine.git/?a=commit;h=b6da072551cf6eb88d1500df51... -- 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=20334 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> 2009-10-23 13:19:35 --- Closing bugs fixed in 1.1.32. -- 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