Module: ngircd.git Branch: master Commit: abf280d5bd5648817135c487a19941b2ef4b0701 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=abf28...
Author: Alexander Barton alex@barton.de Date: Sun Feb 23 18:20:47 2014 +0100
CHARCONV: Fix handling conversion errors
Don't overwrite already converted text!
---
src/ngircd/conn-encoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ngircd/conn-encoding.c b/src/ngircd/conn-encoding.c index 98cd29a..d0c5630 100644 --- a/src/ngircd/conn-encoding.c +++ b/src/ngircd/conn-encoding.c @@ -125,7 +125,7 @@ Convert_Message(iconv_t Handle, char *Message) if (iconv(Handle, &Message, &in_left, &out, &out_left) == (size_t)(-1)) { /* An error occurred! */ LogDebug("Error converting message encoding!"); - strlcpy(Encoding_Buffer, Message, sizeof(Encoding_Buffer)); + strlcpy(out, Message, sizeof(Encoding_Buffer)); iconv(Handle, NULL, NULL, NULL, NULL); } else *out = '\0';
ngircd-commits@lists.barton.de