Your first link advises to
See EVP_CIPHER_CTX_set_padding for further information.
This page indicates (emphasis mine) that:
If padding is enabled (the default) then EVP_EncryptFinal_ex() encrypts the ``final'' data, that is any data that remains in a partial block. It uses standard block padding (aka PKCS padding). The encrypted final data is written to out which should have sufficient space for one cipher block. The number of bytes written is placed in outl. After this function is called the encryption operation is finished and no further calls to EVP_EncryptUpdate() should be made.
That page also includes a link to additional information that you may find helpful.