summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2014-03-06 01:04:58 +0100
committerLoic Dachary <loic@dachary.org>2014-03-06 17:29:58 +0100
commit0020ff80920c6fc84ab454568e71ba78448a0809 (patch)
treeb381473dfab611f51713d38c98fa578b7b52bf34 /src
parentd36bd6e54090c2a2d8971349f6998d499beeb133 (diff)
downloadgf-complete-0020ff80920c6fc84ab454568e71ba78448a0809.tar.gz
initialize pointer early in the function
otherwise it may be used uninitialized Signed-off-by: Loic Dachary <loic@dachary.org>
Diffstat (limited to 'src')
-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;