Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Minor fix calculating the remaining buffer ...
details: https://anonhg.NetBSD.org/src/rev/e08ee8d7646d
branches: trunk
changeset: 372933:e08ee8d7646d
user: martin <martin%NetBSD.org@localhost>
date: Fri Jan 06 15:07:22 2023 +0000
description:
Minor fix calculating the remaining buffer size for partition flags.
diffstat:
usr.sbin/sysinst/label.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 940807bba1c7 -r e08ee8d7646d usr.sbin/sysinst/label.c
--- a/usr.sbin/sysinst/label.c Fri Jan 06 15:05:52 2023 +0000
+++ b/usr.sbin/sysinst/label.c Fri Jan 06 15:07:22 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: label.c,v 1.46 2022/12/15 20:21:16 martin Exp $ */
+/* $NetBSD: label.c,v 1.47 2023/01/06 15:07:22 martin Exp $ */
/*
* Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: label.c,v 1.46 2022/12/15 20:21:16 martin Exp $");
+__RCSID("$NetBSD: label.c,v 1.47 2023/01/06 15:07:22 martin Exp $");
#endif
#include <sys/types.h>
@@ -1517,7 +1517,8 @@
*fp = 0;
if (pset->parts->pscheme->get_part_attr_str != NULL)
pset->parts->pscheme->get_part_attr_str(pset->parts,
- pset->infos[ptn].cur_part_id, fp, sizeof(flag_str)-1);
+ pset->infos[ptn].cur_part_id, fp,
+ sizeof(flag_str)-1-(fp-flag_str));
/* if the fstype description does not fit, check if we can overrun */
if (strlen(desc) > (size_t)fstype_width &&
Home |
Main Index |
Thread Index |
Old Index