From 95a1f187a63da9e4a601165f1b1fe2097e6774ee Mon Sep 17 00:00:00 2001 From: wt-z0 <289814857+wt-z0@users.noreply.github.com> Date: Tue, 16 Jun 2026 00:56:52 +0000 Subject: [PATCH] fix brctl memset size --- toys/pending/brctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/pending/brctl.c b/toys/pending/brctl.c index 1ff13729..6bb8d347 100644 --- a/toys/pending/brctl.c +++ b/toys/pending/brctl.c @@ -47,7 +47,7 @@ static void get_ports(char *bridge, int *indices) unsigned long args[4] = { BRCTL_GET_PORT_LIST, (unsigned long) ifindices, MAX_BRIDGES, 0 }; - memset(ifindices, 0, MAX_BRIDGES); + memset(ifindices, 0, MAX_BRIDGES * sizeof(*ifindices)); args[1] = (unsigned long)ifindices; xstrncpy(ifr.ifr_name, bridge, IFNAMSIZ); ifr.ifr_data = (char *)args; -- 2.39.5