summaryrefslogtreecommitdiffstats
path: root/src/erasure-code
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2015-03-13 21:58:24 +0100
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2015-03-17 09:19:40 +0100
commit0b40e59b636cd6e5ef5ca0fe8c37ad3c9cb7ef99 (patch)
treeec8058310da28170f21d51dba49d791bb8b89124 /src/erasure-code
parentErasureCodeShec.cc: fix uninitialized scalar variable (UNINIT) (diff)
downloadceph-0b40e59b636cd6e5ef5ca0fe8c37ad3c9cb7ef99.tar.xz
ceph-0b40e59b636cd6e5ef5ca0fe8c37ad3c9cb7ef99.zip
shec/shec.cc: fix uninitialized scalar variable (UNINIT)
Fix for: CID 1274311: Uninitialized scalar variable (UNINIT) uninit_use_in_call: Using uninitialized element of array dm_ids when calling shec_make_decoding_matrix. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/erasure-code')
-rw-r--r--src/erasure-code/shec/shec.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/erasure-code/shec/shec.cc b/src/erasure-code/shec/shec.cc
index 178b7652b03..18528a1dd47 100644
--- a/src/erasure-code/shec/shec.cc
+++ b/src/erasure-code/shec/shec.cc
@@ -284,6 +284,8 @@ int shec_matrix_decode(int k, int m, int w, int *matrix,
int *decoding_matrix = NULL, dm_ids[k];
int minimum[k + m];
+ memset(dm_ids, 0, sizeof(dm_ids));
+
if (w != 8 && w != 16 && w != 32) return -1;
/* Find the number of data drives failed */