Hello !

  I've been hit as well by the AMD64 segfault problem. It's a common
mistake from 32 bits programmers: size_t is not necessarily an int...
Here is a patch that fixes the problem. If you don't mind, I would like
to NMU it ;-)...

  Cheers,

        Vincent


diff -u smbc-1.2.2/debian/changelog smbc-1.2.2/debian/changelog
--- smbc-1.2.2/debian/changelog
+++ smbc-1.2.2/debian/changelog
@@ -1,3 +1,10 @@
+smbc (1.2.2-2.1) unstable; urgency=low
+
+  * NMU: fix AMD64 segfault (iconv wants size_t, not int !)
+    (Closes: #366580)
+
+ -- Vincent Fourmond <[EMAIL PROTECTED]>  Thu, 19 Apr 2007 21:41:37 +0200
+
 smbc (1.2.2-2) unstable; urgency=low
 
   * updated Standards-Version
only in patch2:
unchanged:
--- smbc-1.2.2.orig/src/convert.c
+++ smbc-1.2.2/src/convert.c
@@ -98,8 +98,9 @@
 
   char *inbuf  = (char*) src;
   char *outbuf = param->dst;
-  int  inbytesleft  = src_len - 1;
-  int  outbytesleft = param->dst_len - 1;
+  /* iconv requires size_t and not int ! */
+  size_t  inbytesleft  = src_len - 1;
+  size_t  outbytesleft = param->dst_len - 1;
   bzero(param->dst, param->dst_len);
   // Need some error handling here
   iconv(param->cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);

Reply via email to