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

Report an error if the input SQL contains an unterminated string.

Ticket #1497. (CVS 2751)

FossilOrigin-Name: c9c476dd836c49255eabc6cce83064974c079ce3
This commit is contained in:
drh
2005-10-23 11:29:40 +00:00
parent d9cb6ac02f
commit eef8b55832
5 changed files with 26 additions and 14 deletions

View File

@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.107 2005/08/23 11:31:26 drh Exp $
** $Id: tokenize.c,v 1.108 2005/10/23 11:29:40 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -196,9 +196,13 @@ static int getToken(const unsigned char *z, int *tokenType){
}
}
}
if( c ) i++;
*tokenType = TK_STRING;
return i;
if( c ){
*tokenType = TK_STRING;
return i+1;
}else{
*tokenType = TK_ILLEGAL;
return i;
}
}
case '.': {
#ifndef SQLITE_OMIT_FLOATING_POINT