smbc (1.2.2-3) src/convert.c

Summary

 src/convert.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

--- 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);