- tmp = para_malloc(len);
- RC4(&rc4c->send_key, len, (const unsigned char *)buf, tmp);
+ tmp = para_malloc(l2);
+ RC4(&rc4c->send_key, l1, (const unsigned char *)buf, tmp);
+ if (len > l1) {
+ memcpy(remainder, buf + l1, len - l1);
+ RC4(&rc4c->send_key, len - l1, remainder, tmp + l1);
+ }