unsigned int i;
p = *in + nbyte - 1;
tmpbuf = OPENSSL_malloc(nbyte);
- if (!tmpbuf)
+ if (tmpbuf == NULL)
return 0;
q = tmpbuf;
for (i = 0; i < nbyte; i++)
length = blob_length(bitlen, isdss, ispub);
buf = OPENSSL_malloc(length);
- if (!buf) {
+ if (buf == NULL) {
PEMerr(PEM_F_DO_B2I_BIO, ERR_R_MALLOC_FAILURE);
goto err;
}
dsa = DSA_new();
ret = EVP_PKEY_new();
- if (!dsa || !ret)
+ if (dsa == NULL || ret == NULL)
goto memerr;
if (!read_lebn(&p, nbyte, &dsa->p))
goto memerr;
hnbyte = (bitlen + 15) >> 4;
rsa = RSA_new();
ret = EVP_PKEY_new();
- if (!rsa || !ret)
+ if (rsa == NULL || ret == NULL)
goto memerr;
rsa->e = BN_new();
- if (!rsa->e)
+ if (rsa->e == NULL)
goto memerr;
if (!BN_set_word(rsa->e, read_ledword(&p)))
goto memerr;
p = *out;
else {
p = OPENSSL_malloc(outlen);
- if (!p)
+ if (p == NULL)
return -1;
*out = p;
noinc = 1;
goto err;
}
enctmp = OPENSSL_malloc(keylen + 8);
- if (!enctmp) {
+ if (enctmp == NULL) {
PEMerr(PEM_F_DO_PVK_BODY, ERR_R_MALLOC_FAILURE);
goto err;
}
return 0;
buflen = (int)keylen + saltlen;
buf = OPENSSL_malloc(buflen);
- if (!buf) {
+ if (buf == NULL) {
PEMerr(PEM_F_B2I_PVK_BIO, ERR_R_MALLOC_FAILURE);
return 0;
}
p = *out;
else {
p = OPENSSL_malloc(outlen);
- if (!p) {
+ if (p == NULL) {
PEMerr(PEM_F_I2B_PVK, ERR_R_MALLOC_FAILURE);
return -1;
}