ssh.c - allocated wrong size for sensitive_data.keys?
Petr Lautrbach
plautrba at redhat.com
Wed Aug 14 19:23:58 EST 2013
Hello,
There's a memory allocation for sensitive_data.keys in ssh.c:848 which uses size of Key instead of Key*.
This is probably harmless but seems to be wrong.
--- a/ssh.c
+++ b/ssh.c
@@ -846,7 +846,7 @@ main(int ac, char **av)
options.hostbased_authentication) {
sensitive_data.nkeys = 7;
sensitive_data.keys = xcalloc(sensitive_data.nkeys,
- sizeof(Key));
+ sizeof(Key *));
for (i = 0; i < sensitive_data.nkeys; i++)
sensitive_data.keys[i] = NULL;
Petr
More information about the openssh-unix-dev
mailing list