From d88ae4f0a4a7e7b0c8cb3f165b4aec6eacc516dc Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sat, 21 Dec 2013 13:36:42 +0100 Subject: [PATCH] * include/grub/crypto.h: Don't discard const attribute. --- ChangeLog | 4 ++++ include/grub/crypto.h | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fa10f213..694a26114 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-21 Vladimir Serbinenko + + * include/grub/crypto.h: Don't discard const attribute. + 2013-12-21 Vladimir Serbinenko * grub-core/net/bootp.c (grub_cmd_dhcpopt): Use snprintf where it diff --git a/include/grub/crypto.h b/include/grub/crypto.h index 3739c6a4b..8055d6d9f 100644 --- a/include/grub/crypto.h +++ b/include/grub/crypto.h @@ -293,9 +293,9 @@ grub_crypto_xor (void *out, const void *in1, const void *in2, grub_size_t size) } while (size >= sizeof (grub_uint64_t)) { - *(grub_uint64_t *) (void *) outptr - = (*(grub_uint64_t *) (void *) in1ptr - ^ *(grub_uint64_t *) (void *) in2ptr); + *(grub_uint64_t *) outptr + = (*(const grub_uint64_t *) in1ptr + ^ *(const grub_uint64_t *) in2ptr); in1ptr += sizeof (grub_uint64_t); in2ptr += sizeof (grub_uint64_t); outptr += sizeof (grub_uint64_t); @@ -320,7 +320,7 @@ grub_crypto_ecb_encrypt (grub_crypto_cipher_handle_t cipher, void *out, const void *in, grub_size_t size); gcry_err_code_t grub_crypto_cbc_encrypt (grub_crypto_cipher_handle_t cipher, - void *out, void *in, grub_size_t size, + void *out, const void *in, grub_size_t size, void *iv_in); gcry_err_code_t grub_crypto_cbc_decrypt (grub_crypto_cipher_handle_t cipher,