From: miod Date: Mon, 4 Jul 2022 19:06:10 +0000 (+0000) Subject: Use destination buffer size as strlcpy() bound, not source; harmless here for X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=50dbebdac1b616f13f731f07e196f319c287f930;p=openbsd Use destination buffer size as strlcpy() bound, not source; harmless here for both sizes are equal. ok kettenis@ --- 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)); } }