fix plaintext length leak