Fix CRL parsing to avoid infinite loop

This patch modifies the function mbedtls_x509_crl_parse() to ensure
that a CRL in PEM format with trailing characters after the footer does
not result in the execution of an infinite loop.
diff --git a/library/x509_crl.c b/library/x509_crl.c
index 125a773..dca14cc 100644
--- a/library/x509_crl.c
+++ b/library/x509_crl.c
@@ -529,7 +529,7 @@
 
             mbedtls_pem_free( &pem );
         }
-        else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT )
+        else if( is_pem )
         {
             mbedtls_pem_free( &pem );
             return( ret );