This has timing variance when all the bytes in the last block are the same.

The OpenSSL TLS code is careful to make this check constant time also. https://github.com/openssl/openssl/blob/master/ssl/s3_cbc.c#L217