Package: libmdbtools
Version: 0.5.99.0.6pre1.0.20051109-3
Severity: important
Tags: patch

  Hello,

  When I try mdb-tables file.mdb on my AMD64 machine, a get a segmentation 
fault, whereas the same 
thing with the same file on a 32 bit machine does work fine. This is due to a 
mismatch in the size 
expected by iconv and the size given (on a 64 bits arch) in src/libmdb/iconv.c 
: mdb_unicode2ascii.

  The attached patch fixes it on AMD64 and definitely shouldn't break anything 
else.

  Regards,

        Vincent Fourmond



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1) (ignored: LC_ALL set to 
en_GB)

Versions of packages libmdbtools depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  libglib2.0-0                  2.10.3-2   The GLib library of C routines

libmdbtools recommends no packages.

-- no debconf information
--- mdbtools-0.5.99.0.6pre1.0.20051109/src/libmdb/iconv.c	2006-07-09 23:06:33.000000000 +0200
+++ mdbtools-0.5.99.0.6pre1.0.20051109.new/src/libmdb/iconv.c	2006-07-09 22:51:17.000000000 +0200
@@ -31,8 +31,8 @@
 mdb_unicode2ascii(MdbHandle *mdb, unsigned char *src, unsigned int slen, unsigned char *dest, unsigned int dlen)
 {
 	unsigned char *tmp = NULL;
-	unsigned int tlen = 0;
-	unsigned int len_in, len_out;
+	size_t tlen = 0;
+	size_t len_in, len_out;
 	char *in_ptr, *out_ptr;
 
 	if ((!src) || (!dest))

Reply via email to