1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Avoid left-shifting bits into the sign of a signed integer, as such behavior

is technically undefined.

FossilOrigin-Name: 9417b4021b779876dcb3b9be636f01f4055eb54e
This commit is contained in:
drh
2015-07-08 01:22:52 +00:00
parent 4297c7c4be
commit e56d43010d
3 changed files with 8 additions and 8 deletions

View File

@@ -9119,7 +9119,7 @@ static int checkTreePage(
assert( (u32)i<=usableSize-4 ); /* Enforced by btreeInitPage() */
size = get2byte(&data[i+2]);
assert( (u32)(i+size)<=usableSize ); /* Enforced by btreeInitPage() */
btreeHeapInsert(heap, (i<<16)|(i+size-1));
btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
/* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a
** big-endian integer which is the offset in the b-tree page of the next
** freeblock in the chain, or zero if the freeblock is the last on the