summaryrefslogtreecommitdiffstats
path: root/auth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/auth2.c b/auth2.c
index 71779622..9108b861 100644
--- a/auth2.c
+++ b/auth2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2.c,v 1.135 2015/01/19 20:07:45 markus Exp $ */
+/* $OpenBSD: auth2.c,v 1.136 2016/05/02 08:49:03 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -424,8 +424,8 @@ authmethods_get(Authctxt *authctxt)
buffer_append(&b, authmethods[i]->name,
strlen(authmethods[i]->name));
}
- buffer_append(&b, "\0", 1);
- list = xstrdup(buffer_ptr(&b));
+ if ((list = sshbuf_dup_string(&b)) == NULL)
+ fatal("%s: sshbuf_dup_string failed", __func__);
buffer_free(&b);
return list;
}