[ wxwindows-Bugs-1727909 ] wxListBase::Init() may lead to a crash

SourceForge.net noreply at sourceforge.net
Sun Jun 3 15:36:10 PDT 2007


Bugs item #1727909, was opened at 2007-05-29 22:55
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1727909&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Common
Group: Fatal
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Hartwig Wiesmann (hwiesmann)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxListBase::Init() may lead to a crash

Initial Comment:
wxListBase::Init() initializes the image variable m_image incorrectly, namely with 0.
All test functions check if wxListItem::GetImage() returns -1 but not 0 (see for example wxListMainWindow::GetItemWidthWithImage(wxListItem * item) of the generic version).

Fix:

replace

  m_image = 0

with

  m_image = -1

in wxListBase::Init()

Hartwig


----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2007-06-04 00:36

Message:
Logged In: YES 
user_id=71618
Originator: NO

It's in wx/listbase.h and in wxListItem::Init(). Corrected now (in both
branches), thanks!

----------------------------------------------------------------------

Comment By: Robert Roebling (roebling)
Date: 2007-05-30 14:07

Message:
Logged In: YES 
user_id=77100
Originator: NO

Sorry, which file do you mean? wxListBase::Init() has no m_image member
and I couldn't find your line in any wxListCtrl related file (in CVS).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1727909&group_id=9863




More information about the wx-dev mailing list