Correction by Marian ??urkovi??
[infodrom/newmail] / charset.c
index a608829..7ebca96 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -1,5 +1,5 @@
 /*
-    Copyright (c) 2006  Joey Schulze <joey@infodrom.org>
+    Copyright (c) 2006,8  Joey Schulze <joey@infodrom.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ char *convert_word(const char *encoding, char *inbuf, char *outbuf, size_t outby
   size_t outsize;
 
   if (!charset || !strcasecmp (encoding, charset)) {
-    memmove (outbuf, inbuf, strlen(inbuf)<outbytesleft?strlen(inbuf)+1:strlen(inbuf));
+    memmove (outbuf, inbuf, strlen(inbuf)<outbytesleft?strlen(inbuf)+1:outbytesleft);
     outbuf[outbytesleft-1] = '\0';
     return outbuf;
   }