Opened 13 years ago

Closed 13 years ago

#1824 closed defect (fixed)

Calling CCoordinateSystemTransform::GetGeodeticTransformation() causes Assertion in debug mode and/or is prone to access violations

Reported by: baertelchen Owned by: baertelchen
Priority: low Milestone: 2.3
Component: General Version: 2.1.0
Severity: trivial Keywords: CoordinateSystem API MgCoordinateSystemTransform GetGeodeticTransformation NumberOfGeodeticTransformations
Cc: External ID:

Description

The code in CCoordinateSystemTransform::GetGeodeticTransformation() sets an emtpy wstring object to '\0' at index 0 what causes an assertion in debug mode.

Not even that setting the string to "empty" is unnecessary, it's also prone to access violations in release builds.

Also, the documentation says "...Returns a disposable pointer to the geodetic transformation definition indicated by the index parameter. A null pointer is returned if the index parameter is zero..."

Passing in 0 is absolutely valid, however.

This ticket is about fixing 2 things:

Change History (2)

comment:1 by baertelchen, 13 years ago

Status: newassigned

comment:2 by baertelchen, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed in revision 6166 (Wednesday, 10/05/2011).

Note: See TracTickets for help on using tickets.