Opened 9 years ago

Closed 9 years ago

#5810 closed defect (fixed)

Invalid use of CSLAddString() in OGR MSSQL

Reported by: tamas Owned by: tamas
Priority: normal Milestone: 1.11.2
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

ogrmssqlspatialdatasource.cpp: In member function ‘int OGRMSSQLSpatialDataSource::Open(const char*, int, int)’: ogrmssqlspatialdatasource.cpp:730:86: warning: ignoring return value of ‘char CSLAddString(char, const char*)’, declared with attribute warn_unused_result [-Wunused-result]

CSLAddString( papszGeomColumnNames,

oStmt.GetColData(0) );

This could result in crashes, because CSLAddString() can reallocate papszGeomColumnNames and thus its return value should be assigned back to papszGeomColumnNames.

Change History (1)

comment:1 by tamas, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r28315) and branch-1.11 (#28316)

Note: See TracTickets for help on using tickets.