Package: libiodbc2 Followup-For: Bug #508480 This small patch solves this problem (although the code is full of unbounded strcmp's, which is a problem in itself) by veryfing that a section was found before trying to compare it.
-- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.26-1-686-bigmem (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libiodbc2 depends on: ii libc6 2.7-16 GNU C Library: Shared libraries libiodbc2 recommends no packages. libiodbc2 suggests no packages.
--- libiodbc2-3.52.6/iodbcinst/inifile.c.orig 2008-12-18 23:32:51.000000000 -0200 +++ libiodbc2-3.52.6/iodbcinst/inifile.c 2006-12-15 11:55:21.000000000 -0300 @@ -1023,8 +1023,7 @@ if (0 == _iodbcdm_cfg_rewind (pCfg)) { - while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_nextentry (pCfg) - && pCfg->section) + while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_nextentry (pCfg)) { if (_iodbcdm_cfg_define (pCfg) && !strcmp (pCfg->section, lpszSection) && pCfg->id)