From 2dea4ace81c840a887ace9ce9a189314b63a7787 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 9 Aug 2019 18:31:09 -0700 Subject: libparted: Fix bug in bsd.c alpha_bootblock_checksum I flubbed this in e35af6cbc43f5b279e6f0d65ccc904b1ac6c63d2 by trying to switch to using a pointer and ended up writing off the end. Switch the loop in alpha_bootblock_checksum back to use [i] index. It's easier to read anyway. --- libparted/labels/bsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libparted/labels') diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c index fc88a53..cd9b538 100644 --- a/libparted/labels/bsd.c +++ b/libparted/labels/bsd.c @@ -144,8 +144,8 @@ alpha_bootblock_checksum (void *boot) { int i; for (i = 0; i < 63; i++) - sum += *dp++; - *dp = sum; + sum += dp[i]; + dp[63] = sum; } static int -- cgit v1.2.1