Ticket #2386 (closed defect: fixed)
OGR / SQL: crash in OGRDataSource::ExecuteSQL with an empty SQL query
| Reported by: | actcorp | Owned by: | rouault |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5.2 |
| Component: | OGR_SF | Version: | svn-trunk |
| Severity: | normal | Keywords: | ogr sql |
| Cc: |
Description
OGRDataSource *poDS;
[...]
OGRLayer *rs = poDS->ExecuteSQL( sql_query, NULL, "" );
Ends up in a crash if the first argument is an empty string, i.e. strlen( sql_query ) == 0
The problem seems to show up in: file: ogr/swq.c function: swq_select_preparse() (maybe the current token could become NULL if the select_statement is empty ?)
If so, strcasecmp will crash (!)
Change History
Note: See
TracTickets for help on using
tickets.
