note about constant_time_strcmp and lengths

This commit is contained in:
Matt Johnston 2015-06-03 22:15:12 +08:00
parent 91df741926
commit 1fa1c3f9db

View File

@ -33,6 +33,8 @@
#ifdef ENABLE_SVR_PASSWORD_AUTH
/* not constant time when strings are differing lengths.
string content isn't leaked, and crypt hashes are predictable length. */
static int constant_time_strcmp(const char* a, const char* b) {
size_t la = strlen(a);
size_t lb = strlen(b);