Module Name:    src
Committed By:   martin
Date:           Fri Jan  6 15:07:23 UTC 2023

Modified Files:
        src/usr.sbin/sysinst: label.c

Log Message:
Minor fix calculating the remaining buffer size for partition flags.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/sysinst/label.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/label.c
diff -u src/usr.sbin/sysinst/label.c:1.46 src/usr.sbin/sysinst/label.c:1.47
--- src/usr.sbin/sysinst/label.c:1.46	Thu Dec 15 20:21:16 2022
+++ src/usr.sbin/sysinst/label.c	Fri Jan  6 15:07:22 2023
@@ -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 @@ fmt_fspart_row(menudesc *m, int ptn, voi
 	*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 &&

Reply via email to