From f1605bf28b54c0b6345837efc05b731454c9bea5 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Mon, 5 Mar 2007 10:10:41 +0000 Subject: prevent re-use of shit in pbuf from previous rules --- usr.sbin/bgpctl/irr_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/bgpctl/irr_output.c b/usr.sbin/bgpctl/irr_output.c index 8d6152d6a11..5a90e8c6646 100644 --- a/usr.sbin/bgpctl/irr_output.c +++ b/usr.sbin/bgpctl/irr_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: irr_output.c,v 1.9 2007/03/04 20:31:22 henning Exp $ */ +/* $OpenBSD: irr_output.c,v 1.10 2007/03/05 10:10:40 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer @@ -216,6 +216,7 @@ print_rule(FILE *fh, struct policy_item *pi, char *sourceas, if (pi->action) action = action_torule(pi->action); + pbuf[0] = '\0'; if (prefix != NULL) { strlcpy(pbuf, " prefix ", sizeof(pbuf)); offset = strlen(pbuf); -- cgit v1.2.3