Windows builds show the following warning:
(..\apps\ca.c(2643): warning C4267: 'function': conversion
from 'size_t' to 'int', possible loss of data)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14453)
} CA_DB;
void app_bail_out(char *fmt, ...);
-void* app_malloc(int sz, const char *what);
+void *app_malloc(size_t sz, const char *what);
BIGNUM *load_serial(const char *serialfile, int create, ASN1_INTEGER **retai);
int save_serial(const char *serialfile, const char *suffix, const BIGNUM *serial,
ASN1_INTEGER **retai);
exit(1);
}
-void* app_malloc(int sz, const char *what)
+void *app_malloc(size_t sz, const char *what)
{
void *vp = OPENSSL_malloc(sz);
if (vp == NULL)
- app_bail_out("%s: Could not allocate %d bytes for %s\n",
+ app_bail_out("%s: Could not allocate %zu bytes for %s\n",
opt_getprog(), sz, what);
return vp;
}
/* shim that avoids sucking in too much from apps/apps.c */
-void* app_malloc(int sz, const char *what)
+void *app_malloc(size_t sz, const char *what)
{
void *vp = OPENSSL_malloc(sz);