ODBC driver, crashes consistently, possible integer overflow
|Reported by:||guest||Owned by:||chaitanya|
|Severity:||normal||Keywords:||odbc, segfault, overflow, postgres, postgresql, unixodbc|
I built GDAL/OGR 1.7.0 with ODBC support, and am not able to connect to any remote databases. The failure mode is a "out of memory" error which can't possibly be true, because the remote dataset is a mere 5 rows, all POINT geometries.
$ ogrinfo ODBC:gregor/mosheh@testPgSQL grid
ERROR 2: CPLMalloc(): Out of memory allocating 4294967297 bytes.
- Slamd64 (64-bit Slackware) 11.0
- GDAL/OGR 1.7.0
- unixODBC 2.2.14 compiled from source
- PostgreSQL driver bundled with unixODBC
- The remote server is PostgreSQL 8.2
My odbc.ini is attached, as is the SQL which I used to create the dataset.
I sent some GDB output to Kumar Chaitanya and he suggests "The segfault occurred at http://trac.osgeo.org/gdal/browser/branches/1.7/gdal/port/cpl_odbc.cpp#L796 during a call to memcpy." The GDB output is here: