1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Fix harmless USAN warnings from gcc9.

FossilOrigin-Name: 72c4c69fea13f5e24df25645e6941ce3ff896f0a3c73cd63329f819cc907ab40
This commit is contained in:
drh
2020-08-11 21:53:42 +00:00
parent 4dfdb86c8d
commit c08716a317
5 changed files with 19 additions and 14 deletions

View File

@ -2956,8 +2956,13 @@ static int sessionChangesetReadTblhdr(sqlite3_changeset_iter *p){
}
p->apValue = (sqlite3_value**)p->tblhdr.aBuf;
p->abPK = (u8*)&p->apValue[p->nCol*2];
p->zTab = (char*)&p->abPK[p->nCol];
if( p->apValue==0 ){
p->abPK = 0;
p->zTab = 0;
}else{
p->abPK = (u8*)&p->apValue[p->nCol*2];
p->zTab = p->abPK ? (char*)&p->abPK[p->nCol] : 0;
}
return (p->rc = rc);
}