aboutsummaryrefslogtreecommitdiff
path: root/libflash
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2015-09-08 16:14:03 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-08 16:22:41 +1000
commit32dd420d63525411bb1fd55be7865952527d6326 (patch)
tree34153d07320875fed44aa2034697797dcbf56a6e /libflash
parent559d8f93d023802ace966b01eb85622965529a69 (diff)
downloadskiboot-32dd420d63525411bb1fd55be7865952527d6326.zip
skiboot-32dd420d63525411bb1fd55be7865952527d6326.tar.gz
skiboot-32dd420d63525411bb1fd55be7865952527d6326.tar.bz2
libflash/test: Attempted fix of Coverity defect 98799
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r--libflash/test/test-ecc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libflash/test/test-ecc.c b/libflash/test/test-ecc.c
index ad017b2..fb6ee64 100644
--- a/libflash/test/test-ecc.c
+++ b/libflash/test/test-ecc.c
@@ -388,7 +388,7 @@ int main(void)
/* Test that the ecc code can detect and recover bitflips */
printf("Testing bitflip recovery\n");
for (i = 0; i < 64; i++) {
- ret_memcpy = memcpy_from_ecc(&dst, &ecc_data[i], 8);
+ ret_memcpy = memcpy_from_ecc(&dst, &ecc_data[i], sizeof(dst));
if (dst != 0xffffffffffffffff || ret_memcpy) {
ERR("ECC code didn't correct bad bit %d in 0x%016lx\n", 63 - i, be64toh(ecc_data[i].data));
exit(1);