diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -687,7 +687,7 @@ main(int ac, char **av) | |||
687 | if (options.rhosts_rsa_authentication || | 687 | if (options.rhosts_rsa_authentication || |
688 | options.hostbased_authentication) { | 688 | options.hostbased_authentication) { |
689 | sensitive_data.nkeys = 3; | 689 | sensitive_data.nkeys = 3; |
690 | sensitive_data.keys = xmalloc(sensitive_data.nkeys * | 690 | sensitive_data.keys = xcalloc(sensitive_data.nkeys, |
691 | sizeof(Key)); | 691 | sizeof(Key)); |
692 | 692 | ||
693 | PRIV_START; | 693 | PRIV_START; |
@@ -1250,7 +1250,8 @@ env_permitted(char *env) | |||
1250 | int i; | 1250 | int i; |
1251 | char name[1024], *cp; | 1251 | char name[1024], *cp; |
1252 | 1252 | ||
1253 | strlcpy(name, env, sizeof(name)); | 1253 | if (strlcpy(name, env, sizeof(name)) >= sizeof(name)) |
1254 | fatal("env_permitted: name too long"); | ||
1254 | if ((cp = strchr(name, '=')) == NULL) | 1255 | if ((cp = strchr(name, '=')) == NULL) |
1255 | return (0); | 1256 | return (0); |
1256 | 1257 | ||