1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Fix for #2445. A bug in the lookupName() logic that could cause a crash when a WHERE clause used an alias to refer to an expression in the result-set of the SELECT, and that expression was itself a reference to a table column. (CVS 4122)

FossilOrigin-Name: 044ca1c72a8f4632dc2e6a94690d164d3560ee38
This commit is contained in:
danielk1977
2007-06-25 16:29:33 +00:00
parent 576d3db541
commit c9cf6e3d31
5 changed files with 27 additions and 12 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.299 2007/06/20 16:13:23 drh Exp $
** $Id: expr.c,v 1.300 2007/06/25 16:29:34 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1154,6 +1154,7 @@ static int lookupName(
memcpy(pExpr, pDup, sizeof(*pExpr));
sqliteFree(pDup);
cnt = 1;
pMatch = 0;
assert( zTab==0 && zDb==0 );
goto lookupname_end_2;
}