Fix buffer length handling in GnuTLS password encryption and decryption.