mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Avoid passing NULL pointers to memcmp() or memcpy(), even when the
"number-of-bytes" argument is passed 0. FossilOrigin-Name: 56ff72ab44288296efc99a608f7edc4346366a50
This commit is contained in:
@@ -841,7 +841,7 @@ void sqlite3StrAccumAppend(StrAccum *p, const char *z, int N){
|
||||
assert( p->accError==0 || p->nAlloc==0 );
|
||||
if( p->nChar+N >= p->nAlloc ){
|
||||
enlargeAndAppend(p,z,N);
|
||||
}else{
|
||||
}else if( N ){
|
||||
assert( p->zText );
|
||||
p->nChar += N;
|
||||
memcpy(&p->zText[p->nChar-N], z, N);
|
||||
|
||||
Reference in New Issue
Block a user