mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
Fix potential problem with calling zfs_to_cpu and cpu_to_be in a row.
* grub-core/fs/zfs/zfscrypt.c (grub_zfs_decrypt_real): Use explicit byteswap when needed.
This commit is contained in:
1 parent
27610c3836
commit
3ae17eb83c
2 files changed
+9
-1
No files matched your search
@@ -1,3 +1,10 @@
|
||||
2011-11-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix potential problem with calling zfs_to_cpu and cpu_to_be in a row.
|
||||
|
||||
* grub-core/fs/zfs/zfscrypt.c (grub_zfs_decrypt_real): Use explicit
|
||||
byteswap when needed.
|
||||
|
||||
2011-11-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix FreeBSD compilation.
|
||||
|
||||
@@ -277,8 +277,9 @@ grub_zfs_decrypt_real (grub_crypto_cipher_handle_t cipher,
|
||||
grub_err_t err;
|
||||
|
||||
grub_memcpy (sw, nonce, 16);
|
||||
if (endian != GRUB_ZFS_BIG_ENDIAN)
|
||||
for (i = 0; i < 4; i++)
|
||||
sw[i] = grub_cpu_to_be32 (grub_zfs_to_cpu32 (sw[i], endian));
|
||||
sw[i] = grub_swap_bytes32 (sw[i]);
|
||||
|
||||
if (!cipher)
|
||||
return grub_error (GRUB_ERR_ACCESS_DENIED,
|
||||
|
||||
Reference in new issue
Block a user