Fix a crash that could occur following an OOM in the group_concat() function

if the second argument is an SQLITE_BLOB value.

FossilOrigin-Name: 14d855d2b2b5b3485e0673d11405db7266b34c6d
This commit is contained in:
dan
2016-12-30 17:40:14 +00:00
parent 1d081ab39e
commit 3043b53222
6 changed files with 101 additions and 11 deletions
+1 -1
View File
@@ -1634,7 +1634,7 @@ static void groupConcatStep(
zSep = ",";
nSep = 1;
}
if( nSep ) sqlite3StrAccumAppend(pAccum, zSep, nSep);
if( zSep ) sqlite3StrAccumAppend(pAccum, zSep, nSep);
}
zVal = (char*)sqlite3_value_text(argv[0]);
nVal = sqlite3_value_bytes(argv[0]);