Fix for iconv message

This commit is contained in:
Andrew Pamment 2018-05-23 19:45:55 +10:00
parent bef2a3b96a
commit b6f328ffa3

View File

@ -1062,7 +1062,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
sz = iconv(ic, &inbuf, &inc, &oubuf, &ouc);
free(body3);
if (JAM_AddMessage(jb, &jmh, jsp, (char *)body2, strlen(body2))) {
if (JAM_AddMessage(jb, &jmh, jsp, (char *)body2, oubuf - body2)) {
free(body2);
JAM_UnlockMB(jb);
JAM_DelSubPacket(jsp);