Use safer sizeof variant in malloc
[openssl.git] / apps / ecparam.c
index dd0e8f5c61f0075af7908d3d7b599b7bed0ea0a9..5ceaec79b257bccec47c2b3d37aa52c42f2bb6c8 100644 (file)
@@ -232,7 +232,7 @@ int ecparam_main(int argc, char **argv)
         size_t crv_len = EC_get_builtin_curves(NULL, 0);
         size_t n;
 
-        curves = app_malloc((int)(sizeof *curves * crv_len), "list curves");
+        curves = app_malloc((int)sizeof(*curves) * crv_len, "list curves");
         if (!EC_get_builtin_curves(curves, crv_len)) {
             OPENSSL_free(curves);
             goto end;