[Bug 17478] New: Fix dpa warning from comctl32/listview.c
http://bugs.winehq.org/show_bug.cgi?id=17478 Summary: Fix dpa warning from comctl32/listview.c Product: Wine Version: 1.1.15 Platform: All OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 AssignedTo: wine-bugs(a)winehq.org ReportedBy: peter.schauer(a)mytum.de Created an attachment (id=19571) --> (http://bugs.winehq.org/attachment.cgi?id=19571) Patch for listview.c ranges_assert This patch fixes a small glitch in listview.c which causes a warn:dpa:not enough pointers in array (0 vs 0) warning from DPA_GetPtr. It happens when LISTVIEW_DeselectAllSkipItem creates an empty range and then calls ranges_additem to add one item to the range. ranges_additem calls ranges_add which calls ranges_check(ranges, "before add"), effectively calling ranges_assert. And ranges_assert calls DPA_GetPtr(ranges->hdpa, 0), accessing the first element in the empty range, which triggers the warning. Here is a patch without whitespace changes to make it more readable, the proper patch is in the attachment: diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index b8545fd..578482b 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -2605,8 +2605,9 @@ static void ranges_assert(RANGES ranges, LPCSTR desc, const char *func, int line assert (ranges); assert (DPA_GetPtrCount(ranges->hdpa) >= 0); ranges_dump(ranges); - prev = DPA_GetPtr(ranges->hdpa, 0); if (DPA_GetPtrCount(ranges->hdpa) > 0) + { + prev = DPA_GetPtr(ranges->hdpa, 0); assert (prev->lower >= 0 && prev->lower < prev->upper); for (i = 1; i < DPA_GetPtrCount(ranges->hdpa); i++) { @@ -2615,6 +2616,7 @@ static void ranges_assert(RANGES ranges, LPCSTR desc, const char *func, int line assert (curr->lower < curr->upper); prev = curr; } + } TRACE("--- Done checking---\n"); } -- 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=17478 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement OS/Version|All |other Platform|All |Other --- Comment #1 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2009-02-20 08:47:16 --- All patches go to wine-patches mailing list. -- 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=17478 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |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=17478 --- Comment #2 from Juan Lang <juan_lang(a)yahoo.com> 2009-02-20 12:16:35 --- In case Vitaliy's comment wasn't clear: please send your patch to wine-patches, they're not picked up from here. -- 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=17478 --- Comment #3 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-04-11 05:18:51 --- (In reply to comment #0)
Created an attachment (id=19571) --> (http://bugs.winehq.org/attachment.cgi?id=19571) [details] Patch for listview.c ranges_assert
-- 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=17478 --- Comment #4 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-04-11 05:25:31 --- (In reply to comment #0)
Created an attachment (id=19571) --> (http://bugs.winehq.org/attachment.cgi?id=19571) [details] Patch for listview.c ranges_assert
It's good enough I think (I didn't found any feedback at wine-devel), let's post it properly now: http://www.winehq.org/pipermail/wine-patches/2009-February/069686.html - use a single patch per mail (remove 'without whitespaces' part) - add a git format-patch header with your real name and email http://winehq.org/sending_patches -- 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=17478 --- Comment #5 from Peter Schauer <peter.schauer(a)mytum.de> 2009-04-19 09:57:27 --- Done: http://www.winehq.org/pipermail/wine-patches/2009-April/072011.html (In reply to comment #4)
(In reply to comment #0)
Created an attachment (id=19571) --> (http://bugs.winehq.org/attachment.cgi?id=19571) [details] [details] Patch for listview.c ranges_assert
It's good enough I think (I didn't found any feedback at wine-devel), let's post it properly now: http://www.winehq.org/pipermail/wine-patches/2009-February/069686.html
- use a single patch per mail (remove 'without whitespaces' part) - add a git format-patch header with your real name and email
-- 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=17478 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #6 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-04-21 15:03:07 --- Patch committed: http://source.winehq.org/git/wine.git/?a=commit;h=56720276e898bb0c0b350378f2... So it's fixed now. -- 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=17478 Peter Schauer <peter.schauer(a)mytum.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED --- Comment #7 from Peter Schauer <peter.schauer(a)mytum.de> 2009-04-23 10:23:11 --- 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=17478 --- Comment #8 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2009-04-23 22:00:19 --- VERIFIED is not used in Wine bugzilla. -- 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=17478 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|VERIFIED |UNCONFIRMED Resolution|FIXED | --- Comment #9 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2009-04-23 22:00:54 --- Reopening. -- 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=17478 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #10 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2009-04-23 22:01:15 --- 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=17478 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> 2009-04-24 12:20:32 --- Closing bugs fixed in 1.1.20. -- 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