When EVP_DecodeFinal doesn't update the &taillen, then len is 0:
|
/* There was no data in the PEM file; avoid malloc(0). */ |
|
if (len == 0) |
|
goto end; |
This execute path might be triggered by a malformed PEM file.
Another possible case:
|
*header = pem_malloc(headerlen + 1, flags); |
|
*data = pem_malloc(len, flags); |
|
if (*header == NULL || *data == NULL) { |
|
pem_free(*header, flags, 0); |
|
pem_free(*data, flags, 0); |
|
goto end; |
When
EVP_DecodeFinaldoesn't update the&taillen, thenlenis 0:openssl/crypto/pem/pem_lib.c
Lines 964 to 966 in 93f99b6
This execute path might be triggered by a malformed PEM file.
Another possible case:
openssl/crypto/pem/pem_lib.c
Lines 968 to 973 in 93f99b6