From: claudio Date: Tue, 7 Nov 2023 11:17:35 +0000 (+0000) Subject: Alter imsg_move() to clear the full imsg buffer instead of just the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a594e53a3d3f6c2086bf972a7b8ce8e80da08d41;p=openbsd 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@ --- 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)); } /*