mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Ensure 8-byte alignment of data structues in sqlite3_database_file_object().
This should have appeared on trunk originally and then be cherry-picked onto the branch. Oh well.... FossilOrigin-Name: ac39800bb2685fa287c7d834faed75f0bc61320ef986de314392d6eadb574d30
This commit is contained in:
@@ -5062,10 +5062,13 @@ act_like_temp_file:
|
||||
*/
|
||||
sqlite3_file *sqlite3_database_file_object(const char *zName){
|
||||
Pager *pPager;
|
||||
const char *p;
|
||||
while( zName[-1]!=0 || zName[-2]!=0 || zName[-3]!=0 || zName[-4]!=0 ){
|
||||
zName--;
|
||||
}
|
||||
pPager = *(Pager**)(zName - 4 - sizeof(Pager*));
|
||||
p = zName - 4 - sizeof(Pager*);
|
||||
assert( EIGHT_BYTE_ALIGNMENT(p) );
|
||||
pPager = *(Pager**)p;
|
||||
return pPager->fd;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user