Fix one more potential out-of-bounds read

This commit is contained in:
Egor Duda
2021-12-24 12:26:31 +03:00
parent c66f0e98c9
commit 2993eedaba

View File

@@ -90,7 +90,7 @@ ecc_key *buf_get_ecdsa_pub_key(buffer* buf) {
rest_len = prefix_len;
#if DROPBEAR_SK_ECDSA
if (memcmp (key_ident, "sk-", 3) == 0) {
if (strncmp (key_ident, "sk-", 3) == 0) {
prefix_len = strlen ("sk-ecdsa-sha2-");
rest_len = prefix_len + strlen ("@openssh.com");
}