1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Improvements to rootpage bounds checking during schema parse.

FossilOrigin-Name: 75599a9731be19e213a8ae174b038a43381bc6883a6b7f4058c2c1625fdea432
This commit is contained in:
drh
2020-07-22 20:12:10 +00:00
parent 3b3ddbae36
commit 69306bf43a
4 changed files with 18 additions and 19 deletions

View File

@@ -874,9 +874,9 @@ int sqlite3GetUInt32(const char *z, u32 *pI){
int i;
for(i=0; sqlite3Isdigit(z[i]); i++){
v = v*10 + z[i] - '0';
if( v>4294967296LL ) return 0;
if( v>4294967296LL ){ *pI = 0; return 0; }
}
if( i==0 || z[i]!=0 ) return 0;
if( i==0 || z[i]!=0 ){ *pI = 0; return 0; }
*pI = (u32)v;
return 1;
}