summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-12-05 10:25:51 +1100
committerDamien Miller <djm@mindrot.org>2013-12-05 10:25:51 +1100
commitf7e8a8796d661c9d6692ab837e1effd4f5ada1c2 (patch)
tree3239a96ebb2393a66630882eb737b1f57bed391a /key.c
parentf1e44ea9d9a6d4c1a95a0024132e603bd1778c9c (diff)
- djm@cvs.openbsd.org 2013/12/02 03:09:22
[key.c] make key_to_blob() return a NULL blob on failure; part of bz#2175 from Loganaden Velvindron @ AfriNIC
Diffstat (limited to 'key.c')
-rw-r--r--key.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/key.c b/key.c
index b20bcda59..3ee2d61af 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.105 2013/10/29 09:42:11 djm Exp $ */ 1/* $OpenBSD: key.c,v 1.106 2013/12/02 03:09:22 djm Exp $ */
2/* 2/*
3 * read_bignum(): 3 * read_bignum():
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1587,6 +1587,10 @@ to_blob(const Key *key, u_char **blobp, u_int *lenp, int force_plain)
1587 Buffer b; 1587 Buffer b;
1588 int len, type; 1588 int len, type;
1589 1589
1590 if (blobp != NULL)
1591 *blobp = NULL;
1592 if (lenp != NULL)
1593 *lenp = 0;
1590 if (key == NULL) { 1594 if (key == NULL) {
1591 error("key_to_blob: key == NULL"); 1595 error("key_to_blob: key == NULL");
1592 return 0; 1596 return 0;