A high-quality stealth bug. It bites only if enough fds are open, and
the trouble shows up much later. Kill the sucker with pleasure.
crypt_function *send;
void *private_data;
};
-static struct crypt_data *crypt_data_array;
static unsigned cda_size = 0;
+static struct crypt_data *crypt_data_array;
/** \endcond */
if (fd + 1 > cda_size) {
crypt_data_array = para_realloc(crypt_data_array,
(fd + 1) * sizeof(struct crypt_data));
- memset(crypt_data_array + cda_size * sizeof(struct crypt_data), 0,
+ memset(crypt_data_array + cda_size, 0,
(fd + 1 - cda_size) * sizeof(struct crypt_data));
cda_size = fd + 1;
}