summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2012-02-11 08:19:02 +1100
committerDamien Miller <djm@mindrot.org>2012-02-11 08:19:02 +1100
commit5d0077008f6b9ff00dac01e2265cbfe67d4fe1d0 (patch)
tree1dd70385dee0b983a14203d3dc622843561d29bb
parent1de2cfe9a9304b00900aaa6ff9fe612e2ba51ba8 (diff)
- markus@cvs.openbsd.org 2012/01/25 19:36:31
[authfile.c] memleak in key_load_file(); from Jan Klemkow
-rw-r--r--ChangeLog3
-rw-r--r--authfile.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 460a635ba..2e5881af6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,9 @@
24 [packet.c] 24 [packet.c]
25 do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying; 25 do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying;
26 ok dtucker@, djm@ 26 ok dtucker@, djm@
27 - markus@cvs.openbsd.org 2012/01/25 19:36:31
28 [authfile.c]
29 memleak in key_load_file(); from Jan Klemkow
27 30
2820120206 3120120206
29 - (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms 32 - (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms
diff --git a/authfile.c b/authfile.c
index 1d7e53cd1..7dd449690 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.c,v 1.92 2011/06/14 22:49:18 markus Exp $ */ 1/* $OpenBSD: authfile.c,v 1.93 2012/01/25 19:36:31 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -340,7 +340,7 @@ key_load_file(int fd, const char *filename, Buffer *blob)
340 filename == NULL ? "" : " "); 340 filename == NULL ? "" : " ");
341 return 0; 341 return 0;
342 } 342 }
343 buffer_init(blob); 343 buffer_clear(blob);
344 for (;;) { 344 for (;;) {
345 if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) { 345 if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
346 if (errno == EPIPE) 346 if (errno == EPIPE)