From 50dbebdac1b616f13f731f07e196f319c287f930 Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 4 Jul 2022 19:06:10 +0000 Subject: [PATCH] Use destination buffer size as strlcpy() bound, not source; harmless here for both sizes are equal. ok kettenis@ --- sys/arch/sparc64/dev/lom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/sparc64/dev/lom.c b/sys/arch/sparc64/dev/lom.c index 27fc021b2ff..a34f6bc3bd3 100644 --- a/sys/arch/sparc64/dev/lom.c +++ b/sys/arch/sparc64/dev/lom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lom.c,v 1.28 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: lom.c,v 1.29 2022/07/04 19:06:10 miod Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -955,7 +955,7 @@ lom_refresh(void *arg) lom1_write_hostname(sc); else lom2_write_hostname(sc); - strlcpy(sc->sc_hostname, hostname, sizeof(hostname)); + strlcpy(sc->sc_hostname, hostname, sizeof(sc->sc_hostname)); } } -- 2.20.1