/*
- 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
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;
}