Fixed buffer overflow in private key decoding (wrong buffer length used in size check).