summaryrefslogtreecommitdiffstats
path: root/ext/misc/cksumvfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/cksumvfs.c')
-rw-r--r--ext/misc/cksumvfs.c6
1 files changed, 3 insertions, 3 deletions
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);