memset, memcpy, sizeof consistency fixes
[openssl.git] / crypto / bn / bn_intern.c
index 139d11b78e2b7758419ae6b716f0271a5d2678fd..c3ea5619b2639313d946fcbb18b53954d6773fb0 100644 (file)
@@ -211,8 +211,8 @@ int bn_copy_words(BN_ULONG *out, const BIGNUM *in, int size)
     if (in->top > size)
         return 0;
 
-    memset(out, 0, sizeof(BN_ULONG) * size);
-    memcpy(out, in->d, sizeof(BN_ULONG) * in->top);
+    memset(out, 0, sizeof(*out) * size);
+    memcpy(out, in->d, sizeof(*out) * in->top);
     return 1;
 }