diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-10-03 22:25:30 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-10-03 22:25:30 +0800 |
commit | e80daa98e9750d1045e5bc99b419c84ead70a684 (patch) | |
tree | 3a5081172fabd90b4befc733decafe0f2a388291 /packet.c | |
parent | 09eb32b6b53f6e09a713ce416051ad65a07c132a (diff) | |
download | dropbear-e80daa98e9750d1045e5bc99b419c84ead70a684.tar.gz |
Constant time memcmp for the hmac and password crypt
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -376,7 +376,7 @@ static int checkmac() { /* compare the hash */ buf_setpos(ses.readbuf, contents_len); - if (memcmp(mac_bytes, buf_getptr(ses.readbuf, mac_size), mac_size) != 0) { + if (constant_time_memcmp(mac_bytes, buf_getptr(ses.readbuf, mac_size), mac_size) != 0) { return DROPBEAR_FAILURE; } else { return DROPBEAR_SUCCESS; |