From 62a67b10ff9f9eea6a4695649fb8252d2a4bc74d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 3 Jun 2024 07:16:44 +0200 Subject: Merging upstream version 3.46.0. Signed-off-by: Daniel Baumann --- ext/misc/cksumvfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/misc/cksumvfs.c') diff --git a/ext/misc/cksumvfs.c b/ext/misc/cksumvfs.c index e7c2c9d..2d7f658 100644 --- a/ext/misc/cksumvfs.c +++ b/ext/misc/cksumvfs.c @@ -446,9 +446,9 @@ static int cksmRead( ** (2) checksum verification is enabled ** (3) we are not in the middle of checkpoint */ - if( iAmt>=512 /* (1) */ - && p->verifyCksm /* (2) */ - && !p->inCkpt /* (3) */ + if( iAmt>=512 && (iAmt & (iAmt-1))==0 /* (1) */ + && p->verifyCksm /* (2) */ + && !p->inCkpt /* (3) */ ){ u8 cksum[8]; cksmCompute((u8*)zBuf, iAmt-8, cksum); -- cgit v1.2.3