{
struct sa_list *sa;
const u_char *iv;
- u_char *buf_mut, *output_buffer;
+ u_char *output_buffer;
int len, block_size, output_buffer_size;
EVP_CIPHER_CTX *ctx;
EVP_Cipher(ctx, output_buffer, buf, len);
EVP_CIPHER_CTX_free(ctx);
- buf_mut = (u_char*) buf;
- /* Of course this is wrong, because buf is a const buffer, but changing this
- * would require more complicated fix. */
- memcpy(buf_mut, output_buffer, len);
+ /*
+ * XXX - of course this is wrong, because buf is a const buffer,
+ * but changing this would require a more complicated fix.
+ */
+ memcpy(buf, output_buffer, len);
free(output_buffer);
ndo->ndo_packetp = buf;
* Also it should be of size that is multiple of cipher block size. */
EVP_Cipher(ctx, output_buffer, p + ivlen, len);
EVP_CIPHER_CTX_free(ctx);
+ /*
+ * XXX - of course this is wrong, because buf is a
+ * const buffer, but changing this would require a
+ * more complicated fix.
+ */
memcpy(p + ivlen, output_buffer, len);
free(output_buffer);
advance = ivoff - (const u_char *)esp + ivlen;