diff options
author | Brian C. Lane <bcl@redhat.com> | 2019-08-09 18:31:09 -0700 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2019-08-09 20:01:54 -0700 |
commit | 2dea4ace81c840a887ace9ce9a189314b63a7787 (patch) | |
tree | beb4e26424e799fd6453cf1c3eb1d7ebb0a3a5ad /libparted/labels | |
parent | 573dc1f1a46f3dc72748a88c2c7fcaf18f0961e8 (diff) | |
download | parted-2dea4ace81c840a887ace9ce9a189314b63a7787.tar.gz |
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.
Diffstat (limited to 'libparted/labels')
-rw-r--r-- | libparted/labels/bsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |