Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ssh missing buffer_free(&encrypted); #662; zardo...



details:   https://anonhg.NetBSD.org/src/rev/61c53601113f
branches:  trunk
changeset: 552081:61c53601113f
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Sep 18 08:16:15 2003 +0000

description:
missing buffer_free(&encrypted); #662; zardoz at users.sf.net
from openbsd

diffstat:

 crypto/dist/ssh/authfile.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f9794860fb28 -r 61c53601113f crypto/dist/ssh/authfile.c
--- a/crypto/dist/ssh/authfile.c        Thu Sep 18 06:55:53 2003 +0000
+++ b/crypto/dist/ssh/authfile.c        Thu Sep 18 08:16:15 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: authfile.c,v 1.17 2003/07/10 01:09:43 lukem Exp $      */
+/*     $NetBSD: authfile.c,v 1.18 2003/09/18 08:16:15 itojun Exp $     */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -38,7 +38,7 @@
 
 #include "includes.h"
 RCSID("$OpenBSD: authfile.c,v 1.53 2003/05/11 16:56:48 markus Exp $");
-__RCSID("$NetBSD: authfile.c,v 1.17 2003/07/10 01:09:43 lukem Exp $");
+__RCSID("$NetBSD: authfile.c,v 1.18 2003/09/18 08:16:15 itojun Exp $");
 
 #include <openssl/err.h>
 #include <openssl/evp.h>
@@ -145,6 +145,7 @@
        fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
        if (fd < 0) {
                error("open %s failed: %s.", filename, strerror(errno));
+               buffer_free(&encrypted);
                return 0;
        }
        if (write(fd, buffer_ptr(&encrypted), buffer_len(&encrypted)) !=



Home | Main Index | Thread Index | Old Index