mdbtools: [PATCH] Fixes in odbc.c to return size of returned strings and handle OLE data

Even Rouault even.rouault at mines-paris.org
Sun Nov 23 15:26:28 UTC 2008


Package: mdbtools
Version: 0.5.99.0.6pre1.0.20051109-4
Severity: important

*** Please type your report below this line ***

Attached a patch that fixes several issues in odbc.c that have been found
while using libmdbodbc.so with the OGR PGeo driver of the GDAL package.
- SQLDescribeCol doesn't return the string length in *pcbColName, which
  breaks CPLODBCStatement::CollectResultsInfo() in port/cpl_odbc.cpp in
  GDAL that uses that value to force a '\0' character at the end of the
  string
- SQLColAttributes doesn't return the string length in *pcbDesc, which
  breaks CPLODBCStatement::CollectResultsInfo() in port/cpl_odbc.cpp in
  GDAL that uses that value to force a '\0' character at the end of the
  string
- SQLGetData doesn't return the correct string length in *pcbValue. It
  should return strlen(rgbValue) instead of col->cur_value_len which is
  sometimes < strlen(rgbValue). That breaks CPLODBCStatement::Fetch in
  port/cpl_odbc.cpp that uses that value to force a '\0' character at
  the end of the string
- SQLGetData doesn't handle correctly OLE data type, which prevents the
  OGR PGeo driver from retrieving the geometry data

-- System Information:
Debian Release: lenny/sid
  APT prefers hardy-updates
  APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), 
(500, 'hardy-proposed'), (500, 'hardy-backports'), (500, 'hardy')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-21-386
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mdbtools depends on:
ii  libc6        2.7-10ubuntu4               GNU C Library: Shared libraries
ii  libglib2.0-0 2.16.6-0ubuntu1             The GLib library of C routines
ii  libmdbtools  0.5.99.0.6pre1.0.20051109-4 mdbtools libraries
ii  libreadline5 5.2-3build1                 GNU readline and history 
libraries

mdbtools recommends no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdbtools-0.5.99.0.6pre1.0.20051109-odbc.patch
Type: text/x-diff
Size: 1460 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20081123/52b9725f/attachment.patch>


More information about the ubuntu-users mailing list