Module Name:    src
Committed By:   kamil
Date:           Sat Jun 23 22:35:29 UTC 2018

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

Log Message:
Enlarge the set_status[] array by a single element

In the get_and_unpack_sets() function there is accessed the
set_status[SET_GROUP_END] element in the array. The array is allocated on
the stack with SET_GROUP_END elements. This means that it is 1 element too
short.

This has been reported with MKSANITIZER=yes with Address Sanitizer.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/util.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/util.c
diff -u src/usr.sbin/sysinst/util.c:1.9 src/usr.sbin/sysinst/util.c:1.10
--- src/usr.sbin/sysinst/util.c:1.9	Thu Jun 21 23:05:28 2018
+++ src/usr.sbin/sysinst/util.c	Sat Jun 23 22:35:29 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.9 2018/06/21 23:05:28 kamil Exp $	*/
+/*	$NetBSD: util.c,v 1.10 2018/06/23 22:35:29 kamil Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -78,7 +78,7 @@ static const char *msg_yes, *msg_no, *ms
 static const char *msg_cur_distsets_row;
 static int select_menu_width;
 
-static uint8_t set_status[SET_GROUP_END];
+static uint8_t set_status[SET_GROUP_END + 1];
 #define SET_VALID	0x01
 #define SET_SELECTED	0x02
 #define SET_SKIPPED	0x04

Reply via email to