summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-05-15 13:48:26 +1000
committerDamien Miller <djm@mindrot.org>2014-05-15 13:48:26 +1000
commit633de33b192d808d87537834c316dc8b75fe1880 (patch)
tree54d456735ab7e2848dc8df5eba9c3dbb314b29e1 /ssh-keygen.c
parent15271907843e4ae50dcfc83b3594014cf5e9607b (diff)
- djm@cvs.openbsd.org 2014/04/28 03:09:18
[authfile.c bufaux.c buffer.h channels.c krl.c mux.c packet.c packet.h] [ssh-keygen.c] buffer_get_string_ptr's return should be const to remind callers that futzing with it will futz with the actual buffer contents
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index d37b7f7f2..85eaf2ef5 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.244 2014/04/20 09:24:26 logan Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.245 2014/04/28 03:09:18 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1820,8 +1820,8 @@ add_cert_option(char *opt)
1820static void 1820static void
1821show_options(const Buffer *optbuf, int v00, int in_critical) 1821show_options(const Buffer *optbuf, int v00, int in_critical)
1822{ 1822{
1823 char *name; 1823 char *name, *arg;
1824 u_char *data; 1824 const u_char *data;
1825 u_int dlen; 1825 u_int dlen;
1826 Buffer options, option; 1826 Buffer options, option;
1827 1827
@@ -1844,9 +1844,9 @@ show_options(const Buffer *optbuf, int v00, int in_critical)
1844 else if ((v00 || in_critical) && 1844 else if ((v00 || in_critical) &&
1845 (strcmp(name, "force-command") == 0 || 1845 (strcmp(name, "force-command") == 0 ||
1846 strcmp(name, "source-address") == 0)) { 1846 strcmp(name, "source-address") == 0)) {
1847 data = buffer_get_string(&option, NULL); 1847 arg = buffer_get_cstring(&option, NULL);
1848 printf(" %s\n", data); 1848 printf(" %s\n", arg);
1849 free(data); 1849 free(arg);
1850 } else { 1850 } else {
1851 printf(" UNKNOWN OPTION (len %u)\n", 1851 printf(" UNKNOWN OPTION (len %u)\n",
1852 buffer_len(&option)); 1852 buffer_len(&option));