summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2014-03-06 01:04:58 +0100
committerLoic Dachary <loic@dachary.org>2014-03-28 17:12:40 +0100
commit69a0c688036e3954443a4abe23cbaec6632ab7ae (patch)
tree8fb2a8d9dbdd9a8afe3b5414e4a988e1f6299f5d
parent458baa81600e9c33b23ed072031cc59fca1feeb6 (diff)
downloadgf-complete-69a0c688036e3954443a4abe23cbaec6632ab7ae.tar.gz
initialize pointer early in the function
otherwise it may be used uninitialized Signed-off-by: Loic Dachary <loic@dachary.org> (cherry picked from commit 0020ff80920c6fc84ab454568e71ba78448a0809)
-rw-r--r--src/gf_w128.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gf_w128.c b/src/gf_w128.c
index c4a7114..abf0d81 100644
--- a/src/gf_w128.c
+++ b/src/gf_w128.c
@@ -1166,6 +1166,8 @@ gf_w128_euclid(GFP gf, gf_val_128_t a128, gf_val_128_t b128)
/* This needs to return some sort of error (in b128?) */
if (a128[0] == 0 && a128[1] == 0) return;
+ b = (uint64_t *) b128;
+
e_im1[0] = 0;
e_im1[1] = ((gf_internal_t *) (gf->scratch))->prim_poly;
e_i[0] = a128[0];
@@ -1239,7 +1241,6 @@ gf_w128_euclid(GFP gf, gf_val_128_t a128, gf_val_128_t b128)
d_i = d_ip1;
}
- b = (uint64_t *) b128;
b[0] = y_i[0];
b[1] = y_i[1];
return;