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

Avoid excess heap usage when copying expressions. Ticket #979. (CVS 2127)

FossilOrigin-Name: d10560c75244daebe55da5630ef7e7b84ba7f77a
This commit is contained in:
drh
2004-11-20 20:44:13 +00:00
parent 42cac6dacb
commit b9ecf6fa8e
3 changed files with 9 additions and 9 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.171 2004/11/20 18:13:10 drh Exp $
** $Id: expr.c,v 1.172 2004/11/20 20:44:14 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -392,7 +392,7 @@ Expr *sqlite3ExprDup(Expr *p){
if( pNew==0 ) return 0;
memcpy(pNew, p, sizeof(*pNew));
if( p->token.z!=0 ){
pNew->token.z = sqliteStrDup(p->token.z);
pNew->token.z = sqliteStrNDup(p->token.z, p->token.n);
pNew->token.dyn = 1;
}else{
assert( pNew->token.z==0 );