From a594e53a3d3f6c2086bf972a7b8ce8e80da08d41 Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 7 Nov 2023 11:17:35 +0000 Subject: [PATCH] Alter imsg_move() to clear the full imsg buffer instead of just the imsg->data field. This is needed for future imsg API changes. OK tb@ --- usr.sbin/bgpd/rde_peer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bgpd/rde_peer.c b/usr.sbin/bgpd/rde_peer.c index fe67303fd42..d8a25bfa8ec 100644 --- a/usr.sbin/bgpd/rde_peer.c +++ b/usr.sbin/bgpd/rde_peer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_peer.c,v 1.33 2023/10/16 10:25:46 claudio Exp $ */ +/* $OpenBSD: rde_peer.c,v 1.34 2023/11/07 11:17:35 claudio Exp $ */ /* * Copyright (c) 2019 Claudio Jeker @@ -603,7 +603,7 @@ static void imsg_move(struct imsg *dst, struct imsg *src) { *dst = *src; - src->data = NULL; /* allocation was moved */ + memset(src, 0, sizeof(*src)); } /* -- 2.20.1