diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2017-08-27 00:38:41 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-09-04 09:38:57 +1000 |
commit | a54eb27dd64b5eca3ba94e15cec3535124bd5029 (patch) | |
tree | 7fedae2b49ed60aad0c94811fc6280bd218f1ff9 /sshconnect2.c | |
parent | dd9d9b3381a4597b840d480b043823112039327e (diff) |
upstream commit
Increase the buffer sizes for user prompts to ensure that
they won't be truncated by snprintf. Based on patch from cjwatson at
debian.org via bz#2768, ok djm@
Upstream-ID: 6ffacf1abec8f40b469de5b94bfb29997d96af3e
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 0638818fd..be9397e48 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect2.c,v 1.265 2017/08/11 04:47:12 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect2.c,v 1.266 2017/08/27 00:38:41 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2008 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2008 Damien Miller. All rights reserved. |
@@ -895,7 +895,7 @@ int | |||
895 | userauth_passwd(Authctxt *authctxt) | 895 | userauth_passwd(Authctxt *authctxt) |
896 | { | 896 | { |
897 | static int attempt = 0; | 897 | static int attempt = 0; |
898 | char prompt[150]; | 898 | char prompt[256]; |
899 | char *password; | 899 | char *password; |
900 | const char *host = options.host_key_alias ? options.host_key_alias : | 900 | const char *host = options.host_key_alias ? options.host_key_alias : |
901 | authctxt->host; | 901 | authctxt->host; |
@@ -935,7 +935,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh) | |||
935 | { | 935 | { |
936 | Authctxt *authctxt = ssh->authctxt; | 936 | Authctxt *authctxt = ssh->authctxt; |
937 | char *info, *lang, *password = NULL, *retype = NULL; | 937 | char *info, *lang, *password = NULL, *retype = NULL; |
938 | char prompt[150]; | 938 | char prompt[256]; |
939 | const char *host; | 939 | const char *host; |
940 | 940 | ||
941 | debug2("input_userauth_passwd_changereq"); | 941 | debug2("input_userauth_passwd_changereq"); |