[openssl-commits] [openssl] master update

Emilia Kasper emilia at openssl.org
Fri May 29 10:41:28 UTC 2015


The branch master has been updated
       via  88f4c6f3d2f884715f8f5f8eb81f0a96cbec8cef (commit)
      from  cc01d21756cc9c79231ef21039782c5fe42008a2 (commit)


- Log -----------------------------------------------------------------
commit 88f4c6f3d2f884715f8f5f8eb81f0a96cbec8cef
Author: Peter Dettman <peter.dettman at bouncycastle.org>
Date:   Wed May 27 15:56:14 2015 +0200

    Fix build errors with enable-ec_nistp_64_gcc_128
    
    RT 3871
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/ec/ecp_nistp224.c | 2 +-
 crypto/ec/ecp_nistp256.c | 2 +-
 crypto/ec/ecp_nistp521.c | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c
index 0e40db4..febfcab 100644
--- a/crypto/ec/ecp_nistp224.c
+++ b/crypto/ec/ecp_nistp224.c
@@ -1070,7 +1070,7 @@ static void select_point(const u64 idx, unsigned int size,
     unsigned i, j;
     limb *outlimbs = &out[0][0];
 
-    memset(out 0, sizeof(out));
+    memset(out, 0, sizeof(*out) * 3);
     for (i = 0; i < size; i++) {
         const limb *inlimbs = &pre_comp[i][0][0];
         u64 mask = i ^ idx;
diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c
index b4cd24d..110984b 100644
--- a/crypto/ec/ecp_nistp256.c
+++ b/crypto/ec/ecp_nistp256.c
@@ -1625,7 +1625,7 @@ static void select_point(const u64 idx, unsigned int size,
     unsigned i, j;
     u64 *outlimbs = &out[0][0];
 
-    memset(out, 0, sizeof(out));
+    memset(out, 0, sizeof(*out) * 3);
 
     for (i = 0; i < size; i++) {
         const u64 *inlimbs = (u64 *)&pre_comp[i][0][0];
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c
index 6e572f1..a5d7360 100644
--- a/crypto/ec/ecp_nistp521.c
+++ b/crypto/ec/ecp_nistp521.c
@@ -1471,7 +1471,7 @@ static void select_point(const limb idx, unsigned int size,
     unsigned i, j;
     limb *outlimbs = &out[0][0];
 
-    memset(out, 0, sizeof(out));
+    memset(out, 0, sizeof(*out) * 3);
 
     for (i = 0; i < size; i++) {
         const limb *inlimbs = &pre_comp[i][0][0];
@@ -1906,7 +1906,7 @@ int ec_GFp_nistp521_points_mul(const EC_GROUP *group, EC_POINT *r,
         pre_comp = OPENSSL_malloc(sizeof(*pre_comp) * num_points);
         if (mixed)
             tmp_felems =
-                OPENSSL_malloc(sizeof(*tmp_felemts) * (num_points * 17 + 1));
+                OPENSSL_malloc(sizeof(*tmp_felems) * (num_points * 17 + 1));
         if ((secrets == NULL) || (pre_comp == NULL)
             || (mixed && (tmp_felems == NULL))) {
             ECerr(EC_F_EC_GFP_NISTP521_POINTS_MUL, ERR_R_MALLOC_FAILURE);
@@ -1918,7 +1918,7 @@ int ec_GFp_nistp521_points_mul(const EC_GROUP *group, EC_POINT *r,
          * i.e., they contribute nothing to the linear combination
          */
         memset(secrets, 0, sizeof(*secrets) * num_points);
-        memset(pre_comp, 0, sizseof(*pre_comp) * num_points);
+        memset(pre_comp, 0, sizeof(*pre_comp) * num_points);
         for (i = 0; i < num_points; ++i) {
             if (i == num)
                 /*


More information about the openssl-commits mailing list