Ensure that the sqlite3StrAccumAppend() routine is never called with a NULL

second argument.  Doing so is harmless when N==0, but it causes an assert()
to fail that was placed to quiet static analyzers.

FossilOrigin-Name: f03fbf3700d9d4a654e3aa2e5caa810a8416bed9
This commit is contained in:
drh
2014-05-07 18:21:56 +00:00
parent eacc050f30
commit 86a1119133
3 changed files with 10 additions and 8 deletions
+3 -1
View File
@@ -1541,7 +1541,9 @@ static void groupConcatStep(
}
zVal = (char*)sqlite3_value_text(argv[0]);
nVal = sqlite3_value_bytes(argv[0]);
if( nVal || firstTerm ) sqlite3StrAccumAppend(pAccum, zVal, nVal);
if( nVal || (zVal="", firstTerm) ){
sqlite3StrAccumAppend(pAccum, zVal, nVal);
}
}
}
static void groupConcatFinalize(sqlite3_context *context){