summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-05-02 08:49:03 +0000
committerDamien Miller <djm@mindrot.org>2016-05-02 20:35:04 +1000
commit1a31d02b2411c4718de58ce796dbb7b5e14db93e (patch)
treec6e06a9890e71bc97cd3cdc6ce74919e504c8fd8 /ssh-keygen.c
parentd2d6bf864e52af8491a60dd507f85b74361f5da3 (diff)
upstream commit
fix signed/unsigned errors reported by clang-3.7; add sshbuf_dup_string() to replace a common idiom of strdup(sshbuf_ptr()) with better safety checking; feedback and ok markus@ Upstream-ID: 71f926d9bb3f1efed51319a6daf37e93d57c8820
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 478520123..079f10321 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.288 2016/02/15 09:47:49 dtucker Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.289 2016/05/02 08:49:03 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
@@ -883,7 +883,7 @@ do_fingerprint(struct passwd *pw)
883 char *comment = NULL, *cp, *ep, line[SSH_MAX_PUBKEY_BYTES]; 883 char *comment = NULL, *cp, *ep, line[SSH_MAX_PUBKEY_BYTES];
884 int i, invalid = 1; 884 int i, invalid = 1;
885 const char *path; 885 const char *path;
886 long int lnum = 0; 886 u_long lnum = 0;
887 887
888 if (!have_identity) 888 if (!have_identity)
889 ask_filename(pw, "Enter file in which the key is"); 889 ask_filename(pw, "Enter file in which the key is");
@@ -946,7 +946,7 @@ do_fingerprint(struct passwd *pw)
946 } 946 }
947 /* Retry after parsing leading hostname/key options */ 947 /* Retry after parsing leading hostname/key options */
948 if (public == NULL && (public = try_read_key(&cp)) == NULL) { 948 if (public == NULL && (public = try_read_key(&cp)) == NULL) {
949 debug("%s:%ld: not a public key", path, lnum); 949 debug("%s:%lu: not a public key", path, lnum);
950 continue; 950 continue;
951 } 951 }
952 952
@@ -1920,7 +1920,7 @@ do_show_cert(struct passwd *pw)
1920 FILE *f; 1920 FILE *f;
1921 char *cp, line[SSH_MAX_PUBKEY_BYTES]; 1921 char *cp, line[SSH_MAX_PUBKEY_BYTES];
1922 const char *path; 1922 const char *path;
1923 long int lnum = 0; 1923 u_long lnum = 0;
1924 1924
1925 if (!have_identity) 1925 if (!have_identity)
1926 ask_filename(pw, "Enter file in which the key is"); 1926 ask_filename(pw, "Enter file in which the key is");