From 3337d7008f9d6d79aa6b416f1649d7c0d1b67278 Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 8 Sep 2010 14:08:10 +0000 Subject: [PATCH] - fix another ridiculous use-(one-line)-after-free - install testbgpdump as well as bgpdump, the different output format is a little easier on my eyes --- net/libbgpdump/Makefile | 5 +++-- net/libbgpdump/patches/patch-cfile_tools_c | 16 +++++++++++++--- net/libbgpdump/pkg/PLIST | 3 ++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/net/libbgpdump/Makefile b/net/libbgpdump/Makefile index 5a75ba2fa41..af29f5c2a7a 100644 --- a/net/libbgpdump/Makefile +++ b/net/libbgpdump/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.2 2010/08/22 11:49:55 phessler Exp $ +# $OpenBSD: Makefile,v 1.3 2010/09/08 14:08:10 sthen Exp $ COMMENT= library to analyze MRT-format BGP dump files DISTNAME= libbgpdump-1.4.99.11 -REVISION= 0 +REVISION= 1 SHARED_LIBS= bgpdump 0.0 @@ -30,6 +30,7 @@ NO_REGRESS= Yes do-install: ${INSTALL_PROGRAM} ${WRKBUILD}/bgpdump ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKBUILD}/testbgpdump ${PREFIX}/bin ${INSTALL_DATA} ${WRKBUILD}/libbgpdump.* ${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/*.h ${PREFIX}/include diff --git a/net/libbgpdump/patches/patch-cfile_tools_c b/net/libbgpdump/patches/patch-cfile_tools_c index 259e1898eb1..84b57381736 100644 --- a/net/libbgpdump/patches/patch-cfile_tools_c +++ b/net/libbgpdump/patches/patch-cfile_tools_c @@ -1,9 +1,19 @@ -$OpenBSD: patch-cfile_tools_c,v 1.1 2010/08/22 11:49:55 phessler Exp $ +$OpenBSD: patch-cfile_tools_c,v 1.2 2010/09/08 14:08:10 sthen Exp $ Use after free ---- cfile_tools.c.orig Wed Apr 21 14:32:21 2010 -+++ cfile_tools.c Wed Apr 21 14:32:58 2010 +--- cfile_tools.c.orig Wed Nov 25 12:42:53 2009 ++++ cfile_tools.c Wed Sep 8 15:05:25 2010 +@@ -196,8 +196,8 @@ int cfr_close(CFRFILE *stream) { + case 1: // uncompressed + { + retval = fclose((FILE *)(stream->data1)); +- free(stream); + stream->error1 = retval; ++ free(stream); + return(retval); + } + break; @@ -218,8 +218,8 @@ int cfr_close(CFRFILE *stream) { return(-1); } diff --git a/net/libbgpdump/pkg/PLIST b/net/libbgpdump/pkg/PLIST index c7f13ab7349..db85184ca57 100644 --- a/net/libbgpdump/pkg/PLIST +++ b/net/libbgpdump/pkg/PLIST @@ -1,6 +1,7 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2010/08/17 19:48:36 sthen Exp $ +@comment $OpenBSD: PLIST,v 1.2 2010/09/08 14:08:10 sthen Exp $ %%SHARED%% @bin bin/bgpdump +@bin bin/testbgpdump include/bgpdump-config.h include/bgpdump.h include/bgpdump_attr.h