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 <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13528
Closes #13575
This commit is contained in:
Brian Behlendorf 2022-06-20 19:37:38 +00:00
parent b0f7dd276c
commit 18df6afdfc
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}