aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp/algs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2022-06-20 19:37:38 +0000
committerBrian Behlendorf <[email protected]>2022-06-27 14:19:04 -0700
commit18df6afdfc63b7c27cbb2b6152d76c40196e9dbb (patch)
treee6c4cb003a107771782c65e0fdb1da9fdea7cbd5 /module/icp/algs
parentb0f7dd276c930129fef8575e15a36ec659e31cd2 (diff)
Fix -Wattribute-warning in edonr
The wrong union memory was being accessed in EdonRInit resulting in a write beyond size of field compiler warning. Reference the correct member to resolve the warning. The warning was correct and this in case the mistake was harmless. In function ‘fortify_memcpy_chk’, inlined from ‘EdonRInit’ at zfs/module/icp/algs/edonr/edonr.c:494:3: ./include/linux/fortify-string.h:344:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #13528 Closes #13575
Diffstat (limited to 'module/icp/algs')
-rw-r--r--module/icp/algs/edonr/edonr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/icp/algs/edonr/edonr.c b/module/icp/algs/edonr/edonr.c
index 9388a6f6b..345133d74 100644
--- a/module/icp/algs/edonr/edonr.c
+++ b/module/icp/algs/edonr/edonr.c
@@ -491,7 +491,7 @@ EdonRInit(EdonRState *state, size_t hashbitlen)
state->hashbitlen = 512;
state->bits_processed = 0;
state->unprocessed_bits = 0;
- memcpy(hashState224(state)->DoublePipe, i512p2,
+ memcpy(hashState512(state)->DoublePipe, i512p2,
sizeof (i512p2));
break;
}