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
No known key found for this signature in database
GPG Key ID: 8610EBBBC18A37F1

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");
}