Avoid a potential buffer overrun if an SQL statement being parsed ends

with an illegal "!" token.  (This problem was detected by fuzzcheck
running under valgrind. The problem was introduced by check-in [9570b6b43df3].)

FossilOrigin-Name: 2a8d97e7c8976df0312e1294e8c1da8b15686654
This commit is contained in:
drh
2016-02-18 14:49:28 +00:00
parent 4c9d22819f
commit b2bddbbc2d
6 changed files with 16 additions and 13 deletions
+1 -1
View File
@@ -285,7 +285,7 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){
case CC_BANG: {
if( z[1]!='=' ){
*tokenType = TK_ILLEGAL;
return 2;
return 1;
}else{
*tokenType = TK_NE;
return 2;