Avoid passing NULL as the second argument to memcpy() in fts3.

FossilOrigin-Name: 49b93d972de9649abfd6235b65dda1c9d468956671e50704afde6181ffa56dea
This commit is contained in:
dan
2017-03-20 19:35:30 +00:00
parent 6b904f5e01
commit 74869e5e52
3 changed files with 10 additions and 8 deletions
+3 -1
View File
@@ -1398,7 +1398,9 @@ static int fts3InitVtab(
char *z;
int n = 0;
z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n);
memcpy(zCsr, z, n);
if( n>0 ){
memcpy(zCsr, z, n);
}
zCsr[n] = '\0';
sqlite3Fts3Dequote(zCsr);
p->azColumn[iCol] = zCsr;