]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordtucker@openbsd.org <dtucker@openbsd.org>
Sun, 27 Aug 2017 00:38:41 +0000 (00:38 +0000)
committerDamien Miller <djm@mindrot.org>
Sun, 3 Sep 2017 23:38:57 +0000 (09:38 +1000)
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

sshconnect2.c

index 0638818fd8fa5955996277544aba501b81598da8..be9397e481bd658f4ec55e616d56076864f2d750 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.265 2017/08/11 04:47:12 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.266 2017/08/27 00:38:41 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -895,7 +895,7 @@ int
 userauth_passwd(Authctxt *authctxt)
 {
        static int attempt = 0;
-       char prompt[150];
+       char prompt[256];
        char *password;
        const char *host = options.host_key_alias ?  options.host_key_alias :
            authctxt->host;
@@ -935,7 +935,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh)
 {
        Authctxt *authctxt = ssh->authctxt;
        char *info, *lang, *password = NULL, *retype = NULL;
-       char prompt[150];
+       char prompt[256];
        const char *host;
 
        debug2("input_userauth_passwd_changereq");