Module Name: src
Committed By: martin
Date: Wed Feb 19 21:45:10 UTC 2020
Modified Files:
src/usr.sbin/sysinst: Makefile.inc disklabel.c
Log Message:
Rever previous: the d_packname in struct disklabel is not NUL terminated.
Disable the warning instead.
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/sysinst/Makefile.inc
cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/sysinst/disklabel.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.32 src/usr.sbin/sysinst/Makefile.inc:1.33
--- src/usr.sbin/sysinst/Makefile.inc:1.32 Wed Feb 19 21:42:53 2020
+++ src/usr.sbin/sysinst/Makefile.inc Wed Feb 19 21:45:09 2020
@@ -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"
Index: src/usr.sbin/sysinst/disklabel.c
diff -u src/usr.sbin/sysinst/disklabel.c:1.36 src/usr.sbin/sysinst/disklabel.c:1.37
--- src/usr.sbin/sysinst/disklabel.c:1.36 Wed Feb 19 18:08:03 2020
+++ src/usr.sbin/sysinst/disklabel.c Wed Feb 19 21:45:09 2020
@@ -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
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;
}