Module Name:    src
Committed By:   martin
Date:           Mon Nov 20 18:03:55 UTC 2023

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

Log Message:
Force alignment of disk buffers to at least 8 byte.
Fixes PR 56434.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/sysinst/label.c
cvs rdiff -u -r1.73 -r1.74 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/label.c
diff -u src/usr.sbin/sysinst/label.c:1.49 src/usr.sbin/sysinst/label.c:1.50
--- src/usr.sbin/sysinst/label.c:1.49	Tue Oct 31 14:03:33 2023
+++ src/usr.sbin/sysinst/label.c	Mon Nov 20 18:03:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: label.c,v 1.49 2023/10/31 14:03:33 martin Exp $	*/
+/*	$NetBSD: label.c,v 1.50 2023/11/20 18:03:55 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.49 2023/10/31 14:03:33 martin Exp $");
+__RCSID("$NetBSD: label.c,v 1.50 2023/11/20 18:03:55 martin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -1967,7 +1967,7 @@ const char *
 get_last_mounted(int fd, daddr_t partstart, uint *fs_type, uint *fs_sub_type,
     uint flags)
 {
-	static char sblk[SBLOCKSIZE];		/* is this enough? */
+	static char sblk[SBLOCKSIZE] __aligned(8);	/* is this enough? */
 	struct fs *SB = (struct fs *)sblk;
 	static const off_t sblocks[] = SBLOCKSEARCH;
 	const off_t *sbp;

Index: src/usr.sbin/sysinst/util.c
diff -u src/usr.sbin/sysinst/util.c:1.73 src/usr.sbin/sysinst/util.c:1.74
--- src/usr.sbin/sysinst/util.c:1.73	Thu Sep  7 16:38:08 2023
+++ src/usr.sbin/sysinst/util.c	Mon Nov 20 18:03:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.73 2023/09/07 16:38:08 riastradh Exp $	*/
+/*	$NetBSD: util.c,v 1.74 2023/11/20 18:03:55 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -398,7 +398,7 @@ static int
 get_iso9660_volname(int dev, int sess, char *volname, size_t volnamelen)
 {
 	int blkno, error, last;
-	char buf[ISO_BLKSIZE];
+	static char buf[ISO_BLKSIZE] __aligned(8);
 	struct iso_volume_descriptor *vd = NULL;
 	struct iso_primary_descriptor *pd = NULL;
 

Reply via email to