mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Code changes resulting from Coverity analysis.
http://scan.coverity.com/ Found 1 potential segfault in sqlite3_mprintf(). Also 2 failures to fclose() following a malloc() failure. And lots of cases where unnecessary conditionals could be removed from the code. (CVS 3126) FossilOrigin-Name: e510e6dd9d6261f33b853af3b32d155b9d6b63b3
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle SELECT statements in SQLite.
|
||||
**
|
||||
** $Id: select.c,v 1.305 2006/02/24 02:53:50 drh Exp $
|
||||
** $Id: select.c,v 1.306 2006/03/06 20:55:46 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -2687,7 +2687,8 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
|
||||
CollSeq *pColl = 0;
|
||||
struct ExprList_item *pItem;
|
||||
int j;
|
||||
for(j=0, pItem=pList->a; !pColl && j<pList->nExpr; j++, pItem++){
|
||||
assert( pList!=0 ); /* pList!=0 if pF->pFunc->needCollSeq is true */
|
||||
for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){
|
||||
pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
|
||||
}
|
||||
if( !pColl ){
|
||||
|
||||
Reference in New Issue
Block a user