[ wxwindows-Bugs-1695450 ] wxDb::GetColumns lacks the last element NULL assignment

SourceForge.net noreply at sourceforge.net
Fri Apr 6 00:18:42 PDT 2007


Bugs item #1695450, was opened at 2007-04-06 00:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1695450&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: Database
Group: Trivial
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: ONEEYEMAN (oneeyeman)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxDb::GetColumns lacks the last element NULL assignment

Initial Comment:
In the wxDb::GetColumns() function there is a memory allocation, which is done like this:

colInf = new wxDbColInf[noCols+1];

The array is filled out, however, the last element, which is colInf[noCols] is not set to NULL.
Therefore when the user goes through this array, program crashes.

There are 2 functions overloads. Both lacks such assignment.

wxMSW/wxGTK-2.8.1.

Thank you.


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

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




More information about the wx-dev mailing list