Rever previous: the d_packname in struct disklabel is not NUL terminated.

Disable the warning instead.
This commit is contained in:
martin 2020-02-19 21:45:09 +00:00
parent fe36d07293
commit 561693de2d
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.32 2020/02/19 21:42:53 martin Exp $
# $NetBSD: Makefile.inc,v 1.33 2020/02/19 21:45:09 martin Exp $
#
# Makefile for sysinst
@ -128,6 +128,7 @@ CPPFLAGS+=-DINET6
.endif
COPTS+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.disklabel.c+= ${GCC_NO_STRINGOP_TRUNCATION}
# Host to ftp from. Default:
# "ftp.NetBSD.org"

View File

@ -1,4 +1,4 @@
/* $NetBSD: disklabel.c,v 1.36 2020/02/19 18:08:03 martin Exp $ */
/* $NetBSD: disklabel.c,v 1.37 2020/02/19 21:45:09 martin Exp $ */
/*
* Copyright 2018 The NetBSD Foundation, Inc.
@ -934,7 +934,7 @@ disklabel_set_disk_pack_name(struct disk_partitions *arg, const char *pack)
struct disklabel_disk_partitions *parts =
(struct disklabel_disk_partitions*)arg;
strlcpy(parts->l.d_packname, pack, sizeof(parts->l.d_packname));
strncpy(parts->l.d_packname, pack, sizeof(parts->l.d_packname));
return true;
}